In i3, we can get DPI from Xresources

master
Quentin Duchemin 2023-10-29 16:09:32 +01:00
parent 980243881c
commit 89b177ffba
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,6 @@
!*dpi is used by i3WM
!See https://i3wm.org/docs/userguide.html#xresources
*dpi: 120
Xft.dpi: 120
Xft.autohint: 0
Xft.lcdfilter: lcddefault

View File

@ -13,8 +13,10 @@ bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
bindsym XF86KbdBrightnessDown exec --no-startup-id brightnessctl -d asus::kbd_backlight set +10%
bindsym XF86KbdBrightnessUp exec --no-startup-id brightnessctl -d asus::kbd_backlight set 10%-
# Get chosen DPI from Xresources, default 120
set_from_resource $dpi i3wm.dpi 120
# Only dunst seems to care about this setting
exec xrandr --dpi 120
exec xrandr --dpi $dpi
##################################
# PROGRAMS STARTED AUTOMATICALLY