From 59fd10c296ee5fda22226ffd71707ca597f85ed7 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Wed, 25 Dec 2024 14:55:37 +0000 Subject: Add bin --- bin/exit-menu-sway.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/exit-menu-sway.sh (limited to 'bin/exit-menu-sway.sh') diff --git a/bin/exit-menu-sway.sh b/bin/exit-menu-sway.sh new file mode 100755 index 0000000..9c9f7ab --- /dev/null +++ b/bin/exit-menu-sway.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +entries=" Lock\n󰹆 Suspend\n󰹆 Suspend-then-Hibernate\n󰒲 Hibernate\n󰍃 Logout\n󰜉 Reboot\n󰐥 Shutdown" + +selected=$(echo -e $entries|wofi --width 100 --height 212 --dmenu --cache-file /dev/null --define content_halign=center --define prompt="Exit menu" | awk '{print tolower($2)}') + +case $selected in + lock) + swaylock;; + logout) + hyprctl dispatch exit;; + suspend-then-hibernate) + exec systemctl suspend-then-hibernate;; + suspend) + exec systemctl suspend;; + hibernate) + exec systemctl hibernate;; + reboot) + exec systemctl reboot;; + shutdown) + exec systemctl poweroff -i;; +esac -- cgit v1.2.3-70-g09d2