Layouts and Tiling
Kitty includes seven built-in layout presets and lets you create custom arrangements. Understanding layouts turns kitty from a simple terminal into a full workspace manager.
Learn the seven built-in layouts and how to build a custom monitoring dashboard using scripted window creation and layout switching.
The Seven Built-In Layouts
Cycle through layouts with:
Ctrl+Shift+l → Cycle to next layout
Or apply a specific one from command palette:
Ctrl+Shift+p → type "layout" → select layout
Or from the command line:
kitty @ set-layout fat
kitty @ set-layout grid
kitty @ set-layout horizontal
kitty @ set-layout splits
kitty @ set-layout stack
kitty @ set-layout tall
kitty @ set-layout vertical
1. fat — Equal Vertical Columns
┌──────────┬──────────┬──────────┐
│ │ │ │
│ Window │ Window │ Window │
│ 0 │ 1 │ 2 │
│ │ │ │
└──────────┴──────────┴──────────┘
All windows share equal width. Best for side-by-side log watchers or file comparisons.
2. grid — Balanced Grid
┌──────────┬──────────┐
│ Window │ Window │
│ 0 │ 1 │
├──────────┼──────────┤
│ Window │ Window │
│ 2 │ 3 │
└──────────┴──────────┘
Windows arranged in a balanced grid. Grows to fill available space as windows are added.
3. horizontal — Side by Side
┌──────┬──────┬──────┬──────┐
│ W0 │ W1 │ W2 │ W3 │
└──────┴──────┴──────┴──────┘
All windows side by side. This is the default when splitting with Ctrl+Shift+Enter.
4. splits — Manual Split-Based
┌──────────┬───────────────┐
│ │ Window │
│ Window │ 1 │
│ 0 ├───────────────┤
│ │ Window │
│ │ 2 │
└──────────┴───────────────┘
Follows the manual splits you create. New windows split the focused window. This is the most flexible layout.
5. stack — Single Visible Window
┌──────────────────────────┐
│ │
│ Window 0 │
│ (only visible) │
│ │
├──────────────────────────┤
│ [0] [1] [2*] [3] │
└──────────────────────────┘
Only one window visible at a time. Others are stacked behind it. Switch with window focus shortcuts.
6. tall — Main + Right Stack
┌────────────────┬─────────┐
│ │ Window │
│ Window 0 │ 1 │
│ (main) ├─────────┤
│ │ Window │
│ │ 2 │
└────────────────┴─────────┘
One large main window on the left, remaining windows stacked on the right.
7. vertical — Stacked Top to Bottom
┌──────────────────────────┐
│ Window 0 │
├──────────────────────────┤
│ Window 1 │
├──────────────────────────┤
│ Window 2 │
└──────────────────────────┘
Windows stacked vertically — like tmux even-vertical.
Configuring Default Layout
# Set the default layout when creating new tabs
enabled_layouts fat,grid,horizontal,splits,stack,tall,vertical
# Start with a specific layout
enabled_layouts tall,grid,splits
Layout-Specific Configuration
# adjust the main window size in tall layout
tall_layout_main_window_size 0.6 # 60% of available width
# minimum window size before layout adjusts (in cells)
window_size_cells 40 15 # min 40 cols x 15 rows
Custom Scripted Layout: Monitoring Dashboard
Build a full monitoring dashboard with scripted window creation and layout switching:
#!/bin/bash
# Build a 4-window monitoring dashboard in a single tab
# Create the first window
kitty @ launch --type tab --title "dashboard" --keep-focus
# Create three more windows with layout commands
kitty @ launch --type window --location vsplit
kitty @ launch --type window --location hsplit
kitty @ launch --type window --location vsplit
# Apply grid layout
kitty @ set-layout grid
# Send commands to each window
kitty @ send-text --match index:0 "htop\n"
kitty @ send-text --match index:1 "tail -f /var/log/syslog\n"
kitty @ send-text --match index:2 "watch -n 2 'df -h'\n"
kitty @ send-text --match index:3 "ping -c 30 google.com\n"
Result (grid layout):
┌────────────────┬────────────────┐
│ htop │ tail -f │
│ │ /var/log/ │
│ │ syslog │
├────────────────┼────────────────┤
│ watch df -h │ ping google │
│ │ .com │
└────────────────┴────────────────┘
Scripted Multi-Tab, Multi-Layout Workflow
#!/bin/bash
# Full DevOps dashboard with multiple tabs and layouts
# Tab 1: Code editor (tall layout — main editor + two side terminals)
kitty @ launch --type tab --tab-title "code"
kitty @ launch --type window --location hsplit
kitty @ launch --type window --location vsplit
kitty @ set-layout tall
kitty @ send-text --match index:0 "vim\n"
# Tab 2: Server monitoring (grid layout)
kitty @ new-tab --tab-title "monitor"
kitty @ launch --type window --location vsplit
kitty @ launch --type window --location hsplit
kitty @ launch --type window --location vsplit
kitty @ set-layout grid
kitty @ send-text --match index:0 "htop\n"
kitty @ send-text --match index:1 "tail -f /var/log/nginx/access.log\n"
kitty @ send-text --match index:2 "watch -n 5 'systemctl status nginx'\n"
kitty @ send-text --match index:3 "ping -c 60 8.8.8.8\n"
# Tab 3: Deployment (single window, split layout)
kitty @ new-tab --tab-title "deploy"
kitty @ launch --type window --cwd ~/projects/myapp
kitty @ send-text --match title:deploy "git status\n"
# Focus back on code tab
kitty @ focus-tab --match title:code
Quick Layout Reference
| Preset | Best for |
|---|---|
fat | Side-by-side log watchers |
grid | Dashboard with equal monitoring panels |
horizontal | Multiple columns of output |
splits | Manual custom arrangements |
stack | Focus mode — one window at a time |
tall | Editor with sidebar terminals |
vertical | Sequential command outputs |
Common Pitfalls
| Pitfall | Symptom | Fix |
|---|---|---|
| Layout not changing | enabled_layouts excludes the desired layout | List all layouts in enabled_layouts |
Windows disappear in stack | Only one window visible | Navigate with Ctrl+Shift+arrows |
| Custom layout lost after closing window | Layout recalculates | Use splits layout for manual arrangement |
kitty @ send-text not reaching target | Wrong window index | Use kitty @ ls to verify window indices |
Hands-On Practice
Try building a monitoring dashboard:
# Step 1: Create a new tab
# Ctrl+Shift+t
# Step 2: Create three more windows
# Ctrl+Shift+Enter (vertical)
# Ctrl+Shift+Alt+Enter (horizontal)
# Ctrl+Shift+Enter (vertical — on the empty pane)
# Step 3: Apply grid layout
# Ctrl+Shift+l (cycle until grid appears)
# Step 4: Run commands in each window
# Window 0: htop
# Window 1: watch -n 1 'date'
# Window 2: tail -f /var/log/syslog
# Window 3: df -h
# Step 5: Try different layouts
# Ctrl+Shift+l → tall
# Ctrl+Shift+l → fat
# Ctrl+Shift+l → stack
# Step 6: Reset to grid
kitty @ set-layout grid