Comments (8)
It's hard to believe: is there really no better way than editing the conf file and then kill -HUP? I see that these settings also show up in
xprop -root RESOURCE_MANAGER
but don't get updated dynamically (?). At least xprop -set exists, but it wouldn't be useful to set it that way unless something (like this daemon) was keeping the prop and the conf file in sync. And that's probably a bad idea for some reason. (As with everything on Linux it seems we have this too-many-fingers-in-the-pie problem.)
As I understand it, the settings that you see when you run xprop -root RESOURCE_MANAGER
are unrelated to XSETTINGS. Those typically get loaded from $HOME/.Xresources
or $HOME/.Xdefaults
by the xrdb
program.
I wrote down my 2014-era vague understanding of the X11 font configuration landscape at https://github.com/derat/font-config-info/commits/master/README.
I was thinking of writing a tray application to switch the theme (because I want light/dark modes on my plain old openbox session), but am loathe to programmatically parse and rewrite ~/.config/xsettingsd/xsettingsd.conf and programmatically do the kill -HUP.
I don't think you need to do any parsing, right? It seems like you could just write separate light.conf
and dark.conf
files and use a tiny script to switch between them, e.g.
#!/bin/sh -e
[ "$1" = dark ] || [ "$1" = light ] || (echo 'Missing light/dark arg' >&2 ; exit 1)
ln -sf "${1}.conf" "${HOME}/.config/xsettingsd/xsettingsd.conf"
killall -HUP xsettingsd
Or instead of a symlink, you could split your config into common and theme-specific parts and use cat common.conf "${1}.conf" >xsettingsd.conf
.
from xsettingsd.
Re previewing settings, are you specifically referring to font rendering? It's been a long time since I've looked at GTK+, but I think it always uses the settings that it picks up from XSETTINGS and other configuration sources, so I'm not sure that previewing is a possibility -- you might need to just update the settings and then see what apps look like. If you open a simple GTK+ app like gedit and then make changes to ~/.xsettingsd
and run killall -HUP xsettingsd
, does that let you see the changes?
Re adding a GUI for xsettingsd, it feels a bit out-of-scope to me:
- It would add a dependency on a toolkit like GTK+, Qt, or Motif, which is somewhat at odds with a desktop-environment-neutral XSETTINGS daemon.
- I suspect that most people who choose not to use GNOME, KDE, or another desktop environment that provides its own XSETTINGS daemon are already fairly comfortable editing config files.
Would it help if https://github.com/derat/xsettingsd/wiki/Settings had screenshots of text rendered using some common configs? The downside is that the same settings can result in different rendering depending on e.g. the version of FreeType that's installed.
from xsettingsd.
I am thinking about something like LXAppearance (https://wiki.lxde.org/en/LXAppearance), but instead of changing toolkit configuration files directly (like ~/.config/gtk-3.0/settings.ini
), it would change ~/.config/xsettingsd/xsettingsd.conf
.
It would present options (like icon theme, gtk theme, font, etc.) for the user too choose from, and show how they would look like when applied. If they are saved, then the configuration file is definitely changed.
Maybe one can just change LXAppearance to save the configuration to ~/.config/xsettingsd/xsettingsd.conf
from xsettingsd.
It would be a new optional application. Users can still directly edit the configuration file if desired.
It would be very helpful for those not using a desktop environment already providing ease ways to setting the configuration. There are plenty of window managers in this situation.
from xsettingsd.
It's hard to believe: is there really no better way than editing the conf file and then kill -HUP? I see that these settings also show up in xprop -root RESOURCE_MANAGER
but don't get updated dynamically (?). At least xprop -set exists, but it wouldn't be useful to set it that way unless something (like this daemon) was keeping the prop and the conf file in sync. And that's probably a bad idea for some reason. (As with everything on Linux it seems we have this too-many-fingers-in-the-pie problem.)
I know of at least two problems in Qt that XSettings might be able to solve: 1) dynamic theme switching (but the road is paved with what GTK does); 2) separate DPI per monitor: we're having a little debate about how to do it here: https://codereview.qt-project.org/c/qt/qtbase/+/376415
I was thinking of writing a tray application to switch the theme (because I want light/dark modes on my plain old openbox session), but am loathe to programmatically parse and rewrite ~/.config/xsettingsd/xsettingsd.conf and programmatically do the kill -HUP.
from xsettingsd.
Mainly to strike a blow for xsettingsd
as it is without a GUI:
It's hard to believe: is there really no better way than editing the conf file and then kill -HUP?
This depends a lot on the viewpoint. From my point of view, xsettingsd
is made and perfect for those who prefer a config file + their $FAVOURITE_EDITOR
over a GUI. And yes, there are a lot of us out there. Or said the other way 'round: Editing the configuration file and killhupping the daemon is the best way, at least from our viewpoint.
If you want a GUI, there are a lot of bloaty settings daemons with inflexible and IMHO cumbersome GUIs out there, be it from GNOME, Cinnamon, MATE or XFCE.
from xsettingsd.
I can think of a two good ways this could be implemented:
- Reload the configuration file upon receiving USR1
- Watch the configuration file using inotify (portability concerns)
from xsettingsd.
- Reload the configuration file upon receiving USR1
This has been supported since pretty much the beginning (using HUP
, not USR1
). See 3d25cd4.
from xsettingsd.
Related Issues (14)
- Compile errors HOT 8
- dump_xsettings produces settings that xsettingsd can't parse HOT 1
- Cursor size in OpenBox HOT 1
- Release HOT 2
- How force Gtk/DecorationLayout "icon:minimize,maximize,close" to Gtk/DecorationLayout "menu" HOT 3
- New release? HOT 12
- Cursor theme changes HOT 9
- Load settings from different config file HOT 2
- Changing font type/size? HOT 2
- 404 for https://developer.gnome.org/gtk/unstable/GtkSettings.html HOT 1
- opening apps slowly (Cannot transform xsetting) HOT 7
- locate, test and add more avilable xsettings as documentation HOT 7
- CharStreamTest.Basic test failure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsettingsd.