Took your mac to the next level with yabai and skhd !
Introduction
In this article I will comeback on a recent experience I had with my macos. I was thinking if I could get any faster with the switch between spaces (desktop), and can it be configurable easily with hotkey ?
Introduce to you yabai ! A window management utility for macos, and with the combinaison with skhd to be able to configure hotkey, your experience will be way faster.
The result
The goal here is to never use the mouse to switch from different spaces. We will now see how to install and configure yabai.
Installation yabai
First you will need to install yabai via:
brew install koekeishiya/formulae/yabai
Then start the service:
yabai --start-service
This will prompt the user to allow yabai accessibility permissions. Check the box next to yabai to allow accessibility permissions.
Then use again:
yabai --start-service
yabai need root level to perform operation on the Dock.app you will need to add some config in the file /etc/sudoers :
sudo vim /etc/sudoers
Add this at the end of the file:
Don't forget to replace <user>, <hash> and <yabai> via all the command above.
For more details about the yabai installation take a look of the wiki page.
Subscribe to Etienne Théodore
Don’t miss out on the latest articles. Only one email by week about Flutter/Dart (no-spam)
You be prompt to accept some privacy setting then re-start skhd.
skhd need to be configurate to work properly. If you want more detail about it take a look of the github of skhd
The configuration of skhd
Like yabai you will need to create a file named:
$HOME/.config/skhd/skhdrc
Then put this into:
Like you can see in the file, you can custom your own hotkey. For example something I like to use is shift + alt - m to maximize the current windows. Take your time to see what you can do and feel free to change any hotkey.
For switching between space I use ctrl - 1 to go to the first space etc... That allow me to change between my different workspace really fast.
Conclusion
You will never use your trackpad or any mouse or alt+tab anymore to find your apps. Organise your space one time then switch fast between them. With the combinaison of neovim you will never quit your keyboard ! Thanks for reading this article, feel free to follow me on X for more tips/article during my dev journey.
Subscribe to Etienne Théodore
Don’t miss out on the latest articles. Only one email by week about Flutter/Dart (no-spam)