slam / yabaictl

A wrapper around yabai for better dual-monitor support
8 stars 2 forks source link

Support Three Displays: Left - Center - Right #2

Open kiryph opened 2 years ago

kiryph commented 2 years ago

Is it possible to extend yabaictl to support also three displays aligned horizontally? Screenshot 2022-07-20 at 16 15 29

        2 => {
            // This is the arrangement for two monitors with the one on the
            // right as primary:
            //
            // Right monitor:
            //
            // reserved s2 s4 s6 s8 s10 <= yabai space labels
            // Desktop1 D2 D3 D4 D5 D6  <= MacOS Desktop
            //
            // Left monitor:
            //
            // s1 s3 s5 s7  s9
            // D7 D8 D9 D10 D11
            //
            // With this arrangement, s1 and s2 form a single composite desktop,
            // so are s3 and s4, s5 and s6, and so on.
            //
            // The `focus_space` subcommand would switch two monitors in unison
            // as a single desktop.

Following the comment, the yabai space labels

become composite desktops.

However, I am not sure how the yabai space labels should be assigned to the macOS spaces.

I have made the central monitor the primary and the macOS space labels are as following

Central monitor: D1-D6 Right monitor: D7-D11 Left monitor: D12-D16

One possibility would be:

            // Central monitor (primary):
            //
            // reserved s2 s5 s8 s11 s14 <= yabai space labels
            // Desktop1 D2 D3 D4  D5  D6  <= MacOS Desktop
            //
            // Left monitor:
            //
            // s1  s4  s7  s10 s13
            // D12 D13 D14 D15 D16
            //
            // Right monitor:
            //
            // s3 s6 s9 s12 s15
            // D7 D8 D9 D10 D11

Affected methods:

macOS version 11.6.6 Big Sur