dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 8041cbb00a7cf2b6a43b4fcfa080a10ffe6ed349
parent 6b0eedee66b754dfa45dfa815f84f8ccab52ad36
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 20 Oct 2020 12:07:31 +0200

surf-open.sh: use xdpyinfo(1) for determining screen resolution

xrandr(1) is much slower with external display connected on OpenBSD 6.8

Diffstat:
M.local/bin/surf-open.sh | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.local/bin/surf-open.sh b/.local/bin/surf-open.sh @@ -13,9 +13,7 @@ if command -v surf-clean-cookies >/dev/null 2>&1; then fi screen_resolution() { - xrandr -q | awk ' - /\*/ { gsub(/x.*/,"", $1); res=$1 } - END { print res }' + xdpyinfo | awk '/screen #0/ {getline; gsub(/x.*/, "", $2); print $2; exit}' } runtabbed() {