commit 9544c5c8b606ba6ae814b1382826b2b447990887 parent 58871caf0695b0965ef6ad1d15e267d5296a4f3a Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 20 Oct 2020 11:12:34 +0200 mon: use simpler awk syntax Diffstat:
M | .local/bin/mon | | | 6 | +----- |
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/.local/bin/mon b/.local/bin/mon @@ -16,11 +16,7 @@ xrdb_hidpi() { } res_from_xrandr() { - awk -v disp="$1" ' - { - if (printline) { print $1; exit } - if (match($0, disp)) { printline=1 } - }' + awk -v disp="$1" '{ if (match($0, disp)) { getline; print $1; exit } }' } find_res() {