dotfiles/.scripts/rofi-user-action-menu.sh

18 lines
330 B
Bash
Raw Normal View History

2019-09-01 06:22:53 +00:00
#!/bin/sh
options='shutdown 0 -P
reboot
i3-msg exit'
command=$(echo -e "$options" | rofi -dmenu -p "Select the command to execute.")
2019-09-21 18:30:07 +00:00
if [[ $? != 0 ]]; then
exit $?
fi
2019-09-01 06:22:53 +00:00
continue=$(echo -e "No\nYes" | rofi -dmenu -p "You really want to continue with '$command'?")
if [[ $continue == "Yes" ]]; then
eval "$command"
fi