summary refs log tree commit diff
path: root/bin/susm
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-04-08 13:18:14 +0900
committerRobert Günzler <r@gnzler.io>2026-04-08 13:18:14 +0900
commitb61b58ce2c1371d6f904f108fa7feed3abfbe5c7 (patch)
tree008a5cf54ecbfffb97ddac30e44c8ab224395ab0 /bin/susm
parentd4620f3ac119263fee90bd819eadaf84fc8d50b7 (diff)
*
Automated-commit-by: dots
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/susm')
-rwxr-xr-xbin/susm30
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/susm b/bin/susm
new file mode 100755
index 0000000..197013a
--- /dev/null
+++ b/bin/susm
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -eu
+
+# shellcheck disable=2034
+description="suspend manager"
+
+FUZL_PROMPT=susm
+. libfuzl.sh
+
+main() {
+	local action
+
+	action=$( (
+		printf '%s\t%s\n' 󰒲 'suspend'
+		printf '%s\t%s\n' 󰤁 'reboot'
+		printf '%s\t%s\n'  'poweroff'
+		printf '%s\t%s\n' 󰌾 'lock'
+	) | fuzl_menu $FUZL_MENU_FILTER --with='{1}  {2}' --accept-nth=2)
+
+	case "$action" in
+	suspend | poweroff | reboot)
+		exec loginctl $action
+		;;
+	lock)
+		exec waylock
+		;;
+	esac
+}
+
+main