initial release
This commit is contained in:
1 parent
96ab3df34e
commit
9876e39216
57 files changed
+5301
-1
No files matched your search
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sitzungsmenü für labwc (fuzzel --dmenu)
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
if ! command -v fuzzel >/dev/null 2>&1; then
|
||||
echo "fuzzel ist nicht installiert." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
choice=$(
|
||||
printf '%s\n' \
|
||||
"Bildschirm sperren" \
|
||||
"Standby (Ruhezustand)" \
|
||||
"labwc neu laden" \
|
||||
"labwc beenden" \
|
||||
"Neu starten" \
|
||||
"Herunterfahren" \
|
||||
"Abbrechen" |
|
||||
fuzzel --dmenu --prompt='Sitzung ' --lines=7 --width=26 --anchor=center
|
||||
) || exit 0
|
||||
|
||||
lock_now() {
|
||||
if command -v idle-action >/dev/null 2>&1; then
|
||||
idle-action lock-now
|
||||
else
|
||||
pgrep -x swaylock >/dev/null 2>&1 || swaylock -f
|
||||
fi
|
||||
}
|
||||
|
||||
case "$choice" in
|
||||
"Bildschirm sperren")
|
||||
lock_now
|
||||
;;
|
||||
"Standby (Ruhezustand)")
|
||||
lock_now
|
||||
systemctl suspend
|
||||
;;
|
||||
"labwc neu laden")
|
||||
pkill -HUP -x labwc
|
||||
;;
|
||||
"labwc beenden")
|
||||
pkill -TERM -x labwc
|
||||
;;
|
||||
"Neu starten")
|
||||
systemctl reboot
|
||||
;;
|
||||
"Herunterfahren")
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user