Generic power-menu.sh script for rofi/wofi depending on WM
This commit is contained in:
parent
fa007b60ef
commit
1cc843e6eb
|
@ -10,12 +10,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $WM == 'i3' ]]; then
|
if [[ $WM == 'i3' ]]; then
|
||||||
res=$(printf "🔒 Lock|↩ Logout|↻ Reload i3|↹ Restart i3|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -columns 1 -rows 7 -width 32 -l 1 -theme /home/jpm/.config/rofi/sidebar.rasi -hide-scrollbar -eh 1 -location 0 -padding 12 -opacity 100 -auto-select -no-fullscreen)
|
res=$(printf "⚿ Lock|↩ Logout|↻ Reload i3|↹ Restart i3|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -columns 1 -rows 7 -width 32 -l 1 -theme /home/jpm/.config/rofi/sidebar.rasi -hide-scrollbar -eh 1 -location 0 -padding 12 -opacity 100 -auto-select -no-fullscreen)
|
||||||
else
|
else
|
||||||
res=$(echo "🔒 Lock|🖵 Toggle Displays|⚿ Yubico Authenticator|↻ Reload Sway|↻ Reload Waybar|↩ Logout|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -theme /home/jpm/.config/rofi/sidebar.rasi -no-lazy-grab -auto-select -no-fullscreen)
|
res=$(printf "⚿ Lock\n🖵 Toggle Displays\n⚿ Yubico Authenticator\n↻ Reload Sway\n↻ Reload Waybar\n↩ Logout\n↯ Hibernate\n🡙 Reboot\n⏻ Shutdown" | wofi -I -s $HOME/.dotfiles/wofi/style.css -c $HOME/.dotfiles/wofi/sidebar --show dmenu
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$res" == "🔒 Lock" ]; then
|
if [ "$res" == "⚿ Lock" ]; then
|
||||||
${WM}lock -c 000000
|
${WM}lock -c 000000
|
||||||
elif [ "$res" == "↩ Logout" ]; then
|
elif [ "$res" == "↩ Logout" ]; then
|
||||||
# Prevent auto-login
|
# Prevent auto-login
|
Loading…
Reference in New Issue