summaryrefslogtreecommitdiff
path: root/lcl-system
diff options
context:
space:
mode:
Diffstat (limited to 'lcl-system')
-rwxr-xr-xlcl-system36
1 files changed, 36 insertions, 0 deletions
diff --git a/lcl-system b/lcl-system
new file mode 100755
index 0000000..7dc932c
--- /dev/null
+++ b/lcl-system
@@ -0,0 +1,36 @@
+#! /bin/bash
+
+source ./util/notify
+
+CHOICES=('Shutdown' 'Hibernate' 'Restart')
+
+[ ! -z "$1" ] && selected="$1" \
+ || selected="$(echo "${CHOICES[@]}" | tr ' ' '\n' \
+ | dmenu -i \
+ -nb '#ffffff' \
+ -nf '#000080' \
+ -sb '#000080' \
+ -sf '#ffffff')"
+
+case "$selected" in
+ "${CHOICES[0]}")
+ shutdown -P 0
+ ;;
+
+ "${CHOICES[1]}")
+ systemctl suspend
+ ;;
+
+ "${CHOICES[2]}")
+ shutdown -r 0
+ ;;
+
+ '')
+ exit 0
+ ;;
+
+ *)
+ notify 'Invalid Entry'
+ ;;
+esac
+