From 793956deba0b7072e4014d26d5a4c648c6943eb0 Mon Sep 17 00:00:00 2001 From: Nathan Date: Mon, 5 Jan 2026 15:38:58 -0600 Subject: [PATCH] fix? --- machines/laptop/configuration.nix | 3 +++ .../home-manager/programs/hyprland/default.nix | 17 +---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/machines/laptop/configuration.nix b/machines/laptop/configuration.nix index 5b8d3aa..720eaff 100644 --- a/machines/laptop/configuration.nix +++ b/machines/laptop/configuration.nix @@ -69,11 +69,14 @@ firefox.enable = true; git.enable = true; nh.enable = true; + host = config.sysconfig.host; }; #monitor=eDP-1, addreserved, 40,0,0,0 wayland.windowManager.hyprland.extraConfig = '' monitor=eDP-1,1920x1080@60,0x0,1 + bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi' + bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi ''; } diff --git a/system/users/nathan/home-manager/programs/hyprland/default.nix b/system/users/nathan/home-manager/programs/hyprland/default.nix index dffea38..1cb4102 100644 --- a/system/users/nathan/home-manager/programs/hyprland/default.nix +++ b/system/users/nathan/home-manager/programs/hyprland/default.nix @@ -36,22 +36,7 @@ variables = [ "--all" ]; }; - extraConfig = (if config.homeconfig.host == "laptop" then '' - bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi' - bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi - '' else if config.homeconfig.host == "homebox" then '' - monitor=HDMI-A-2,1920x1080@60,0x0,1 - monitor=HEADLESS-2,1920x1080@60,0x0,1 - exec-once=hyprctl output create headless HEADLESS-2 - exec-once=hyprctl keyword monitor HDMI-A-2,disable - exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2 - '' else if config.homeconfig.host == "container" then '' - monitor=HEADLESS-2,1920x1080@60,0x0,1 - exec-once=hyprctl output create headless HEADLESS-2 - exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2 - '' else '' - monitor= , prefered, auto, 1 - '') + (if config.homeconfig.hyprpanel.enable then '' + extraConfig = (if config.homeconfig.hyprpanel.enable then '' bind = , Print, exec, bash -c ${pkgs.hyprpanel}/share/scripts/screenshot.sh" '' else '' bind = , Print, exec, grim -g "$(slurp)"