How to switch between desktop layouts by shortcuts

is there any way to switch between those without opening the settings window?

1 Like
qdbus org.kde.plasmashell /PlasmaShell evaluateScript "setDesktopLayout('FolderView')"
qdbus org.kde.plasmashell /PlasmaShell evaluateScript "setDesktopLayout('Desktop')"

You could put those into bash scripts, name them ‘foldv’ and ‘deskv’ and put them in your $PATH (~/usr/bin would do) to execute that from krunner - or bind them to a keyboard shortcut…

However, you’d have to restart plasma to get them to take effect (he says, testing…).

prestart:
systemctl --user restart plasma-plasmashell.service

So we end up with:

#!/bin/bash
qdbus org.kde.plasmashell /PlasmaShell evaluateScript "setDesktopLayout('Desktop')"
systemctl --user restart plasma-plasmashell.service
#!/bin/bash
qdbus org.kde.plasmashell /PlasmaShell evaluateScript "setDesktopLayout('FolderView')"
systemctl --user restart plasma-plasmashell.service
4 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.