Yabai: tiling window manager with support for spaces
https://github.com/koekeishiya/yabai/wiki#comparison-with-other-window-managers
Requirements of Yabai
- "System Integrity Protection (SIP)" must be disabled
- "Displays have separate spaces" must be enabled
Note
- Yabai allows you to switch to a different space without animation (great)
Disable the Mission Control Mappings and use this ~/.skhdrc
file with mappings as the OP wants:
ctrl - left : index=`yabai -m query --spaces --space | jq '.index'` &&\
if (($index != 1 && $index != 6 )) then\
new=$((index-1)); \
other=$(((new+5)%10));\
yabai -m space --focus "${other}"; yabai -m space --focus "${new}";\
fi
ctrl - right : index=`yabai -m query --spaces --space | jq '.index'` &&\
if (($index != 5 && $index != 10 )) then\
new=$((index+1)); \
other=$(((index+5)%10+1));\
yabai -m space --focus "${other}"; yabai -m space --focus "${new}";\
fi
# ctrl+1-5:
ctrl - 1 : index=`yabai -m query --displays --display | jq '.index'` &&\
if (($index == 1)) then\
yabai -m space --focus 6; yabai -m space --focus 1;\
else \
yabai -m space --focus 1; yabai -m space --focus 6;\
fi
ctrl - 2 : index=`yabai -m query --displays --display | jq '.index'` &&\
if (($index == 1)) then\
yabai -m space --focus 7; yabai -m space --focus 2;\
else \
yabai -m space --focus 2; yabai -m space --focus 7;\
fi
ctrl - 3 : index=`yabai -m query --displays --display | jq '.index'` &&\
if (($index == 1)) then\
yabai -m space --focus 8; yabai -m space --focus 3;\
else \
yabai -m space --focus 3; yabai -m space --focus 8;\
fi
ctrl - 4 : index=`yabai -m query --displays --display | jq '.index'` &&\
if (($index == 1)) then\
yabai -m space --focus 9; yabai -m space --focus 4;\
else \
yabai -m space --focus 4; yabai -m space --focus 9;\
fi
ctrl - 5 : index=`yabai -m query --displays --display | jq '.index'` &&\
if (($index == 1)) then\
yabai -m space --focus 10; yabai -m space --focus 5;\
else \
yabai -m space --focus 5; yabai -m space --focus 10;\
fi