GNOME Bugzilla – Bug 756174
Add a tool to inspect all xsettings from the command line
Last modified: 2015-10-10 21:29:34 UTC
Created attachment 312805 [details] [review] Patch to add gtk-dump-xsettings Now and then I get bug reports from people who e.g. don't see the app menu even though my application checks the gtk-shell-shows-app-menu setting and handles a FALSE there appropriately, e.g. by showing the GMenu in an GtkMenuButton or in some other way. In those cases, I'd find it very useful if I could tell them to run gtk-dump-xsettings, check the gtk-shell-shows-app-menu value and complain to the developers of the respective desktop environment if it reports a wrong value there. Attached is a patch for such a tool, it simply iterates over the properties of the default GtkSettings object and prints their name and value.
Created attachment 312835 [details] [review] Add gtk-dump-xsettings Avoid some memory leaks. I've been told on IRC that there's supposedly some GDK_DEBUG value that I could use instead, but I've not found the correcnt one in the docs. Which one would that be?
will this actually give you the xsettings values, or the gtksettings defaults ? not sure if we need to enter the mainloop and wait for roundtrips to return before we get the xsettings back from the xsettings manager.
I can't try all of them, but changing e.g. the gtk-enable-animations setting using gnome-tweak-tool and then running gtk-dump-xsettings gives me the new value (FALSE, the default being TRUE). Same works for gtk-theme and gtk-application-prefer-dark-theme.
that would indicate that it works, I guess
Review of attachment 312805 [details] [review]: Looks good as a first cut. Please add a brief man page for it (eg see what I've done for gtk-builder-tool) It might be nice to allow querying individual properties, like so: $ gtk-dump-xsettings cursor gtk-cursor-blink TRUE gtk-cursor-blink-time 1200
Oh, one more thing: this doesn't look specific to xsettings at all, so the name is a bit misleading. How about gtk-query-settings ?
Created attachment 313010 [details] [review] Add gtk-query-settings Tried adding the manpage for it, but I'm not sure how to reall test that in a jhbuild shell :(
Attachment 313010 [details] pushed as 7aa2bfd - Add gtk-query-settings