summaryrefslogtreecommitdiff
path: root/lcl-system
diff options
context:
space:
mode:
authorLM-LCL <hello@exaltedelite.club>2023-08-31 01:01:57 +0200
committerLM-LCL <hello@exaltedelite.club>2023-09-01 16:14:09 +0200
commit9aa290b9667832c8ae41ed8bc36e57da7a74b9c2 (patch)
tree532a98d4561a85952543c609e4ff7c5c45601b5a /lcl-system
parentfe92c7ac827b18673e1fa89dacfca370dcfd313d (diff)
complete script revamp
Diffstat (limited to 'lcl-system')
-rwxr-xr-xlcl-system38
1 files changed, 6 insertions, 32 deletions
diff --git a/lcl-system b/lcl-system
index 7dc932c..ea4e136 100755
--- a/lcl-system
+++ b/lcl-system
@@ -1,36 +1,10 @@
-#! /bin/bash
+#! /bin/sh
-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')"
+selected="$(printf "Lock\nSleep\nShutdown\nReboot" | dmenu -i)"
case "$selected" in
- "${CHOICES[0]}")
- shutdown -P 0
- ;;
-
- "${CHOICES[1]}")
- systemctl suspend
- ;;
-
- "${CHOICES[2]}")
- shutdown -r 0
- ;;
-
- '')
- exit 0
- ;;
-
- *)
- notify 'Invalid Entry'
- ;;
+ Lock) slock ;;
+ Sleep) systemctl suspend ;;
+ Shutdown) sudo shutdown -P 0 ;;
+ Reboot) sudo reboot ;;
esac
-