1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

xprofile: Run dpi script on startup

Ensures configuration of various graphical services is set correctly on
startup, either before they start, or just after, restarting them
accordingly. This should scale i3, picom, gtk and friends for a seamless
experience.

Use xresources as a source of truth for this information.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2022-10-26 23:02:34 +01:00
parent d538b61cb1
commit 2bd257243a
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ export MOZ_USE_XINPUT2=1 # enable pixel-accurate scrolling in firefox
# Load Xorg resources and set the DPI # Load Xorg resources and set the DPI
xrdb -merge $XDG_CONFIG_HOME/X11/xresources xrdb -merge "$XDG_CONFIG_HOME/X11/xresources"
xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2) "$XDG_CONFIG_HOME/scripts/dpi" "$(xrdb -query | grep -i xft.dpi | cut -d: -f2 | xargs)"
setxkbmap -option caps:none setxkbmap -option caps:none
xset r rate 200 18 xset r rate 200 18

View File

@ -57,13 +57,13 @@ Xft.dpi: $dpi
Xcursor.size: $cursor Xcursor.size: $cursor
EOF EOF
xrandr --dpi "$dpi" & xrandr --dpi "$dpi" &
systemctl --user reload-or-restart xsettingsd & systemctl --user try-reload-or-restart xsettingsd &
wait wait
systemctl --user reload \ systemctl --user try-reload-or-restart \
i3 \ i3 \
polybar@i3bar & polybar@i3bar &
systemctl --user restart \ systemctl --user try-restart \
dunst & dunst &
wait wait