The title is somewhat self explanatory. GTK apps will reload ~/.config/gtk-3.0/colors.css without restarting.
Details
- Reviewers
apol The-Feren-OS-Dev - Group Reviewers
Plasma
gtk-app-here --gtk-module colorreload-gtk-module
Diff Detail
- Repository
- R98 Breeze for Gtk
- Branch
- arcpatch-D24275_1
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 22595 Build 22613: arc lint + arc unit
$ gedit --gtk-module colorreload-gtk-module Gtk-Message: 17:44:24.968: Failed to load module "colorreload-gtk-module"
What am I doing wrong?
Does it work if you use an absolute path to the library? Go to $BUILDROOT/color-reload-module/libcolorreload-gtk-module.so and run gedit --gtk-module $PWD/libcolorreload-gtk-module.so
Does the module work if you use the meson.build I accidentally checked in? meson _build, ninja -C _build install (no sudo)
Unrelated to the issue: For GLIB2 we have a ECM find module that makes things a bit nicer. See https://invent.kde.org/snippets/601
For GTK we don't have one, but if we use it on at least one other place it might be worth making one
Edit: Of course we find GTK already in the very same project, so we can just use those variables. No need for pkgconfig here
This would also be loaded and operational when running in a gnome session. It's important we don't cause issues there.
Or are modules not autoloaded? If not what's our plan for having our users use this?
Does this work if colours.css doesn't exist and is then created at runtime?
color-reload-module/reloader.c | ||
---|---|---|
27 | What is this 801? |
Looking at documentation, the colour module should gracefully fail when it's unable to locate the colors.css, however I have not tested this.
color-reload-module/reloader.c | ||
---|---|---|
27 | GTK loads in the original colors.css at priority 800, so priority 801 will override it. |
Had to lower the cmake version requirement to be able to compile this, but this works just fine, and it's definitely something that'd be nice to have. I can't see any regressions nor leaks, either on this current patch version.
color-reload-module/CMakeLists.txt | ||
---|---|---|
2 | As noticed by @The-Feren-OS-Dev, this is too high. |
Since we plan to move more GTK related code to kde-gtk-config repo (specifically coloration of GTK apps from krdb), isn't it more reasonable to put this module in kde-gtk-config repo?