diff options
author | Patrick Simianer <pks@pks.rocks> | 2019-07-28 16:50:59 +0200 |
---|---|---|
committer | Patrick Simianer <pks@pks.rocks> | 2019-07-28 16:50:59 +0200 |
commit | 63e26a56d24c105c040013bb42c58bc14a6d7803 (patch) | |
tree | b5900346ce1bb1e8579872321f13f48fbe87532e | |
parent | 9ea8e3ed2f30ec076f6825d9e337a1094707de32 (diff) |
browser*: better handling of high res screen
-rwxr-xr-x | browser | 22 | ||||
-rwxr-xr-x | browser-work | 10 |
2 files changed, 24 insertions, 8 deletions
@@ -1,11 +1,21 @@ #!/usr/bin/env zsh -dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` -host=$(hostname) - -if [[ $dpi == 96x96 ]]; then - GDK_DPI_SCALE=1.3 /usr/bin/env firefox $@ +if printf $1 | grep -q "youtube.com"; then + mpv "$1" else - /usr/bin/env firefox $@ + dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` + host=$(hostname) + + if [[ $(xdpyinfo | grep 'dimensions:' | strips | cut -d" " -f 5) == "1200x1920" ]]; then + SCALE=1.0 + else + SCALE=1.5 + fi + + if [[ $dpi == 96x96 ]]; then + GDK_DPI_SCALE=$SCALE /usr/bin/env firefox $@ + else + /usr/bin/env firefox $@ + fi fi diff --git a/browser-work b/browser-work index a858c8a..cdff00c 100755 --- a/browser-work +++ b/browser-work @@ -3,9 +3,15 @@ dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` host=$(hostname) +if [[ $(xdpyinfo | grep 'dimensions:' | strips | cut -d" " -f 5) == "1200x1920" ]]; then + SCALE=1.0 +else + SCALE=1.5 +fi + if [[ $dpi == 96x96 ]]; then - GDK_DPI_SCALE=1.3 /usr/bin/env chromium-browser --reset-variation-state $@ + GDK_DPI_SCALE=$SCALE /usr/bin/env $HOME/chrome-linux/chrome --disk-cache-dir=/tmp/cache --reset-variation-state $@ else - /usr/bin/env chromium-browser $@ + $HOME/chrome-linux/chrome --disk-cache-dir=/tmp/cache --reset-variation-state $@ fi |