aboutsummaryrefslogtreecommitdiff
path: root/systemControl.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-06-12 14:26:04 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-06-12 14:26:04 +0200
commit92302eab66110fd7b8f11795241accdf7ec89154 (patch)
treef321ebfd4bb39108fbc414f676bd91d90a24881d /systemControl.sh
parentafb1c135fbee2c1c9966293b63ea5b73be80fffe (diff)
downloadscripts-92302eab66110fd7b8f11795241accdf7ec89154.tar.gz
scripts-92302eab66110fd7b8f11795241accdf7ec89154.zip
Added option to suspend.
Diffstat (limited to 'systemControl.sh')
-rwxr-xr-xsystemControl.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/systemControl.sh b/systemControl.sh
index 00621ee..1bd09d4 100755
--- a/systemControl.sh
+++ b/systemControl.sh
@@ -1,14 +1,15 @@
#!/bin/bash
# A dmenu prompt script to control system functions.
-options="lock\nreboot\nshutdown\nhibernate\nexit i3"
+options="lock\nreboot\nshutdown\nsuspend\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" ;;
+ "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 i3") ~/scripts/prompt.sh "Exit i3? (ends X session)" "i3-msg exit" ;;
esac