From a5036870998c0145b732c81b7b2679e666747638 Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Sun, 1 Sep 2019 14:22:53 +0800 Subject: [PATCH] Create a common user action script --- .scripts/rofi-user-action-menu.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .scripts/rofi-user-action-menu.sh diff --git a/.scripts/rofi-user-action-menu.sh b/.scripts/rofi-user-action-menu.sh new file mode 100644 index 0000000..1202aa9 --- /dev/null +++ b/.scripts/rofi-user-action-menu.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +options='shutdown 0 -P +reboot +i3-msg exit' + +command=$(echo -e "$options" | rofi -dmenu -p "Select the command to execute.") + +continue=$(echo -e "No\nYes" | rofi -dmenu -p "You really want to continue with '$command'?") + +if [[ $continue == "Yes" ]]; then + eval "$command" +fi