23 lines
284 B
Bash
Executable File
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 $@
|