diff --git a/.local/bin/sysact b/.local/bin/sysact new file mode 100755 index 0000000..6bf1a56 --- /dev/null +++ b/.local/bin/sysact @@ -0,0 +1,15 @@ +#!/bin/sh + +# A dmenu wrapper script for system functions. + +cmds="\ +lock screen slock +leave dwm kill -TERM $(pidof -s dwm) +refresh dwm kill -HUP $(pidof -s dwm) +reboot sudo -A reboot +shutdown sudo -A shutdown -h now +" + +choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" + +`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2`