![]() Registered Member ![]()
|
I have single vertical KDE panel. When I switch from single monitor X screen back to triple monitor X screen (with xrandr) my KDE panel ends up on the right edge of middle monitor, instead of right edge of right monitor. I guess I need to use DBus to restore KDE panel position (programmatically move it to right edge of right screen), I tried googling, but it seems it is not very well documented. Is there DBus command to set position of KDE panel?
|
![]() Administrator ![]()
|
As far as I know, there isn't. It may be possible with scripting, but unfortunately I don't know much about how it works.
Have you tried to set your right screen as the primary screen? Something like
if you use xrandr.
Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts |
![]() Registered Member ![]()
|
I tried to set right screen as primary like you suggested:
But KDE panel still ends up on right side of middle screen after I switch back to triple monitors. I guess this is because when I switch to single monitor mode, only middle monitor remains, so KDE panel remembers its new position on it. When right monitor is available again, the panel still keeps its position on middle monitor. What makes this even worse, is that all maximized windows go under the panel because KDE panels only work properly when they are at edge of X screen. By the way, I wrote python script to save and restore geometry and state of all windows, it uses EWMH and XLib. Strange thing is, my script can store KDE panel position, but unfortunately it can't restore it. I decided to investigate why and found out that the panel seems to force its position many times per second, this is why it seems like it can't be moved programmatically. It is possible to reproduce the problem in shell with xdotool and wmctrl. Assuming you have KDE panel, first run "wmctrl -l | grep plasma-desktop" and play with "xdotool windowunmap $WID" and "xdotool windowmap $WID" to find which $WID belongs to your KDE panel. Then "xdotool windowmove $WID $x $y", where $x $y - new location for the panel. You will see that the panel will move to it briefly, but after some milliseconds will be forced back to where it was. Is there any reason to force panel's location many times per second instead of interpreting it like panel dragging with a mouse? I can move the panel with my mouse, so why not programmatically? It would be great if the panel could just stick to closest edge instead of being always forced to some manually predefined position. This way there wouldn't be a need for a special API for this. So now I'm thinking of what a workaround could be... Perhaps editing some config and then restarting plasma-desktop would allow to set KDE panel position? Any idea where the KDE panel stores its location?
Last edited by Liss on Wed May 28, 2014 8:07 am, edited 1 time in total.
|
![]() Registered Member ![]()
|
I figured it out. Panel position is stored here: ~/.kde/share/config/plasma-desktop-appletsrc so in my script before running xrandr I save version of plasma-desktop-appletsrc for triple or single monitor state, run "kquitapp plasma-desktop", switch to triple or single monitor mode, replace current plasma-desktop-appletsrc accordingly, then "plasma-desktop &> /dev/null&". And now I have KDE panel where it should be every time.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]