Add quick switch between docked and detached displays to power menu

This commit is contained in:
John Mertz 2021-01-17 21:48:20 -05:00 committed by John Mertz
parent 40bfe25606
commit aa7ac22226
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,7 @@ 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 -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 -hide-scrollbar -eh 1 -location 0 -padding 12 -opacity 100 -auto-select -no-fullscreen)
else else
res=$(echo "🔒 Lock|↩ Logout|↻ Reload Sway|↻ Reload Waybar|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -no-lazy-grab -auto-select -no-fullscreen) res=$(echo "🔒 Lock|🖵 Toggle Displays|↩ Logout|↻ Reload Sway|↻ Reload Waybar|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -no-lazy-grab -auto-select -no-fullscreen)
fi fi
if [ "$res" == "🔒 Lock" ]; then if [ "$res" == "🔒 Lock" ]; then
@ -21,6 +21,8 @@ elif [ "$res" == "↩ Logout" ]; then
# Prevent auto-login # Prevent auto-login
rm /home/jpm/.config/last_login_gui rm /home/jpm/.config/last_login_gui
${WM} exit ${WM} exit
elif [ "$res" == "🖵 Toggle Displays" ]; then
/home/jpm/scripts/sway/toggle_outputs.sh
elif [ "$res" == "↻ Reload i3" ]; then elif [ "$res" == "↻ Reload i3" ]; then
i3 reload i3 reload
elif [ "$res" == "↹ Restart i3" ]; then elif [ "$res" == "↹ Restart i3" ]; then