Keep monitor=0 the same display

The standard panel of LXDE - http://wiki.lxde.org/en/LXPanel
Locked
HarriKnox
Posts: 1
Joined: Sat Nov 05, 2016 5:50 am

Keep monitor=0 the same display

Post by HarriKnox »

Salutations!

I'm having an issue with LXPanel and keeping it on the same display when I connect/remove my second monitor. I have a laptop and a second monitor placed to the left. Normally I use my laptop as a desktop, connected to the monitor, and LXPanel appears where I want it on the laptop screen. Sometimes, however, I take my laptop with me and don't bring the second monitor and LXPanel acts up.

Even though I have my laptop screen set to my primary monitor in xrandr with --primary it's still monitor 1 when I have the external monitor connected. For normal use this is fine, I just set in the config file monitor=1.

When I disconnect them, however, the laptop screen is now monitor 0. LXPanel is now trying to open on monitor 1, which doesn't exist. To remedy this, whenever I use my laptop without the monitor I edit the config file so it's monitor=0 and restart LXPanel.

This is effective until I plug the monitor back in, and now LXPanel is on the second monitor (which is now monitor 0) and not the laptop screen (which became monitor 1). Then I need to edit the config again. To add to that, when LXPanel is on the second monitor it doesn't reserve the space on that screen (so maximized windows will go behind it), but will reserve space on the laptop screen (so maximized windows have an open space beneath them).

Is there a way to keep my laptop screen (display LVDS1) always monitor 0, or to make the xrandr primary display matter to LXPanel? I'd like to not need to manually edit the config every time I log in or change my workstation layout.

Thanks
- Harri
Locked