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:
Maarten van Gompel 2020-07-25 20:29:08 +02:00 committed by Miles Alan
parent b513949b95
commit 113f756eb1
3 changed files with 56 additions and 3 deletions

View file

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