From 977a459ddaa33a856255be9c15464f0a5937c06c Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Mon, 19 Feb 2024 22:32:41 +0000 Subject: Add scripts to repo --- bin/exit-menu.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/exit-menu.sh (limited to 'bin/exit-menu.sh') diff --git a/bin/exit-menu.sh b/bin/exit-menu.sh new file mode 100755 index 0000000..763007e --- /dev/null +++ b/bin/exit-menu.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +entries=" Lock\n󰹆 Suspend\n󰍃 Logout\n󰜉 Reboot\n󰐥 Shutdown" + +selected=$(echo -e $entries|wofi --width 100 --height 185 --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) + exec systemctl suspend;; + reboot) + exec systemctl reboot;; + shutdown) + exec systemctl poweroff -i;; +esac -- cgit v1.2.3-70-g09d2