commit cfac7b46a520f1678c1733324eb3c5f347b6d273 parent bc49bfadb68e604daa471d85bd83e5ae9a02b470 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 20 Oct 2020 10:36:23 +0200 displayselect: use simpler awk conditional syntax Diffstat:
M | .local/bin/displayselect | | | 3 | +-- |
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.local/bin/displayselect b/.local/bin/displayselect @@ -1,8 +1,7 @@ #!/bin/sh set -e -ext_screens="$(xrandr -q | - awk '{if (match($0, / connected/)) {if (i>0) {print $1}; i++}}')" +ext_screens="$(xrandr -q | awk '/ connected/ {if (i>0) {print $1}; i++}')" if [ -z "$ext_screens" ]; then mon int