I have a laptop that I plug into a docking station on a daily basis. And almost every time, I need to modify my plasma-org.kde.plasma.desktop-appletsrc
, then do a plasma restart kquitapp5 plasmashell && kstart plasmashell
. As per this.
The problem I have, is that at one point, I could mostly automate this since typically I just needed to toggle the lastScreen value between 2 and 3 for one panel. Sadly something has changed in the last couple of months, and now, I need to modify lastScreen for both panels for my 2 external monitors, and the numbers can range from 0-4.
What I'd like to know, is if there is some way to determine which monitor is currently set to which number. Ideally it would be a command line value I could read programmatically to feed into a script. But even just a way to show the number on each monitor would save me time trying multiple combinations.
I'm running Kubuntu 18.04.
For info currently xrandr --listmonitors
shows:
Monitors: 2
0: +DP-1-2 1920/518x1200/324+0+0 DP-1-2
1: +DP-2-2 1920/518x1200/324+1920+0 DP-2-2
while my plasma-org.kde.plasma.desktop-appletsrc currently shows for DP-1-2
[Containments][54]
activityId=
formfactor=2
immutability=1
lastScreen=0
location=4
plugin=org.kde.panel
wallpaperplugin=org.kde.image
and shows for DP-2-2
[Containments][63]
activityId=
formfactor=2
immutability=1
lastScreen=4
location=4
plugin=org.kde.panel
wallpaperplugin=org.kde.image