EwmhBaseStruts in a multi-monitor setup

Hi all,

I’m currently running a 3-screen setup; a laptop screen that is the primary, and then to the right of that, two normal monitors. I have the config line EwmhBaseStruts 0 75 0 0 to reserve space on the right, but it doesn’t let me choose which screen. I keep my clock and pager on my primary (laptop) screen, but the space is reserved on the right-most monitor. Is there a way change it to the left-most monitor?

Or is there a better way than EwmhBaseStruts to ensure applications don’t cover that portion of the monitor?

Cheers,

Cluracan

Hi @Cluracan,

FVWM2 doesn’t have per-monitor EWMHBaseStruts settings (FVWM3 does).

In FVWM2, you could write a function which checks which screen the window to be maximized is on, and apply limits manually, a la:

DestroyFunc Foo
AddToFunc   Foo
+ I PipeRead `[ $[w.screen] = 1 ] && echo "Maximize 100 9"`

HTH,
Thomas

Hi @thomasadam,

Thanks for the reply. If I understand you correctly, once the function is defined, I’d replace the call to Maximize I’m currenly using with a call to the function, right? And the bits between the is shell script? So I’d look there for the syntax of what I’m trying to do? I presume your example is something like “If the screen # is 1, then send ‘Maximize 100 9’ as the command back”; I’d need to include an else section for not screen 1, then send ‘Maximize 100 100’.

Cheers,

Cluracan

Hi @Cluracan,

Yep, you’ve understood correctly! :slight_smile:

Kindly,
Thomas

Took a little while, but this seems to work. For some reason that I can’t understand, it didn’t like the ==, I had to use a single =.

DestroyFunc MultiMonitorMaximize
AddToFunc MultiMonitorMaximize
#+ I Exec exec xmessage "w.screen equals $[w.screen]"
+ I PipeRead `if [ $[w.screen] = 0 ]; then echo "Maximize -75p 100"; else echo "Maximize 100 100"; fi`

Thanks so much for your help :slight_smile:

Cheers,

Cluracan