From b61b58ce2c1371d6f904f108fa7feed3abfbe5c7 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Wed, 8 Apr 2026 13:18:14 +0900 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- bin/susm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/susm (limited to 'bin/susm') 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 -- cgit 1.4.1