summaryrefslogtreecommitdiff
path: root/mondetach-tofi
blob: 1512b886a1de5f2bf0ab474fdc0d263e9ea6b82c (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}' | tofi --height 24 --prompt 'Which output?')"
[ -z "$OUTPUT" ] && exit 2

xrandr --output "$OUTPUT" --off