How do I move a KDE plasma panel, from commandline/scripts?

7

3

I Have a script that change my desktop layout using xrandr, but I also want to move my Panel.

So far I played round with kwinscripts, using
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.showInteractiveConsole

If i move it using the mouse, the panel.screen changes between 0 and 2, but the script row panel.screen = 2 don't set it to 2, it stays, but panel.location='bottom' works fine.

var panel = panelById(panelIds[0])
print('before, panel.screen: ');
print(panel.screen);
panel.screen=2;
//panel.location='top';
panel.location='bottom';
print('after, panel.screen: ');
print(panel.screen);

Why isn't panel.screen=2; working?, and what else can I do to move it?

Puggan Se

Posted 2016-05-26T12:06:45.250

Reputation: 278

Having the same issue here... Did you find any solution to this? – Laimoncijus – 2016-08-19T06:14:20.680

@Laimoncijus: not a good one, as long as i have all 3 monitors connected, I can still move it using the mouse, and when I move my laptop, I can add an extra default panel on an active monitor. – Puggan Se – 2016-08-24T10:04:21.430

Looking for the same... I use i3wm as my WM + plasmashell, when I disconnect the monitor where the panel is, I cannot restore on the laptop monitor... Quite frustrating – tmow – 2019-08-23T07:08:24.120

Found this https://www.reddit.com/r/kde/comments/9d10na/how_can_i_restore_missing_panel_widgets_in_kde/ that is a quite useful workaround. cc @PugganSe

– tmow – 2019-08-23T08:58:17.103

No answers