mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 07:15:37 +00:00
inline rofi power prompt
hope to fix issue where confirmation doesn't run when linked to another file
This commit is contained in:
parent
5d6d6fc68e
commit
19f3147f25
@ -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 ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user