fix(swayidle): does not lock twice and blocks hibernation anymore

This commit is contained in:
Nydragon 2024-11-13 08:50:17 +01:00
parent 2971ad3590
commit 8d530875d8
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
3 changed files with 13 additions and 2 deletions

View file

@ -23,7 +23,7 @@ lib.mkIf config.services.swayidle.enable {
timeouts = [
{
timeout = 300;
command = locker;
command = "loginctl lock-session";
}
{
timeout = 1200;

View file

@ -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"

View file

@ -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";