From 8fea3e5fc88de2fc6a867f2036345fcdde4d96a8 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 15 Oct 2018 10:57:38 -0400 Subject: [PATCH] Add full HiDPI support for Qt applications in bspwm After comparing environment variables between KDE Plasma and bspwm, I finally figured out that QT_SCREEN_SCALE_FACTORS was needed as well for full HiDPI support. With this setting and QT_FONT_DPI applied, KDE / Qt applications now look exactly as they would in Plasma. To avoid any differences that may arise, I also exported XDG_DATA_DIRS and some other variables set by Plasma. --- .config/bspwm/bspwmrc | 7 +++++++ .config/fish/config.fish | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index be5feb94..e2df8f8e 100644 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -4,6 +4,13 @@ export SXHKD_SHELL="/usr/bin/bash" +export QT_AUTO_SCREEN_SCALE_FACTOR="0" +export QT_FONT_DPI="192" +export QT_SCREEN_SCALE_FACTORS="VGA-1=2;" + +export XCURSOR_THEME="breeze_cursors" +export XDG_DATA_DIRS="/usr/share:/usr/share:/usr/local/share" + sxhkd & bspc monitor -d 1 2 3 4 5 6 diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 75ba65fb..9015feb8 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -10,7 +10,6 @@ export BROWSER="firefox" export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export XDG_CURRENT_DESKTOP="KDE" -export QT_FONT_DPI="192" # Use rg instead of ag / ack / grep for fzf (much faster) export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'