From dc0d32a1370c0f7f5356f1ac926e25f16a32ce1d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 12 Jan 2023 09:58:17 -0600 Subject: [PATCH] adding a script to hide and show plasma panel --- scripts/plasma-panel.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/plasma-panel.sh diff --git a/scripts/plasma-panel.sh b/scripts/plasma-panel.sh new file mode 100755 index 0000000..ac72cf5 --- /dev/null +++ b/scripts/plasma-panel.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +hiding=$(qdbus org.kde.plasmashell /PlasmaShell evaluateScript "p = panelById(panelIds[0]); print(p.hiding);") + +if [ $hiding == "none" ] +then + qdbus org.kde.plasmashell /PlasmaShell evaluateScript "p = panelById(panelIds[0]); p.hiding = 'autohide';" +else + qdbus org.kde.plasmashell /PlasmaShell evaluateScript "p = panelById(panelIds[0]); p.hiding = 'none';" +fi + +echo $hiding