Adding a wrapper around sxmo_screenlock, with lock/unlock hooks. Allow setting a target state for sxmo_screenlock, and cleanup on sigterm. Added lock/suspend options to the power menu.
Should be applied after my prior patches from today.
This commit is contained in:
parent
b513949b95
commit
113f756eb1
3 changed files with 56 additions and 3 deletions
|
@ -79,9 +79,12 @@ programchoicesinit() {
|
|||
elif echo "$WMCLASS" | grep -i "power"; then
|
||||
# Power menu
|
||||
CHOICES="
|
||||
Logout ^ 0 ^ pkill -9 dwm
|
||||
Reboot ^ 0 ^ st -e sudo reboot
|
||||
Poweroff ^ 0 ^ st -e sudo halt
|
||||
Lock ^ 0 ^ sxmo_lock.sh
|
||||
Lock (Screen off) ^ 0 ^ sxmo_lock.sh --screen-off
|
||||
Suspend ^ 0 ^ sxmo_lock.sh --suspend
|
||||
Logout ^ 0 ^ pkill -9 dwm
|
||||
Reboot ^ 0 ^ st -e sudo reboot
|
||||
Poweroff ^ 0 ^ st -e sudo halt
|
||||
"
|
||||
WINNAME="Power"
|
||||
elif echo "$WMCLASS" | grep -i "mpv"; then
|
||||
|
|
10
scripts/core/sxmo_lock.sh
Executable file
10
scripts/core/sxmo_lock.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/lock" ]; then
|
||||
"$XDG_CONFIG_HOME/sxmo/hooks/lock"
|
||||
fi
|
||||
pkill -9 lisgd
|
||||
sxmo_screenlock "$@"
|
||||
lisgd &
|
||||
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/unlock" ]; then
|
||||
"$XDG_CONFIG_HOME/sxmo/hooks/unlock"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue