You are not logged in.
Pages: 1
I want to do such thing: on mouse hover panel plugin - I want to hide this plugin and show another on its place. I put xfce4-windowck-plugin (window title) on panel, but when move mouse to window title - I want to show xfce4-taskbar-plugin. I tried to do this with 2 differrent panels - first is fixed and second with "autohide" option, but when I click on static panel - second "autohiding" panel hides behind it and does not show any more. So I cannot solve it with 2 panels. Any ideas?
Last edited by chkur (2015-07-01 20:32:40)
Offline
I found workaround - show/hide 2 panels with hotkey. I modified script from post https://forum.xfce.org/viewtopic.php?pid=34330#p34330:
#!/bin/bash
# Wait for all panels to load
while [ "$(wmctrl -l | grep -c xfce4-panel)" -lt "3" ];
do
sleep 0.05s
done
# Determine identifiers for toggled panels
ID=$(wmctrl -l | grep xfce4-panel | sed 3p | awk '{ print $1 }' | head -1)
ID2=$(wmctrl -l | grep xfce4-panel | sed 3p | awk '{ print $1 }' | tail -1)
# Toggle panels z-indexes
wmctrl -i -r $ID -b toggle,above
wmctrl -i -r $ID2 -b toggle,above
And assigned hotkey for it. Problem is solved.
Last edited by chkur (2015-07-01 21:29:03)
Offline
After reboot script does not work - it brings to front one panel for the first time, but does not toggle it back.
Offline
Seems to me that your script will always toggle panel with $ID2 above the other regardless. Why not just toggle the above status of the one panel only?
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
Really I use 3 panels (2 at top - which I want to toggle) and one at left. But wmctrl -l shows me 4 lines for xfce4-panel. Now, for example:
0x01600004 -1 trusty xfce4-panel
0x01600033 -1 trusty xfce4-panel
0x01600036 -1 trusty xfce4-panel
0x0160003a -1 trusty xfce4-panel
I think - yesterday panels what I needed were randomly first and last. But after restart these panels are at another positions. I dont know which 2 I have to select today. If I toggle one panel only - it toggles once only. Maybe yesterday I toggled one panel one time manually and then one panel was with above=true and another panel with above=false and I toggled them.
Offline
Yes, that will be problematic.
wmctrl also has a "-G" parameter that can be added to "-l" that might help to identify the panels. If the two panels that you want to to toggle share the same geometry and this geometry is different from the other panels, then you can us the -G option and grep for the geometry values to filter them out.
Try:
wmctrl -lG | grep xfce4-panel
...to see what displays and if it might be helpful.
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
wow, thankx - it might be helpfull. I'll try to rewrite script. But what can it be?
0x01600036 -1 -9999 -9999 48 744 trusty xfce4-panel
Offline
Last version of scripts:
1st is for bring main panel to top by default - run once (autostarts with user session)
#!/bin/bash
# Wait for all panels to load
while [ "$(wmctrl -l | grep -c xfce4-panel)" -lt "4" ];
do
sleep 0.05s
done
# Determine identifier for main panel
ID=$(wmctrl -lG | grep '1366 25 trusty xfce4-panel' | sed 3p | awk '{ print $1 }')
# Bring main panel to top
wmctrl -i -r $ID -b add,above
2nd is for toggle panels (set hotkey for it)
#!/bin/bash
# Wait for all panels to load
while [ "$(wmctrl -l | grep -c xfce4-panel)" -lt "4" ];
do
sleep 0.05s
done
# Determine identifiers for toggled panels
ID=$(wmctrl -lG | grep '1366 25 trusty xfce4-panel' | sed 3p | awk '{ print $1 }')
ID2=$(wmctrl -lG | grep '915 24 trusty xfce4-panel' | sed 3p | awk '{ print $1 }')
# Toggle panels z-indexes
wmctrl -i -r $ID -b toggle,above
wmctrl -i -r $ID2 -b toggle,above
Offline
You probably don't need:
# Wait for all panels to load
while [ "$(wmctrl -l | grep -c xfce4-panel)" -lt "4" ];
do
sleep 0.05s
done
...this section in your second script since all the panels will already be loaded.
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
Pages: 1
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 564.23 KiB (Peak: 581.51 KiB) ]