Skip to content

Linux desktop (Sway / Ghostty)

Wayland tiling setup that mirrors macOS yabai + skhd + Karabiner + Ghostty.

Sway is i3 on Wayland. Caps is Hyper (xkb_options caps:hyper), matching Karabiner’s Caps → cmd+ctrl+opt+shift. App launchers stay on meh (ctrl+alt+shift).

Terminal window
cd ~/.dotfiles
make linux-desktop

That script:

  1. Installs Ghostty (AppImage → ~/.local/bin/ghostty) and JetBrainsMono Nerd Font with no sudo.
  2. apt installs Sway, waybar, wofi, mako, grim/slurp when passwordless sudo works.
  3. Otherwise extracts the same debs into ~/.local/opt/wm and wraps them with start-sway.
  4. Stows sway waybar wofi mako ghostty.
  5. On GNOME, applies interim workspace keybinds so Alt/Hyper work before you switch sessions.

Full system packages (type the sudo password):

Terminal window
sudo apt install sway swaybg swayidle swaylock waybar wofi mako-notifier grim slurp wl-clipboard jq python3-i3ipc fonts-font-awesome xwayland
sudo cp ~/.local/share/wayland-sessions/sway.desktop /usr/share/wayland-sessions/sway.desktop

Then log out of GNOME and pick Sway at GDM. From a TTY: start-sway. Nested smoke test inside GNOME:

Terminal window
WLR_BACKENDS=wayland start-sway

This host (dpl) uses nouveau on an RTX 2070. Sway 1.7 is fine on nouveau. If you later install the proprietary NVIDIA driver, add to ~/.config/sway/config or the environment:

Terminal window
export WLR_NO_HARDWARE_CURSORS=1
macOS (skhd)Linux (sway)Action
meh-aCtrl+Alt+Shift+aGhostty focus/launch
meh-fCtrl+Alt+Shift+fkitty
meh-s / d / zCtrl+Alt+Shift+s/d/zFirefox (Dia/Arc/Zen stand-in)
meh-gCtrl+Alt+Shift+gCursor / code
Super+SpaceSuper+Spacewofi launcher (Raycast-ish)
ctrl+shift h/j/k/lCtrl+Shift+h/j/k/lfocus
cmd+shift h/lSuper+Shift+h/lwarp/move
hyper + h/j/k/l or arrowsCaps+h/j/k/l or Caps+arrowsresize
hyper+spaceCaps+spacetoggle float
hyper-fCaps+ffullscreen
alt-1..9Alt+1..9focus workspace
hyper-1..9Caps+1..9send to workspace
cmd+ctrl n/pSuper+Ctrl+n/psend + follow
cmd+ctrl ←/→Super+Ctrl+arrowssend to output + follow
hyper-eCaps+ebalance
ctrl+alt+cmd-rCtrl+Alt+Super+rreload sway
cmd+s then v/m/h/j/k/lSuper+s then v/m/h/j/k/lGhostty splits (same as macOS)

meh = ctrl+alt+shift. hyper = Caps (Mod3) or the physical four-mod chord.

xkb cannot do tap-hold. Optional kanata config is stowed at ~/.config/kanata/kanata.kbd and needs /dev/uinput:

Terminal window
sudo usermod -aG input "$USER"
echo 'KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/99-uinput.rules
# cargo install kanata (or sudo apt if packaged)
kanata --cfg ~/.config/kanata/kanata.kbd
  • dotfiles/sway/.config/sway/config
  • dotfiles/waybar/.config/waybar/
  • dotfiles/wofi/.config/wofi/
  • dotfiles/mako/.config/mako/config
  • dotfiles/ghostty/.config/ghostty/config (Linux Super aliases; unbinds shift+arrows and alt+1..9 so Herdr gets them)
  • scripts/linux-desktop.sh
  • scripts/linux-gnome-keys.sh