[openbox] Prevent windows off screen?

Mikael Magnusson mikachu at gmail.com
Fri Sep 9 17:04:00 EDT 2016


On Fri, Sep 9, 2016 at 10:46 PM, Miles <miles.crawford at gmail.com> wrote:
> As I connect and disconnect external monitors and projectors, my
> windows become inaccessible, larger than the monitor, or partially offscreen
>
> Is there any way to have openbox automatically resize and/or translate
> windows to stay entirely on the screen?
>
> Thanks!.

If you reconfigure your viewport with randr, then openbox will move
any offscreen windows offscreen. Merely unplugging a monitor won't
have any effect though.
Eg what I use (probably somewhat antiquated but you get the idea),
crton)
xrandr --fb 1680x2074 --output DVI-D-0 --pos 0x0 --mode 1280x1024
--output DVI-I-1 --pos 0x1024 --mode 1680x1050
;;
crtoff)
xrandr --fb 1680x2074 --output DVI-D-0 --off --output DVI-I-1 --pos
0x1024 --mode 1680x1050
;;
crtdisabled)
xrandr --fb 1680x1050 --output DVI-D-0 --off --output DVI-I-1 --pos
0x0 --mode 1680x1050
;;

Only the last of these would make openbox move any windows around,
because the actual server workspace gets smaller.

-- 
Mikael Magnusson


More information about the openbox mailing list