Tint2 fullscreen dual monitors

Hi!

I have a dual monitor setup - Upper is External and lower is Lappy

I want the Tint2 panel to be on the Lappy, at the top

However, if I do this with Tint2 Settings > Panel - ‘Maximised windows’ set to the default ‘Match the panel size’ then maximising a window on the upper, external monitor gives me this (doesnt maximise properly - only occupies lower strip of upper monitor):

If I do this with ‘Maximised windows’ set to ‘Fill the screen’ then maximising a window on the lower, Lappy monitor (unsurprisingly) gives me this (covers panel):

It seems this is expected behaviour,

but is there any way around this - to get maximised to full screen on upper monitor and only until panel (leaving panel visible) on lower monitor)?

Putting the panel on the edge and not the top of the lappy screen does work as indicated - but I dont want this :slight_smile:

Cheers

You can try this:

panel_pivot_struts = boolean (0 or 1): Defines if tint2 lies to the window manager about its orientation (horizontal vs vertical) when requesting reserved space with STRUTs (seestrut_policy` below). On some window managers, this allows placing a panel in the middle of the virtual screen, e.g. on the bottom edge of the top monitor in a vertical dual-monitor setup.

tint2 configuration

2 Likes

What window manager are you using?
Have you tried the wm’s settings?

2 Likes

Thanks but no luck
That is the same as the ‘Pivot Reserved Space’ option which results in maximising a window on the bottom Lappy screen to (left) half screen

Thanks
Open Box
There is a ‘margins’ tab in obconf but I cant see how you can apply it only to one monitor (My external monitor has no panel and so I dont want a margin there)

Unless I have got the wrong end of the stick and thats not what you meant?

Its not the end of the world as all it means is windows maximised on the lappy monitor have their title bar hidden by the panel, which optimises screen space and if I want to close / minimise etc I can use the [S]+Q etc shortcuts

Here is a post from this BL forum thread.. Note that user o9000 is the main tint2 developer.

Openbox (and fluxbox) treat the second monitor as an extension of the desktop (extended desktop), not a separate entity, so you are trying to put the titn2 panel across the middle of the extended desktop. Also why you can’t have separate margins for each monitor, or different desktops on each monitor.

Are you using xrandr to set up the dual monitors? If so, what is the command you’re using?

3 Likes

I couldnt see it in the setting in obconf and I dont know how else to do it :slight_smile:

In my .xprofile:

# Monitors
(sleep 1 && xrandr --output eDP1 --mode 1366x768 --pos 277x1080 --output HDMI1 --primary --mode 1920x1080 --pos 0x0) &

So, looking at that post of o9000 in your link I am trying to do something I shouldnt

So I need to chose between the options of

  1. Panel @ top of top monitor,
  2. Panel @ bottom of bottom monitor,
  3. Panel @ top of bottom monitor and accept that panel will cover title bar of maximised window on bottom monitor

I will try them all and see which one I like best, prob 1. as I had before

Actually I like 3. as its the same as automatically removing decoration to give more screen area on maximising a window on the smaller Lappy screen :smiley:

So I think you have solved my question - thanks!

EDIT: I want the panel at the top of the bottom screen as when I am using my Win10 VM in fullscreen I do so on the upper monitor and it covers any panel on that monitor. With it on the bottom screen I can always see it. I just don’t like panels on the bottom of a screen - no idea why :slight_smile:

2 Likes

That appears to be the case.

Are your monitors actually vertically spaced on your desk so that the external is above the laptop?

I’ve never tried this, but maybe you can use xrandr to have the laptop as the primary monitor and the external set to be to the right (although in real office space it sits above the laptop). Then your tint2 panel can be at the top of your laptop but not extend across to the external monitor. Although, you probably couldn’t drag a window/mouse vertically to the other monitor, you would have to go left-right; that would be weird.

That’s how I’m set up - two 1920x1080 monitors side-by-side, tint2 on the primary monitor.

1 Like

Yup, External is mounted above lappy screen
[EDIT: That is an old setup in terms of panel etc]

I am totally used to, and like this, so that I intuitively move mouse from one to other
Moving from left to right or vice versa to go up will bamboozle my pea-brain

Honestly, I now think my current set-up is perfect
Its a trick to be happy, once you know you cant have something else, persuade yourself that what you have is the best anyway
I started that at a young age swapping ‘dream car’ from an E-type Jag to a ropey old '71 crossover VW camper

Thanks for help - I larned sommat neuw today

1 Like

You can try autohiding the panel.

1 Like

Tried that too - works but I prefer it to be constant so I can see the time

I’m a fussy bugger, aren’t I

1 Like

Took a while to track this down. It’s one of the Openbox Actions.

GrowToFill

Grows the window in every direction but doesn’t go across any edges until all edges touch something else.

and it appears to be a built-in modification of GrowToEdge.

You can set up a key binding that will cause the active window to GrowToFill. Since Openbox is treating tint2 as a window/panel across the middle of your extended desktop, the active window should stop growing when it reaches the edge of tint2 so you won’t lose the decor under your panel.

One limit is that it the window you want maximized may need to be the only open/non-iconified window otherwise it will stop at the edge of other windows.

The other option (probably the better one) is the MoveResizeTo action. Do some basic math with the width of your tint2 panel and you can MoveResizeTo the active window so that it moves to the upper left corner and occupies the necessary percentage of the screen. For example, in my rc.xml, I use the number pad for faux tiling. I have this binding:

    <keybind key="C-A-KP_5">
      <action name="MoveResizeTo">
        <!-- adjust a window's height -->
        <width>80%</width>
        <height>95%</height>
        <x>center</x>
        <y>center</y>
      </action>
    </keybind>

That centers the window and expands it to occupy 85% of the width and 95% of the height.

Take a look at those window actions; openbox is really flexible and there are a lot of other options to size a window other thatn “Maximize”. Any action can be bound to keys or the mouse.

3 Likes

Thanks!
Your patience is amazing :+1:

GrowToFill indeed grows to the edge of the panel, but to the edge(s) of any open window(s) and/or conky
(this isnt an option in obkey so I edited my rc.xml file in an editor, as I guess most people do anyway)

MoveResizeTo is the answer!

For my 768 pixel high Lappy screen with a 30 pixel high panel the following worked a treat!
( <y>-0</y> is to put it at the bottom of the screen)

<keybind key="S-W-F11">
      <action name="MoveResizeTo">
        <!-- adjust a window's height -->
        <width>100%</width>
        <height>96%</height>
        <x>center</x>
        <y>-0</y>
      </action>
    </keybind>

By the way, after editing rc.xml is openbox --reconfigure the preferred equivalent to ctrl+shift+R in i3 to apply changes?

Yes, that’s the equivalent openbox command.

Map that to a keybinding. There is an example for Reconfigure and Exit on that Actions link.

2 Likes