inline rofi power prompt

hope to fix issue where confirmation doesn't run when linked to another file
This commit is contained in:
Noah Masur 2024-01-06 20:51:18 -05:00
parent 5d6d6fc68e
commit 19f3147f25

View File

@ -31,15 +31,17 @@ in {
-sep ';' \ -sep ';' \
-selected-row 2) -selected-row 2)
confirm () {
${builtins.readFile ./rofi-prompt.sh}
}
case "$chosen" in case "$chosen" in
"$power_off") "$power_off")
${ confirm 'Shutdown?' && doas shutdown now
builtins.toString ./rofi-prompt.sh
} 'Shutdown?' && doas shutdown now
;; ;;
"$reboot") "$reboot")
${builtins.toString ./rofi-prompt.sh} 'Reboot?' && doas reboot confirm 'Reboot?' && doas reboot
;; ;;
"$lock") "$lock")
@ -51,7 +53,7 @@ in {
;; ;;
"$log_out") "$log_out")
${builtins.toString ./rofi-prompt.sh} 'Logout?' && i3-msg exit confirm 'Logout?' && i3-msg exit
;; ;;
*) exit 1 ;; *) exit 1 ;;