mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +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 ';' \
|
||||
-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 ;;
|
||||
|
Loading…
Reference in New Issue
Block a user