Declrarative quick settings
As creating quick settings from desktop files came up in #859 (closed) and !1359 (merged)
I said: i don't think desktop files cut it but I could imagine a simple "protocol" that allows people all kinds of binaries for simple "toggles". The information we need is:
- text for enabled state
- text for disabled state
- icon for enabled state
- icon for disabled state
- path to an "executable" (can be script or anything) to toggle the setting. With these options
-
enable
(to enter enabled state) -
disable
(to enter disabled state) -
state
(to query the current state) -
present
(to figure out if it makes sense to show the quick setting at all.
-
Stick that information in an ini style file in ~/.config/phosh/plugins/toggle-quick-settings
and have phosh parse that. The texts should be translatable so we could look into reusing what desktop files do here.