23 lines
298 B
Bash
Executable File
23 lines
298 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") poweroff ;;
|
|
"reboot") reboot ;;
|
|
esac
|
|
}
|
|
|
|
main () {
|
|
load_config
|
|
|
|
menu
|
|
}
|
|
|
|
main $@
|