A macOS Workspace With a Tiling WM

Update: Development of chunkwm has ceased in favor of yabai. It's recommended you now use yabai for your macOS tiling needs.

0: Prelude

I speak for myself: The softwares and configurations I present here work great for my workflow but may not necessarily carry over to yours. I encourage you to use this article as one perspective to pick-and-choose from in your configuration development.

Learning curve: All the tools I mention here have a learning curve, the magnitude of which varies but is largely due to learning keybindings. I will say that once one learns to work with vim effectively, most other keyboard-based softwares are fairly easy to pick up, as many have similar semantics to vim. Tips from personal experience can be found in section 3.1.

0.1: Motivation

I work on a 15" 2016 MBP. It's a really nice machine I was fortunate enough to buy with scholarship money a couple years back, and does nicely pretty much everything one buys a Mac for.

As I've become more productive, I've increasingly turned to power tools like vim, tmux, and most recently, chunkwmA tiling window manager for macOS. chunkwm in particular has been a big jump for me in terms of productivity and workspace aesthetic. This post discusses my macOS configuration, motivated by my setup of chunkwm.

My configuration files are available on GitHub at ayazhafiz/hmcd.

0.2: Screens

neovim start screen

neovim in tmux, chunkwm-tiled windows

ranger in tmux, qutebrowser

1: chunkwm and skhd for tiling windows

First, a definition - tiling window managers organize windows in compartmentalized buffers on a desktop, and often support handling windows on multiple desktops and monitors. I find this management useful for multitasking because the wm will automatically attempt to place new windows in an optimal spot, with the user having to adjust window sizes and locations only ad-hoc. A side effect of these managers is the orthogonal aesthetic they provide to one's desktop, though the value of that may vary by taste. I quite like it.

chunkwm is a tiling wm for macOS. On its own it's pretty nice, but its full potential comes out with a hotkey daemon like skhd, which maps keystrokes to arbitrary system actions. skhd can be used for mapping hotkeys to chunkcthe program that sends messages to chunkwm commands, enabling window management via just the keyboard.

manipulating windows with skhd

chunkwm provides a configuration file for setting window gaps, border offsets, border colors, and other aesthetic features; skhd has a configuration file for hotkey bindingsThe nice thing about skhd is keybindings can act on more than just chunkc - for instance, I have bindings for opening a terminal and web browser.. I've made public my personal .chunkwmrc and .skhdrc.

2: alacritty as a terminal and tmux as its multiplexer

Right now I use alacritty as my terminal emulatorFor a while I used hyper, but people are right about the Electron bloat. I've heard good things about kitty, but haven't had the chance to use it.. It's great -- fast as hell, not a battery leech, and has nice configuration options with extensible keybindings (you can see my configuration here). Especially with a transparent background and color palettes generated by wal, it's easily the most beautiful application on my machine.

Why tmux? It may seem ridiculous to nest terminal sessions within windows within a window manager, but I use tmux to have just one terminal window open and manage various sessions inside it. tmux sessions persist independently of the emulator they are run in, so you can enter and exit them anytime you want.

working with multiple tmux sessions

tmux allows for aesthetic and keybinding configurations via a .tmux.conf. Of course, I've made mine publicly avaliable.

3: Power tools: vim and ranger

For a while, I thought vim was a needlessly cumbersome tool, as I'm sure most do initially. Once I began to seriously use it though, I realized my enhancement in productivity, and now I use vim for pretty much everythingMore accurately, I use neovim.. Working with only a keyboard certainly imposed a learning curve, but has paid off in a a tremendous speedup for literally everything I do on my machine. In fact, the productivity benefits vim has provided me are the primary reason I switched to a key-bound tiling wm and and now do 90% of my work in a terminal emulator.

On a similar note, the ranger filemanager provides vim-like key bindings for browsing file systems. This is a boon for productivity -- at least over Finder, in my experience.

If you're looking for a beautiful, extensible text editor to replace your IDEs and speedup your workflow, I cannot recommend vim enoughemacs is also really nice, if that's more your thing. Regardless, the advantage of keybindings is undeniable -- there's a reason VS Code and Atom have command palettes.. And once you get hooked on that, check out ranger. And if you're trying to get really deep, maybe you even want a command-line email client like mutt. There's an entire world out there for you to discover smile.

3.1: vim's Learning Curve

vim's learning curve kinda sucks if you haven't worked much with key-bound applications before. Getting over that hill is a personal journey, but I have two tips from personal experience:

  1. vimtutor is your best friend. Launch it up in your command line and go through all of it; the tutorial isn't very long and will teach you everything you need to be functional in vim.

  2. Actually use vim. Make it the exclusive workspace for your next few projects, homework assignments, papers, whatever else. At first it might really suck and you might want to switch back editors, but soon it'll click and you'll begin to experience why it's raved about so much. Non-toy usage of vim will also teach you all the tricks vimtutor doesn't and force you to configure the editor to your liking.

Speaking of configuration, here's my .vimrc. Like the other configurations I've made public, you should use it only to pick and choose what you need - my preferences and plugins probably don't exactly align with your needs, and it's useful to know what the commands you're including actually mean.

00: Postlude

I hope this article has provided you with an additional perspective on macOS configuration options. If you choose to incorporate any of the tools I've discussed in your own workflow, that's awesome! Though of course, my configuration is by no means is the "right" way to setup a workspace -- hell, this one constantly evolves as my needs and preferences change.

If you find my configurations useful, have comments about this discussion, have another perspective you'd like share, or anything else related, [please ping me](mailto:[email protected]?subject=Re: Your macOS workspace with a tiling wm). I'd love to chat.

Analytics By visiting this site, you agree to its use of Cloudflare Analytics. No identifiable information is transmitted to Cloudflare. See Cloudflare Analytics user privacy.