1
0
forked from extern/nix-config

xeventbind: Set a default Xft.dpi if none is found

Since our scripts depend on Xft.dpi being set, we first set the
variable to a reasonable default before doing anything else.
This commit is contained in:
Donovan Glover 2018-12-22 16:35:33 -05:00
parent fa8fb212ab
commit e4eb86bdeb
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -5,6 +5,11 @@ HOST_WIDTH=$(bspc query -T -m | jq '.rectangle.width')
CURSOR_THEME=${XCURSOR_THEME:-breeze_cursors}
# If the DPI is not set, set it to 96 by default
if [ -z "$(xrdb -query | grep dpi)" ]; then
X_DPI=96
fi
# Determine the DPI based on screen width
if [ "$HOST_WIDTH" -eq "1920" ]; then
X_DPI=96