You are not logged in.
Hi!
My plasma panel is sort of annoying and always gets in the way (I have it on auto-hide, but it pops up for a few seconds every time after changing desktops and also often when I try to click on the bottom browser bar from firefox noscript and overshoot a bit -.-" ).
Is there a way to hide + unhide it with with a script (so I can bind it to one of my extra mouse keys with xbinkey and enable it ONLY when I really want it?)?
I tried to use xdotool, but the panel doesn't seem to have a distinct name or class (only the "plasmashell" class which it seems to share with 13 other "windows"). From what I can tell, it's not even a proper "panel" or "dock" as far as window manipulation tools are concerned?
Last edited by whoops (2018-09-30 12:55:26)
Offline
Finally figured out something for a workaround:
#!/bin/zsh
# Set panel visibility to "Windows can go below" in panel settings
# Find out Panel Dimensions with (clicking on it after):
# $ xdotool selectwindow getwindowgeometry
PANELDIMENSIONS="1920x86"
# Does conky too because why not
KILLCONKY=true
# find + rename panel on first run only
xdotool search ItsTehPanel || {
PANELID=$(
xdotool search Plasma |
while read WID; do
xdotool getwindowgeometry $WID |
grep -B2 " $PANELDIMENSIONS$"; done |
grep Window |
sed "s/.* //"
)
xdotool set_window --name "ItsTehPanel" $PANELID
}
[ -f /tmp/panelswitch ] || echo 1 > /tmp/panelswitch ]
if grep -q 1 /tmp/panelswitch; then {
xdotool search ItsTehPanel windowunmap
$KILLCONKY && killall conky
echo 0 > /tmp/panelswitch
} else {
xdotool search ItsTehPanel windowmap
$KILLCONKY && conky&disown
echo 1 > /tmp/panelswitch
}
fi... still looking for a cleaner solution.
edit: gave up looking for a cleaner solution => solved.
edit: looking again because xdotool has gotten extremely slow somehow T_T
Last edited by whoops (2018-09-30 12:56:06)
Offline