summaryrefslogtreecommitdiff
path: root/mondetach
blob: c7f8998ccc58f45812311f571810a5b36f0bcddb (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/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