Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: support xsettingsd #25

Open
infabo opened this issue Aug 11, 2022 · 2 comments
Open

Feature: support xsettingsd #25

infabo opened this issue Aug 11, 2022 · 2 comments

Comments

@infabo
Copy link

infabo commented Aug 11, 2022

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/Settings

Settings-file is possibly always located at $HOME/.xsettingsd.

killall -HUP xsettingsd to reload the xsettingsd config.

@alex-courtis
Copy link
Owner

alex-courtis commented Aug 13, 2022

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:

  1. Read ~/.xsettingsd if it's present, update or create Xft/DPI, write the file.
  2. Use a text processor like sed or awk to update ~/.xsettingsd

@alex-courtis
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants