Open infabo opened 2 years ago
Today I Learned about xsettings. Under dwm, apps like chrome, inkscape, audacity, pavucontrol actively change their size when Xft/DPI
is updated. Terminals alacritty, st and xterm do not read xsettingsd however that is to be expected.
An option could be added, something like:
-x [ --xsettingsd ] update xsettingsd
...
echo "Xft.dpi: 156" | xrdb -merge
echo "Xft/DPI 159744" > ~/.xsettingsd
killall -HUP xsettingsd
Problem:
The Xft/DPI
setting in ~/.xsettingsd
needs to be created or updated. Appending a new value to the file results in an error when there is already a value. Clobbering the whole file would result in other settings being lost.
Possible Solutions:
~/.xsettingsd
if it's present, update or create Xft/DPI
, write the file.~/.xsettingsd
xsettingsd seems a little immature and early in its lifecycle. An nicer API to update values would be useful, it may be added later.
However, I will happily accept a PR to add xsettingsd support.
Extension:
No option, instead detect xsettingsd
running (similar to xorgRunning
) and perform the update.
https://github.com/derat/xsettingsd is a lightweight replacement for gnome-settings-daemon. I use it together with i3wm.
It would be a nice if xlayoutdisplay would update
Xft/DPI
setting. see https://github.com/derat/xsettingsd/wiki/SettingsSettings-file is possibly always located at
$HOME/.xsettingsd
.killall -HUP xsettingsd
to reload the xsettingsd config.