Custom rofi menu and powermenu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
905 B

#!/usr/bin/env bash
echo "
[1] Rounded
[2] Slate
"
read -p "Select the number of the theme you choose: " theme
if [ "$theme" -eq 1 ]; then
path1="round/powermenu.rasi"
path2="round/powermenu-confirm.rasi"
else
path1="slate.rasi"
path2="slate.rasi"
fi
o0="﫼"
o1=""
o2=""
o3=""
o4=""
a1="1"
a2="0"
option="$o4\n$o1\n$o3\n$o2\n$o0"
answer="$a2\n$a1"
chosen="$(echo -e "$option" | rofi -theme $path1 -lines 5 -dmenu)"
#chosen="$(echo -e "$option" | rofi -theme ~/.config/rofi/round/powermenu.rasi -lines 5 -dmenu)"
if [ -z "$chosen" ]; then
exit
else
sure="$(echo -e "$answer" | rofi -theme $path2 -lines 2 -dmenu)"
case $chosen$sure in
$o0$a1)
i3-msg exit;;
$o1$a1)
systemctl suspend;;
$o2$a1)
reboot;;
$o3$a1)
poweroff;;
$o4$a1)
exec bash ~/.config/i3/lock/lock.sh;;
esac
fi