workaround of gtklock#130.

This commit is contained in:
2025-10-30 07:05:02 +08:00
parent 6903697587
commit 79f7a3c52e
2 changed files with 5 additions and 1 deletions

View File

@@ -277,7 +277,7 @@ binds {
Mod+Alt+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
Mod+Shift+Escape hotkey-overlay-title="Exit niri" { quit; }
Super+Escape hotkey-overlay-title="Lock the Screen (gtklock)" { spawn "gtklock" "-d"; }
Mod+Delete hotkey-overlay-title="Lock screen and Hibernate ..." { spawn-sh "gtklock -d && sleep 3 && systemctl hibernate"; }
Mod+Delete hotkey-overlay-title="Lock screen and Hibernate ..." allow-when-locked=true { spawn "~/.niri-dotfiles/bin/lock-hibernate.sh"; }
XF86AudioRaiseVolume hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.01+"; }
XF86AudioLowerVolume hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.01-"; }

4
bin/lock-hibernate.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
pgrep gtklock || gtklock -d
sleep 1
systemctl hibernate