From 32da04b3f1a51bb40950a2d6d990207e6ce905b7 Mon Sep 17 00:00:00 2001 From: tux Date: Fri, 24 Jul 2026 19:45:06 +0530 Subject: [PATCH] feat(canopus): add scripts for monitors --- modules/hosts/canopus/home.nix | 50 +++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/modules/hosts/canopus/home.nix b/modules/hosts/canopus/home.nix index b6da448..c9bd1dc 100644 --- a/modules/hosts/canopus/home.nix +++ b/modules/hosts/canopus/home.nix @@ -1,6 +1,6 @@ { config, ... }: { - flake.modules.homeManager.canopus = { + flake.modules.homeManager.canopus = { pkgs, ... }: { imports = with config.flake.modules.homeManager; [ desktop ]; @@ -34,6 +34,54 @@ }; }; + home.packages = with pkgs; [ + (writeShellScriptBin "mirror-display" '' + hyprctl eval 'hl.monitor({ + output = "eDP-1", + mode = "2560x1440@165", + position = "0x0", + scale = "1", + disabled = false + })' && + hyprctl eval 'hl.monitor({ + output = "HDMI-A-1", + mode = "preferred", + position = "auto", + scale = "1", + mirror = "eDP-1" + })' + '') + (writeShellScriptBin "extend-display" '' + hyprctl eval 'hl.monitor({ + output = "eDP-1", + mode = "2560x1440@165", + position = "0x0", + scale = "1", + disabled = false + })' && + hyprctl eval 'hl.monitor({ + output = "HDMI-A-1", + mode = "preferred", + position = "0x-1440", + scale = "1", + mirror = "" + })' + '') + (writeShellScriptBin "dock-display" '' + hyprctl eval 'hl.monitor({ + output = "eDP-1", + disabled = true + })' && + hyprctl eval 'hl.monitor({ + output = "HDMI-A-1", + mode = "preferred", + position = "0x0", + scale = "1", + mirror = "" + })' + '') + ]; + home.stateVersion = "26.05"; }; }