Enable per-device configuration for some settings where necessary

This commit is contained in:
RealStickman 2023-05-30 16:46:01 +02:00
parent bb62cca231
commit 8d3efd746d
9 changed files with 40 additions and 1 deletions

View File

@ -2,7 +2,7 @@
! https://terminal.sexy
! ------------------------------------------------------------------------------
!per-device dpi insert
!Xcursor.theme: Breeze_Snow
Xcursor.theme: capitaine-cursors-light

View File

@ -46,6 +46,8 @@ compositing-border = over
[bar/mainbar-i3]
;https://github.com/jaagr/polybar/wiki/Configuration
;per-device dpi insert
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
monitor-strict = false

View File

@ -13,4 +13,5 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
unset f
fi
xrdb -merge "$HOME/.Xresources"
exec i3 -c "$HOME/.config/i3/config"

View File

@ -0,0 +1,4 @@
Section "Monitor"
Identifier "DisplayPort-1"
DisplaySize 598 336 # In millimeters
EndSection

View File

@ -0,0 +1,6 @@
Section "OutputClass"
Identifier "AMD"
MatchDriver "amdgpu"
Driver "amdgpu"
Option "VariableRefresh" "true"
EndSection

View File

@ -0,0 +1,7 @@
This host requires additional considerations, as it is using a 1440p display.
The following parts are modified:
- Polybar (.config/polybar/i3config.ini)
- Xresources (.Xresources)
- X11 (/etc/X11/xorg.conf.d/ _new files_)

View File

@ -0,0 +1 @@
dpi = 109

View File

@ -0,0 +1 @@
Xft.dpi: 109

View File

@ -290,6 +290,23 @@ sudo cp -r ~/configs/arch-config/usr /
# copy xresources
cp ~/configs/arch-config/.Xresources ~/
##############################
##### Per Device Settings ####
##############################
# lupusregina
if [ "$(hostname)" == "lupusregina" ]; then
echo "Applying overrides for $(hostname)"
# polybar dpi
polybardpi="$(cat ~/configs/arch-config/per-device/lupusregina/polybar-dpi-override.ini)"
awk -v polybardpi="${polybardpi}" '/;per-device dpi insert/{print;print "polybardpi";next}1' ~/.config/polybar/i3config.ini
# xresources dpi
xftdpi="$(cat ~/configs/arch-config/per-device/lupusregina/xresources-dpi-override)"
awk -v xftdpi="${xftdpi}" '/!per-device dpi insert/{print;print "xftdpi";next}1' ~/.Xresources
sudo cp ~/configs/arch-config/per-device/lupusregina/10-monitor.conf /etc/X11/xorg.conf.d/
sudo cp ~/configs/arch-config/per-device/lupusregina/20-amdgpu.conf /etc/X11/xorg.conf.d/
fi
####################
###### Theme ######
####################