You are not logged in.
Pages: 1
Hey,
How can I change the stacking order of xfce4 panels?
I tried changing the order in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml but that doesn't work, the file reverts when I xfce4-panel -r
Cheers,
Michael
Last edited by michja (2017-10-31 10:56:39)
Offline
Hello and welcome.
You can't change the stacking order easily. I believe they are stacked in the order they created, by the panel number.
I tried changing the order in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml but that doesn't work, the file reverts when I xfce4-panel -r
This is because the settings are saved in memory by xfconf. Try editing the file when you are not logged in. Also make sure xfconf isn't still running when you log out (ps -ef | grep xfconf). If it still is, kill the process (known issue when running under systemd).
.
Another option you could use is wmctrl and a custom autostart script that pushes a certain panel or panels to the back (or brings them to the front). For this to work, you would need to have different panel geometries. Consider the following:
wmctrl -lG | grep xfce4-panel
...will list all the existing panels (plus the main panel instance). The 'G' in the wmctrl command displays the panel's geometry. Assuming that the panel you want to effect has a geometry of '136 15 160 32' (x, y, width, height), you could pick it out via:
wmctrl -lG | grep xfce4-panel | grep "136 15 160 32"
...and get it's WindowID via:
wmctrl -lG | grep xfce4-panel | grep "136 15 160 32" | awk '{print $1}'
Now, wmctrl lets you change the stacking order by sending a particular window to the front or to the back via the '-b add,above' or '-b add,below' parameters using the template "wmctrl -i -r <WIN> -b add,below".
Knowing the target panel's WindowID from the previous command, we can embed that command to retrieve the WindowID and send that panel to the back with a command like:
wmctrl -i -r $(wmctrl -lG | grep xfce4-panel | grep "136 15 160 32" | awk '{print $1}') -b add,below
You can put this command in a script (possible with a short delay to allow the panels to display on the screen) to change the stacking order:
#!/bin/bash
sleep 2
wmctrl -i -r $(wmctrl -lG | grep xfce4-panel | grep "136 15 160 32" | awk '{print $1}') -b add,below
Make the script executable and add it to your autostart entries.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Awesome. Option #1 sounds good.
Thanks
Offline
Pages: 1
[ Generated in 0.008 seconds, 8 queries executed - Memory usage: 521.21 KiB (Peak: 522.05 KiB) ]