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 0e1a3de09be58b444169308196fdb47aaf700a42
parent 2d531be8d8f2942c1829149258bb768eb2f4b872
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 24 Nov 2020 10:44:22 +0100

use vertical resolution when determining screen scaling

Diffstat:
M.local/bin/screenrecord | 2+-
M.local/bin/surf-open.sh | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.local/bin/screenrecord b/.local/bin/screenrecord @@ -9,7 +9,7 @@ startrecording() { sndioctl -q input.level=1.0 - if test "$(xdpyinfo | awk '/dimensions/ {sub(/x.*/, "", $2); print $2}')" -gt 2000; then + if test "$(xdpyinfo | awk '/dimensions/ {sub(/.*x/, "", $2); print $2}')" -gt 1500; then xrandr --output "$screen" --mode 1920x1080 fi diff --git a/.local/bin/surf-open.sh b/.local/bin/surf-open.sh @@ -14,7 +14,7 @@ if command -v surf-clean-cookies >/dev/null 2>&1; then fi screen_resolution() { - xdpyinfo | awk '/screen #0/ {getline; gsub(/x.*/, "", $2); print $2; exit}' + xdpyinfo | awk '/screen #0/ {getline; gsub(/.*x/, "", $2); print $2; exit}' } runtabbed() { @@ -24,7 +24,7 @@ runtabbed() { } opensurf() { zoomlevel="1.0" - if [ "$(screen_resolution)" -gt 3000 ]; then + if [ "$(screen_resolution)" -gt 1500 ]; then zoomlevel="2.5" fi nohup $prefix surf $SURFFLAGS -z "$zoomlevel" -e "$xid" \