conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.34k stars 97 forks source link

Spectrwm ignores region setting on initial startup #424

Closed rmboggs closed 11 months ago

rmboggs commented 3 years ago

Hi,

I running OpenBSD 6.8-current on my laptop but have been noticing this behaviour for some time. My .spectrwm.conf has the following region so I can use xstatbar at the bottom:

region = screen[1]:1280x785+0+0

However, when spectrwm starts for the first time after a system reboot, it uses the entire screen (in my case 1280x800). I can tell this because the bottom part of programs touch the bottom part of the screen. But once I restart spectrwm.conf using MOD+Q, the screen resets to the expected region specified in my config file until I shut off my machine.

Please let me know if you need more details.

LordReg commented 3 years ago

If a change to the screen/monitor configuration is detected after spectrwm starts, the regions will be automatically (re)created. If the resolution is set automatically or via xorg.conf, perhaps a sleep before exec spectrwm might help.

rmboggs commented 3 years ago

sleep 2; exec /usr/local/bin/spectrwm seems to be the work around. However, is there a better fix for this in the future?

LordReg commented 3 years ago

The screen/resolution just needs to be configured before spectrwm starts. Is the screen being configured automatically or did you set it via xrandr/xorg.conf/etc? Besides that, improved bar support/automatic allocation of space will be the better fix.

rmboggs commented 3 years ago

Automatically. I haven't touched xorg.conf for a long time on my OpenBSD systems and I haven't setup anything that runs xrandr. I just have a few programs execute in the background before calling spectrwm but that is it to my knowledge. They are listed below:

Let me know if you need more information.

LordReg commented 3 years ago

Anything that may cause the screen/resolution to be changed after exec spectrwm? display driver? The region option primarily exists for situations where RandR is unsupported or disabled. You could try manually configuring your screen in xorg.conf and/or disabling the RandR extension.