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.
This commit is contained in:
Donovan Glover 2018-10-15 10:57:38 -04:00
parent 961bc90798
commit 8fea3e5fc8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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/*"'