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