dmenu-scripts/dmenu-power-menu
2023-11-04 22:03:43 +01:00

23 lines
284 B
Bash
Executable File

#!/bin/sh
# simple power menu script
load_config() {
. $HOME/.config/dmenu/config
}
menu() {
case "$(printf "shutdown\\nreboot" | $DMENU -p "Choose your poison")" in
"shutdown") loginctl poweroff ;;
"reboot") loginctl reboot ;;
esac
}
main() {
load_config
menu
}
main $@