commit 6a905f6c6868df88dcf6a7fa487c8355766b41db
parent bf2cfa6ac3789d3a7a2a77094b028162b483d02d
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 30 Sep 2020 14:41:57 +0200
mon: optimize screen resolution reading
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.local/bin/mon b/.local/bin/mon
@@ -16,7 +16,7 @@ xrdb_hidpi() {
res_from_xrandr() {
awk -v disp="$1" '
{
- if (printline) { print $1; printline=0 }
+ if (printline) { print $1; exit }
if (match($0, disp)) { printline=1 }
}'
}