I'm trying to make an app to switch your XFCE4-Panel's layout between 3 layouts. I applied those layouts and copied the XML file where Xfconf stores its configuration for the panel.
The general idea was that I could just remove the old file and copy over the new one. Only, that didn't work out so well. Something appears to be preventing me from changing the XML files without the use of xfconf-query
. I could just reset the panels every time, let the script set the values to how they should be, and restart the panel, but the configuration files are a bit big to do all that (I'm also experiencing a few problems with the content of the panel when using xfconf-query
).
So basically I want to know if there's a way to just apply the configuration of the whole XML file. Whether it's by killing some processes and quickly copying the files over, or by using something that automatically parses the XML file and sets all the values with xfconf-query
. I'm using Python (combined with Bash) if someone knows some kind of class that can do it.
I found the following to work, but it requires a panel restart which results in a short flicker:
or as one-liner for Python:
Restarting the panel will also restart the xfconfd daemon.
It works, but a better approach would be to use
xfconf-query
as this doesn't cause any flicker. You'd just have to figure out proper path-value pairs by parsing the XML file and apply them in one batch. Can't help you with that, sorry.