Navigating macOS with hjkl

Screen recording: focus hops between a Ghostty terminal and the projects page with ⌃ ⌥ H, tabs switch with ⌥ H, then terminal panes switch with ⌃ K and ⌃ J

Imagine navigating macOS with your fingers on the home row. Instead of feeling stuck in a carousel, you get to jump right to the correct tab/window/app. By default macOS cycles between windows with ⌘ ` and apps with ⌘ tab but both rely on a stack ordered by recency. When you are tabbing between two apps or windows the default solution works great but the moment you add other apps or windows (or a second display) it becomes unwieldy. I frequently get a slack message or zoom notification and it breaks my mental model of window position. I endeavored to replace that navigation with hjkl to mirror my vim keys and ended up rebinding keys in almost every app.

What I bound

To better demonstrate my setup I made a quick table of my most used hotkeys to navigate/place windows. The per-app hotkeys are easy to bind in tools like obsidian, tmux and most editors.

Action Hotkey Description Surface
Switch Tab ⌥ hl Jump to the previous or next tab app
Swap Tab ⌥ ⇧ hl Reorder the current tab left or right app
Switch Pane ⌃ hl Jump to the adjacent split pane app
Snap Window ⌘ ⌥ hjkl Snap to half the screen (← ↑ ↓ →) rectangle
Swap Display ⌘ ⇧ hl Send the window to another display rectangle
Focus Window ⌥ ⌃ hjkl Focus the neighboring window beeline
Focus next Window ⌥ ⌃ ` Focus the next hidden window beeline

Here the mods define the scope (tab, window, app) and hjkl define the direction

Rectangle

Rectangle is the only app I’ve needed for moving/snapping windows. I have hotkeys bound to snap to halves and move to another display and I keep everything else unbound. Having a quick hotkey to move a window between displays is essential to my workflow. There are other window position apps but Rectangle is lightweight and easy to add to my setup.

What about tiling?

I have always struggled with linux style window tiling. Most of the time I want to open a window on my current display at full size and think about where it belongs. Tiling managers make that choice for you and the mac specific ports of popular linux versions are all super janky and require SIP to be disabled. I also discovered that applescript can quickly place windows and I can easily bind a hotkey to load a “workspaces” or group of predetermined app windows. My Beeline project does share some of the position focus ideas with some of these tiling apps but avoids SIP and deterministic tiling.

Enter Beeline

Beeline is a tool I built to allow you to focus apps based on window position. Apps like Rectangle and Alfred offer some control over focus (Rectangle lets focus follow a window across displays) but the main control has always been ⌘ tab or ⌘ `. There are many mac apps that “solve” this problem by binding specific apps to hotkeys or moving focus by position but I didn’t really like any of them and wanted a more custom approach. Beeline is super simple; it moves focus in the direction of your key press. If I want to look at the window to the left I just press ⌥ ⌃ h and it shifts the focus to the left. Beeline also has a simple “Mission Control” like mode to jump to windows that are hidden behind others. Beeline is still something I am tuning and building (on my own devices) but please contact me if you want to try it.