Hello, I am trying to find a method to simply hide/show the main panel with a hotkey. I have tried using the options to hide the panel when a window covers it, but I run into issues with it popping up as I interact with the bottom of my screen. I’m sure there is a simple way to achieve this but I can’t seem find it. I am running KDE plasma 6 /w Fedora 40.
Exactly what I’m looking for. It’s in my way constantly and I have an OLED panel on my laptop so I like to keep it hidden, but cannot outside of deleting it or dealing with it popping up constantly
“Another niggle I have with it is that, as far as I know, there’s no way to disable activation of the panel when your mouse pointer makes contact with the screen edge.”
That is the thing we are looking for: remove mouse interaction and ONLY bring up the auto-hide panel with a hotkey. The windows key would be ok with me. Right now it is set to bring up the start menu launcher but the entire panel would be great.
I suppose a script, with a hotkey assigned to it, could do the trick.
You would have to search for it, but, for example “set panel to autohide” from command line would be something like: qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript “panels()[0].hiding = "autohide"”
Set the panel to “not hidden” would be something like: qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript “panels()[0].hiding = "null"”
So, once the correct or wanted command is found, you could make a script ( preferably with a case variable, a switch so to speak) for it and assign a shortcut for it.
Dunno if it’s my computer, some ( hardcoded minimal panel height)setting or a bug. But making a panel from command line with a negative height ( or 0 for that matter) results in a panel of a few mm’s heigh and at that point you can’t use any other command like, for example, 40 height. That seems to be the case with some kwinscript and a hotcorner panel toggle. Only the autohide command results in a totally hidden panel. And only the autohide command allows a hiding=“null” command to show it again.
Yes this changed some time ago, if I recall correctly they added some kind of check/limit to the panel thickness, making those toggle panel scripts useless. I wonder if there is a way to bypass that…
Ah, I see. Myeah, that leaves the “autohide” as the only option to completely hide it. Of course, then it misses the entire point of not accidentally showing it when the mouse pointer should hover over the area.
Hi, I made a quick and hacky method to solving this for kde 6, you have to reduce the minimum length (width of the panel) to be negative, set the length to be 0, and then offset it by -10 (or any large negative integer). (I can’t post the link to my github repo for my script)
#!/bin/bash
# Get the current hiding status of the panel
panel_stat=$(qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "print(JSON.stringify(panels()[0], null, 4))" | grep '"hiding"')
# Print the exact panel status for debugging
echo "Panel status: $panel_stat"
# Check if the panel is in "none" hiding mode
if [[ "$panel_stat" == *'"hiding": "none"'* ]]; then
echo "Panel is in 'none' mode, switching to 'autohide'"
# Set panel to autohide
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.hiding = 'autohide';"
sleep 1 # Wait 1 second to let the panel update
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.height = '-1';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.lengthMode = 'custom';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.minimumLength = '-100';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.length = '-100';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.offset = '-1000';"
else
echo "Panel is not in 'none' mode, setting to 'none'"
# Set panel to always visible (none)
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.height = '22';"
sleep 0.5 # Wait 1 second to let the panel update
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.lengthMode = 'fill';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.minimumLength = '1327';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.offset = '0';"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "p = panelById(panelIds[0]); p.hiding = 'none';"
sleep 1 # Wait 1 second to let the panel update
fi
The latest version of my widget Panel Colorizer (2.0.0) can do this. It needs to be added to a panel to configure its appearance and behavior.
There are two ways it can be used:
Creating two presets with the Stock panel settings > Show/Hide toggle enabled and disabled, then binding those to Preset Auto-loading condition like fullscreen (hides) and normal (shows).
The other way is manually swapping these presets using D-Bus as described in the README or more advanced by just toggling the specific setting without needing to create presets:
# hide all
dbus-send --session --type=signal /preset luisbocanegra.panel.colorizer.all.property string:'stockPanelSettings.visible {"enabled": true, "value": false}'
# show all
dbus-send --session --type=signal /preset luisbocanegra.panel.colorizer.all.property string:'stockPanelSettings.visible {"enabled": true, "value": true}'
How does this work?
It toggles the visible property of the window containing the panel, effectively acting as if there was no panel on the screen, the popups on the hidden panel can still be activated and will spawn as if the window was still there but aside from that it seems to work as I wanted.
It should be easier on Plasma 6 — (Right-click on desktop) Enter Edit Mode >> (right click on main panel) Show Panel Configuration >> enter a keycombo shortcut on Focus shortcut (I assigned Meta+` to mine) and Close. That’s to display the Autohide panel without the mouse.