From 5c6acc10d1298ebb24ceeb520537bc212284844c Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sat, 18 Sep 2021 12:51:57 +0100 Subject: [PATCH] Fix dpi scaling --- states/i3/files/Xresources.jinja | 5 +++++ states/i3/files/xprofile.jinja | 3 --- states/i3/init.sls | 9 +++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 states/i3/files/Xresources.jinja diff --git a/states/i3/files/Xresources.jinja b/states/i3/files/Xresources.jinja new file mode 100644 index 0000000..2f1be4f --- /dev/null +++ b/states/i3/files/Xresources.jinja @@ -0,0 +1,5 @@ +{% set host = grains['host'] %} + +{% if host == "dubnium" or host == "barium" %} +Xft.dpi: 108 +{% endif %} diff --git a/states/i3/files/xprofile.jinja b/states/i3/files/xprofile.jinja index 41bacf2..8b81268 100755 --- a/states/i3/files/xprofile.jinja +++ b/states/i3/files/xprofile.jinja @@ -1,9 +1,6 @@ #!/bin/sh # Load .Xresources xrdb -merge ~/.Xresources &> /dev/null -if [ -f ~/.Xresources.$HOSTNAME ]; then - xrdb -merge ~/.Xresources.$HOSTNAME &> /dev/null -fi # Set keyboard layout case $HOSTNAME in diff --git a/states/i3/init.sls b/states/i3/init.sls index 7131821..4203064 100644 --- a/states/i3/init.sls +++ b/states/i3/init.sls @@ -79,3 +79,12 @@ xinitrc config: - user: {{ grains['user']}} - group: {{ grains['user']}} - mode: 640 + +Xresources config: + file.managed: + - name: {{ grains['homedir'] }}/.Xresources + - source: salt://i3/files/Xresources.jinja + - template: jinja + - user: {{ grains['user']}} + - group: {{ grains['user']}} + - mode: 640 -- 2.46.2