From 9a79a5453b44467f1af8c0cc73e0a6ba5552d38d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 10 Oct 2023 20:32:55 +0200 Subject: [PATCH] Add userspace reboot option to menuquit --- home/.local/bin/scripts/gui/prompt/menuquit | 49 +++++++++++---------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/home/.local/bin/scripts/gui/prompt/menuquit b/home/.local/bin/scripts/gui/prompt/menuquit index c4cfa00..9a09fb7 100755 --- a/home/.local/bin/scripts/gui/prompt/menuquit +++ b/home/.local/bin/scripts/gui/prompt/menuquit @@ -1,28 +1,31 @@ #!/bin/bash -action="$(printf 'Quit WM\nLock session\nLogout\nLock TTYs\nPoweroff\nReboot\nNothing' | menuprompt -c --app wofi -p "Select Action" -- -O default)" +action="$(printf 'Quit WM\nLock session\nLogout\nLock TTYs\nPoweroff\nReboot\nUserspace Reboot\nNothing' | menuprompt -c --app wofi -p "Select Action" -- -O default)" case "$action" in - "Quit WM") - hyprctl dispatch exit "" - ;; - "Lock session") - loginctl lock-session - ;; - "Logout") - loginctl terminate-user "$USER" - ;; - "Lock TTYs") - physlock - ;; - "Poweroff") - systemctl poweroff - ;; - "Reboot") - systemctl reboot - ;; - "Nothing") ;& - *) - exit 1 - ;; +"Quit WM") + hyprctl dispatch exit "" + ;; +"Lock session") + loginctl lock-session + ;; +"Logout") + loginctl terminate-user "$USER" + ;; +"Lock TTYs") + physlock + ;; +"Poweroff") + systemctl poweroff + ;; +"Reboot") + systemctl reboot + ;; +"Userspace Reboot") + systemctl soft-reboot + ;; +"Nothing") ;& +*) + exit 1 + ;; esac