System values for panel plugins with Xfconf

Graeme Gott graeme at gottcode.org
Fri Oct 22 19:55:43 CEST 2021


> Sorry for the great offtopic and not answering your question. :)

Quite alright! It's always a good thing to prod people to not patch 
things when there are alternatives. :)

>> But how are the distros able to ship defaults for the plugins?
> 
> In principle, if you don't allow multiple instances of the plugin, you
> could use a custom channel like xfce4-clipman
> (xfce4-panel/plugins/clipman) does,
> but if maintain multiple instances is a priority, I understand as you do
> that there is nothing to do it easy.. :S

Right now every Whisker Menu instance is separate. I had planned on 
making the Xfconf backend match in capabilities, but having only one 
custom channel like the clipman plugin is not a bad idea.

I know that some people put a Whisker Menu on each display in a 
multi-monitor setup, but I don't know if they want them to share their 
settings or not. The users who want the same favorites, etc, can always 
manually change them to match, and those that want different settings 
would continue to be satisfied.

> Distribution maintainers can set the entire panel by default, including
> plugin settings, since they know exactly which channel corresponds to each
> plugin (Maybe see xfce4-panel-profiles), but as you say, the configuration
> of multiple instances, they cannot set default options for new instances of
> a plugin.
> 
> The only thing I can think is maintain two channels, one for each instance
> of the plugin (xfce4-panel/plugins/plugin-#/*), and another as
> fallback (xfce4-panel/plugins/default/whisker/*).
> I think there are plugins that do fallbacks to rc files as you suggested.

That is the approach I had settled on. I just wanted to make sure I 
wasn't missing something.

I do like the idea of using "/plugins/default/whiskermenu/*" in the 
"xfce4-panel" channel for the defaults instead of a completely different 
channel like just using "whiskermenu". Having "default" in the property 
path also makes it clear what it is for. And if other plugins ever want 
to follow suit with their own defaults under "/plugins/default/*", they 
would all be grouped together.

Having a second channel would also allow users to fill in defaults 
themselves in their local Xfconf that would then be used by their 
multiple instances.

Thanks!

Cheers,
Graeme


More information about the Xfce4-dev mailing list