diff options
author | zachir <zachir@librem.one> | 2022-10-09 00:42:32 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2022-10-09 00:42:32 -0500 |
commit | 0217995cda2e5b3700b911b5561e99c659fba92b (patch) | |
tree | 80abdcf81366ebf51432b406e5e0e3293930cf8f /mondetach-tofi | |
parent | 5355ec2d7e7e79d636e62b70af7dbb39002e98d3 (diff) |
add tofi scripts, replacing barmenu
Diffstat (limited to 'mondetach-tofi')
-rwxr-xr-x | mondetach-tofi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mondetach-tofi b/mondetach-tofi new file mode 100755 index 0000000..1512b88 --- /dev/null +++ b/mondetach-tofi @@ -0,0 +1,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 |