Add files via upload
This commit is contained in:
39
config/rofi/powermenu.sh
Executable file
39
config/rofi/powermenu.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/env bash
|
||||
|
||||
# Options for powermenu
|
||||
lock=".....Заблокировать"
|
||||
logout="....Выход"
|
||||
shutdown="....Выключить"
|
||||
reboot="....Перегрузить"
|
||||
|
||||
# Get answer from user via rofi
|
||||
selected_option=$(echo "$lock
|
||||
$logout
|
||||
$reboot
|
||||
$shutdown" | rofi -dmenu\
|
||||
-i\
|
||||
-p "Power"\
|
||||
-config "~/.config/rofi/powermenu.rasi"\
|
||||
-font "Symbols Nerd Font 14"\
|
||||
-width "15"\
|
||||
-lines 5\
|
||||
-line-margin 3\
|
||||
-line-padding 10\
|
||||
-scrollbar-width "0" )
|
||||
|
||||
# Do something based on selected option
|
||||
if [ "$selected_option" == "$lock" ]
|
||||
then
|
||||
/home/$USER/.config/bspwm/scripts/i3lock-fancy/i3lock-fancy.sh
|
||||
elif [ "$selected_option" == "$logout" ]
|
||||
then
|
||||
bspc quit
|
||||
elif [ "$selected_option" == "$shutdown" ]
|
||||
then
|
||||
systemctl poweroff
|
||||
elif [ "$selected_option" == "$reboot" ]
|
||||
then
|
||||
systemctl reboot
|
||||
else
|
||||
echo "No match"
|
||||
fi
|
||||
Reference in New Issue
Block a user