diff options
Diffstat (limited to 'browser')
-rwxr-xr-x | browser | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -1,21 +1,17 @@ #!/usr/bin/env zsh -if printf $1 | grep -q "youtube.com"; then - mpv "$1" -else - 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 +if [[ $1 != "" ]]; then + if printf $1 | grep -q "youtube.com"; then + mpv "$1" + exit fi +fi - if [[ $dpi == 96x96 ]]; then - GDK_DPI_SCALE=$SCALE /usr/bin/env firefox $@ - else - /usr/bin/env firefox $@ - fi +if [[ $(dpi) -gt 120 ]]; then + SCALE=1.25 +else + SCALE=1.0 fi +GDK_SCALE=$SCALE GDK_DPI_SCALE=$SCALE /usr/bin/env firefox $@ + |