From 11c1919dd87694aea4b6bf73ea7de58c1e0a586a Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 3 Sep 2019 07:00:14 -0400 Subject: [PATCH] Add GTK3 and QT5 HiDPI scaling variables --- home/bin/config_dpi_high | 2 ++ home/lib/login_variables.sh | 3 +++ home/lib/login_variables_dpi_high.sh | 10 ++++++++++ home/lib/login_variables_dpi_norm.sh | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 home/lib/login_variables_dpi_high.sh create mode 100644 home/lib/login_variables_dpi_norm.sh diff --git a/home/bin/config_dpi_high b/home/bin/config_dpi_high index ac49151..c7c1701 100755 --- a/home/bin/config_dpi_high +++ b/home/bin/config_dpi_high @@ -11,3 +11,5 @@ ln -sf ~/bin/st_dpi_high ~/bin/st # dwm ln -sf ~/bin/dwm_dpi_high ~/bin/dwm + +ln -sf ~/lib/login_variables_dpi_high.sh ~/lib/login_variables_dpi.sh diff --git a/home/lib/login_variables.sh b/home/lib/login_variables.sh index defe2c8..9d07f45 100644 --- a/home/lib/login_variables.sh +++ b/home/lib/login_variables.sh @@ -7,3 +7,6 @@ export DIR_NOTES="$HOME/Documents/Notes" # .Net Core export DOTNET_ROOT=$HOME/.dotnet export PATH=$PATH:$HOME/.dotnet + +# DPI +. "$HOME/lib/login_variables_dpi.sh" diff --git a/home/lib/login_variables_dpi_high.sh b/home/lib/login_variables_dpi_high.sh new file mode 100644 index 0000000..afbe763 --- /dev/null +++ b/home/lib/login_variables_dpi_high.sh @@ -0,0 +1,10 @@ +# GDK 3 (GTK 3) +# https://wiki.archlinux.org/index.php/HiDPI#GDK_3_(GTK_3) +export GDK_SCALE=2 + +# QT +# https://wiki.archlinux.org/index.php/HiDPI#Qt_5 +# https://doc.qt.io/qt-5/highdpi.html +# https://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-6/ +#export QT_SCALE_FACTOR=2 # Causes qutebrowser UI fonts to have large gaps. +export QT_FONT_DPI=192 # Scales qutebrowser UI fonts as expected. diff --git a/home/lib/login_variables_dpi_norm.sh b/home/lib/login_variables_dpi_norm.sh new file mode 100644 index 0000000..2616d4b --- /dev/null +++ b/home/lib/login_variables_dpi_norm.sh @@ -0,0 +1,3 @@ +# GDK 3 (GTK 3) +# https://wiki.archlinux.org/index.php/HiDPI#GDK_3_(GTK_3) +export GDK_SCALE=1 -- 2.20.1