Add solution for locking after suspend

This commit is contained in:
Ethan Marshall 2021-04-09 12:51:56 +01:00
parent 9e3a14cbe4
commit 5c3c05d849
No known key found for this signature in database
GPG Key ID: EC2FAEF4DB8968D8

View File

@ -12,8 +12,8 @@ cmds="\
🔒 lock slock
🚪 leave dwm kill -TERM $(pgrep -u $USER "\bdwm$")
♻ renew dwm kill -HUP $(pgrep -u $USER "\bdwm$")
💤 sleep slock ${slp:-systemctl suspend -i}
🐻 hibernate slock ${hib:-systemctl hibernate -i}
💤 sleep ${slp:-systemctl suspend -i}
🐻 hibernate ${hib:-systemctl hibernate -i}
🔃 reboot ${reb:-sudo -A reboot}
🖥 shutdown ${shut:-sudo -A shutdown -h now}
📺 display off xset dpms force off"
@ -21,3 +21,6 @@ cmds="\
choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1
`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2-`
case "$choice" in
*"sleep"*|*"hibernate"*) slock;;
esac