blob: 0e644955fbf7f70ea760718f4495b99a1aaede45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# A dmenu prompt script to control system functions.
options="lock\nreboot\nshutdown\nsuspend\nhibernate\nexit bspwm\nexit i3\n"
chosen=$(printf "$options" | dmenu -l "$(printf "${options}" | wc -l)" -p ">_")
case "$chosen" in
"lock") i3lock.sh ;;
"reboot") ~/scripts/prompt.sh Reboot? "systemctl reboot" ;;
"shutdown") ~/scripts/prompt.sh Shutdown? "systemctl poweroff" ;;
"suspend") systemctl suspend ;;
"hibernate") ~/scripts/prompt.sh Hibernate? "systemctl hibernate" ;;
"exit bspwm") ~/scripts/prompt.sh "Exit bspwm? (ends X session)" "bspc quit" ;;
"exit i3") ~/scripts/prompt.sh "Exit i3? (ends X session)" "i3-msg exit" ;;
esac
|