dotfiles/.local/bin/sysact
2020-07-04 14:23:27 +02:00

15 lines
331 B
Bash
Executable File

#!/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)" || exit 1
`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2-`