DEV Community

Cristobal Dabed
Cristobal Dabed

Posted on

Ghostty + Zellij 👻 setup on Mac

So i have been using Ghostty with Zellij on macOS for a while, as my favourite goto terminal and workspace.

Picture of Zellij Workspace in Ghostty Terminal on Mac

Problem

However, some things have been bothering me for a while that I couldn't sort out until now:

  1. The Option key on macOS wasn't being interpreted as Alt correctly in the terminal
  2. Jumping forward a word with Option+Right would trigger Zellij's floating pane toggle instead
  3. Reordering tabs with Alt+i and Alt+o did not work as expected

This happens because macOS terminals convert Option+Right to Alt+f (for "forward word" navigation), which conflicts with Zellij's Alt+f floating pane keybinding.

Solution

1. Configuring Ghostty to treat Option as Alt

Set the macos-option-as-alt option in your Ghostty config e.g.:

# Enable Option key as Alt for keybindings
# Use 'left' so right Option key can still type special characters
macos-option-as-alt = left
Enter fullscreen mode Exit fullscreen mode

This lets us use the left Option key as Alt for Zellij keybindings, while the right Option key can still type special characters (',~, |, etc.).

2. Rebinding the floating pane shortcut

Since Option+Right still is interpreted as Alt+f by the terminal, we need to change Zellij's floating pane keybinding. This can be changed in your Zellij config e.g.:

bind "Alt Shift f" { ToggleFloatingPanes; }
Enter fullscreen mode Exit fullscreen mode

Hope this helps you out, if you have been struggling with the same issues like i did 👋

Top comments (0)