summaryrefslogtreecommitdiff
path: root/mondetach
blob: 47d7d6aa178f349884f298a45eb5779177195b06 (plain)
1
2
3
4
5
6
7
8
9
10
#!/sbin/sh

XSTATS="$(xrandr)"

PRIMARY="$(echo "$XSTATS" | grep "primary" | awk '{print $1}')"

OUTPUT="$(echo "$XSTATS" | grep '[0-9]*x[0-9]*+[0-9]*+[0-9]' | grep -v 'primary' | awk '{print $1}' | barmenu -h 24 -p 'Which output?')"
[ -z "$OUTPUT" ] && exit 2

xrandr --output "$OUTPUT" --off