aboutsummaryrefslogtreecommitdiff
path: root/systemControl.sh
blob: 00621ee1977a0e87bbfbcb23e2cbb0899ea032e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
# A dmenu prompt script to control system functions.

options="lock\nreboot\nshutdown\nhibernate\nexit i3"

chosen=$(echo -e "$options" | dmenu -p ">_")

case "$chosen" in
	lock) i3lock.sh ;;
	reboot) ~/scripts/prompt.sh Reboot? "systemctl reboot" ;;
	shutdown) ~/scripts/prompt.sh Shutdown? "systemctl poweroff" ;;
	hibernate) ~/scripts/prompt.sh Hibernate? "systemctl hibernate" ;;
	"exit i3") ~/scripts/prompt.sh "Exit i3? (ends X session)" "i3-msg exit" ;;
esac