diff options
Diffstat (limited to 'dotfiles/.scripts/menudisplay')
-rwxr-xr-x | dotfiles/.scripts/menudisplay | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dotfiles/.scripts/menudisplay b/dotfiles/.scripts/menudisplay new file mode 100755 index 0000000..626f97c --- /dev/null +++ b/dotfiles/.scripts/menudisplay @@ -0,0 +1,14 @@ +#!/bin/sh + +# Source settings from .bemenurc +. $HOME/.bemenurc + +display=$(swaymsg -t get_outputs | grep -E "name" | sed "s/^.*\"name\": \"//g;s/\",$//g;" | bemenu -p "Select output: " $BEMENU_OPTIONS) + +if [ -z $display ]; then + exit 0 +fi + +action=$(printf "enable\ndisable\n" | bemenu -p "Choose action: " $BEMENU_OPTIONS) + +swaymsg output $display $action |