From aa86cda0753b3d6191adab1ef5dbc48a213030ce Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Sat, 28 Oct 2023 23:52:40 +0200 Subject: [PATCH] Finally got DPI working right everywhere ! --- .Xresources.laptop | 2 +- .config/dunst/dunstrc | 2 +- .config/i3/config.d/laptop | 5 ++--- .config/i3/config_common | 3 +++ .config/polybar/config.d/desk | 4 ++-- .config/polybar/config.d/laptop | 4 ++-- .init_config.sh | 5 +++-- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.Xresources.laptop b/.Xresources.laptop index 63a0029..4f58b68 100644 --- a/.Xresources.laptop +++ b/.Xresources.laptop @@ -1,4 +1,4 @@ -Xft.dpi: 110 +Xft.dpi: 120 Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintfull diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index ea861b7..5fc2623 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -19,7 +19,7 @@ width = (0, 400) height = 100 - offset = 15x70 + offset = 30x40 # Show how many messages are currently hidden (because of geometry). indicate_hidden = true diff --git a/.config/i3/config.d/laptop b/.config/i3/config.d/laptop index 4bba0b6..bbbdb2f 100644 --- a/.config/i3/config.d/laptop +++ b/.config/i3/config.d/laptop @@ -13,9 +13,8 @@ bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 -steps 200 bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -dec 30 bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -inc 30 - -# set DPI along with .Xresources -exec xrandr --dpi 160 +# Only dunst seems to care about this setting +exec xrandr --dpi 90 ################################## # PROGRAMS STARTED AUTOMATICALLY diff --git a/.config/i3/config_common b/.config/i3/config_common index c5474e8..5ed2444 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -42,6 +42,9 @@ smart_gaps on # PROGRAMS STARTED AUTOMATICALLY ################################## +# Load Xresources +exec --no-startup-id xrdb -merge ~/.Xresources + # Start compositor exec --no-startup-id picom --config ~/.config/picom.conf diff --git a/.config/polybar/config.d/desk b/.config/polybar/config.d/desk index 053b956..71dc0f5 100644 --- a/.config/polybar/config.d/desk +++ b/.config/polybar/config.d/desk @@ -1,6 +1,6 @@ [variables] -dpi = 90 -height = 27 +dpi = 100 +height = 30 top_left = powermenu system-uptime-pretty player-mpris top_center = xwindow top_right = system-usb-udev alsa date diff --git a/.config/polybar/config.d/laptop b/.config/polybar/config.d/laptop index 43797c1..f33eceb 100644 --- a/.config/polybar/config.d/laptop +++ b/.config/polybar/config.d/laptop @@ -1,6 +1,6 @@ [variables] -dpi = 100 -height = 35 +dpi = 110 +height = 40 top_left = powermenu system-uptime-pretty battery player-mpris top_center = xwindow top_right = system-usb-udev backlight pulseaudio date diff --git a/.init_config.sh b/.init_config.sh index 7b8a562..e6e1c46 100755 --- a/.init_config.sh +++ b/.init_config.sh @@ -62,7 +62,7 @@ function merge_config() { if [ ! -z ${2} ] && [ -d ${CONFIG}/${m}/${MERGE_CONFIG_FOLDER} ]; then for f in `find ${CONFIG}/${m}/config.d -type f -path "*${2}"`; do final_path=${CONFIG}/${m}/${FINAL_CONFIG} - if [ ! -z $3 ]; then + if [ -z $3 ]; then echo "Found ${f}, append to regular config file" cat "${f}" >> ${final_path} else @@ -88,7 +88,8 @@ CONFIG=${XDG_CONFIG_HOME:-$HOME/.config} ENV=${1} for m in ${MERGE_DIRS}; do - if [ -f ${m}/above ]; then + echo ${m} + if [ -f "${CONFIG}/${m}/${MERGE_CONFIG_FOLDER}/above" ]; then merge_config $m ${ENV} true else merge_config $m ${ENV}