voidrice/.local/bin/sysact
2020-05-04 10:30:11 -04:00

15 lines
373 B
Bash
Executable file

#!/bin/sh
# A dmenu wrapper script for system functions.
cmds="\
🔒 lock slock
🚪 leave dwm kill -TERM $(pidof -s dwm)
♻ renew dwm kill -HUP $(pidof -s dwm)
🐻 hibernate sudo -A zzz
🔃 reboot sudo -A reboot
🖥 shutdown sudo -A shutdown -h now"
choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1
`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2-`