8

Is there a DBus command (or some other way from the command line) to toggle auto-hide on a panel in KDE Plasma? (I'm running KDE 4.6.)

I have a game I run in WINE that doesn't work right if it's autohidden and it would be nice to run it from a script that takes care of that for me.

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Patches
  • 16,572

5 Answers5

3

As of July 2018, the answer suggested by @che doesn't work.

Here is something that does work though:

qdbus org.kde.plasmashell /PlasmaShell evaluateScript "p = panelById(panelIds[0]); p.height = 32 - p.height;"    

32 is the height I like. Set that to a different number as you like.

Relevant KDE Bug: https://bugs.kde.org/show_bug.cgi?id=396796

2

You can do it easily through plasma desktop scripts, like this:

auto-hide on:

var panel = panelById(panelIds[0])
panel.hiding = 'autohide';

auto-hide off:

var panel = panelById(panelIds[0])
panel.hiding = 'none';

The bad news is there is no way to programatically run the script when you want it except perhaps for some kind of keyboard+mouse automation.

The closest you can get (per this discussion on KDE forum) is open the script in desktop console via

qdbus org.kde.plasma-desktop /MainApplication \
    loadScriptInInteractiveConsole /path/to/js/file

There is bug #238817 in KDE Bugzilla filed on this.

che
  • 286
0

There is a kwin script that toggle panel

https://www.opendesktop.org/p/1266534/

and

https://www.opendesktop.org/p/1269113/

We can also add more feature to a panel by setting it up in (KDE System Settings - Window Manager - Window Rules - New - Detect Window Properties "And select your pannel"

intika
  • 1,383
0

It is not necessary to run any script to hide the Plasma Panel.

There is a setting in System Settings that enables Full screen windows to be navigated away from, without taking the window out of Full Screen mode.

In System Settings → Work Space Behaviour → Screen Edges there are three check boxes at the top of the screen

Maximise Windows dragged to top edge

Tile Windows dragged to left or Right Edge

Behaviour: Remain Active when Windows are Full Screen

This last one when checked seems to allow Windows to be Full screen (which is what I want for my VM Windows) with the ability to switch to other desktops when desired. So this will work for any case where you require the Panel be hidden, but also wish to navigate to other workspaces.

adele
  • 9
-1

I think you should check Re: Documentation for the dbus methods for plasma and for some example of how to use dbus Lauching K menu with DBus.

If a method is present it will easy to find.

dvd
  • 220