From: Maximilian Friedersdorff Date: Sat, 18 Sep 2021 11:51:57 +0000 (+0100) Subject: Fix dpi scaling X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=5c6acc10d1298ebb24ceeb520537bc212284844c;p=max%2Fsaltfiles.git Fix dpi scaling --- 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