From 8d530875d8cf729d2f9daa84219e05b48416baf3 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Wed, 13 Nov 2024 08:50:17 +0100 Subject: [PATCH] fix(swayidle): does not lock twice and blocks hibernation anymore --- home/graphical/swayidle.nix | 2 +- home/scripts/default.nix | 11 +++++++++++ home/sway/default.nix | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/home/graphical/swayidle.nix b/home/graphical/swayidle.nix index 807d43a..09f177d 100644 --- a/home/graphical/swayidle.nix +++ b/home/graphical/swayidle.nix @@ -23,7 +23,7 @@ lib.mkIf config.services.swayidle.enable { timeouts = [ { timeout = 300; - command = locker; + command = "loginctl lock-session"; } { timeout = 1200; diff --git a/home/scripts/default.nix b/home/scripts/default.nix index c609ffb..0eeeb5f 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -76,6 +76,17 @@ in end ''; + nruni = writeFishBin '' + export NIXPKGS_ALLOW_UNFREE=1; + export NIXPKGS_ALLOW_INSECURE=1 + + if echo "$argv[1]" | grep -Eq '^[a-z]+:.+/.+$' + nix run --impure $argv[1] -- $argv[2..] + else + nix run --impure nixpkgs#$argv[1] -- $argv[2..] + end + ''; + editsym = writeFishBin "editsym" '' for file in $argv cp "$file" "$file.tmp" diff --git a/home/sway/default.nix b/home/sway/default.nix index 71d9b98..5957c5c 100644 --- a/home/sway/default.nix +++ b/home/sway/default.nix @@ -76,7 +76,7 @@ lib.mkIf osConfig.programs.sway.enable { "${mod}+x" = "layout toggle tabbed split"; "${mod}+Control+Left" = "workspace prev"; "${mod}+Control+Right" = "workspace next"; - "${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t"; + "${mod}+n" = "exec nysh msg dash toggle"; "--locked XF86MonBrightnessUp" = "exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s +10%"; "--locked XF86MonBrightnessDown" = "exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s 10%-"; "--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";