aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.scripts/menudisplay
blob: 626f97cb2545c82c17dbfb3199b8d0e235d1af65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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