forked from extern/nix-config
meta: Add full variable DPI support
This *should* complete the process of adding full variable DPI support to an X session. The X DPI is now set dynamically and changes on resolution change, making this setup easy to deploy to both traditional and HiDPI environments.
This commit is contained in:
commit
665c51a356
@ -48,8 +48,12 @@ xset s off -dpms
|
||||
# Start compton
|
||||
compton -b
|
||||
|
||||
# Start polybar
|
||||
~/.config/polybar/launch.sh main
|
||||
# Start polybar and other things based on DPI
|
||||
~/.config/xeventbind/on-resolution-change.sh
|
||||
|
||||
if hash xeventbind 2>/dev/null; then
|
||||
xeventbind resolution $HOME/.config/xeventbind/on-resolution-change.sh &
|
||||
fi
|
||||
|
||||
# bspc rules
|
||||
bspc rule -a mpv state=floating
|
||||
|
@ -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
|
||||
|
@ -1,9 +1,6 @@
|
||||
! New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
! Copyright (C) 2017-2018 Donovan Glover
|
||||
|
||||
! Use 2x (192/96) scaling for 4k (Effectively 1920x1080)
|
||||
Xft.dpi: 192
|
||||
|
||||
! Make it easier to distinguish between letters (Required for dpi < 300)
|
||||
Xft.hinting: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user