Skip to content

Latest commit

 

History

History
576 lines (479 loc) · 21.7 KB

File metadata and controls

576 lines (479 loc) · 21.7 KB

Kitty Terminal - Visual Layout Guide

🎨 Complete Layout Gallery

1. SPLITS Layout (Default - Manual Control)

┌─────────────────────────────────────────┐
│  You manually create splits with:       │
│  Alt+\  (vertical)                      │
│  Alt+-  (horizontal)                    │
└─────────────────────────────────────────┘

Example: Editor + Terminal + File Manager
┌──────────────────┬──────────────────────┐
│                  │                      │
│                  │    File Manager      │
│   Code Editor    │       (lf/nnn)       │
│    (Neovim)      │                      │
│                  ├──────────────────────┤
│                  │                      │
│                  │    Build Output      │
│                  │                      │
└──────────────────┴──────────────────────┘
         60%                   40%

Create this:
1. Alt+\ (vertical split)
2. Alt+L (move to right pane)
3. Alt+- (horizontal split right pane)
4. Alt+Shift+H (widen left pane)

2. TALL Layout (Main + Stack)

┌────────────────────────┬──────────────┐
│                        │      2       │
│                        ├──────────────┤
│          1             │      3       │
│      (Main)            ├──────────────┤
│                        │      4       │
│                        ├──────────────┤
│                        │      5       │
└────────────────────────┴──────────────┘
        70%                    30%

Perfect for:
- Main editor (left) + utilities (right)
- Browser (left) + terminals (right)
- Documentation (left) + commands (right)

Activate: Ctrl+Shift+Alt+T

3. FAT Layout (Main + Stack)

┌─────────────────────────────────────────┐
│                                         │
│                   1                     │
│                (Main)                   │
│                                         │
├──────────────┬──────────────┬──────────┤
│      2       │      3       │    4     │
│              │              │          │
└──────────────┴──────────────┴──────────┘
        70%
    
        30%

Perfect for:
- Terminal/logs (top) + monitoring (bottom)
- Editor (top) + test runners (bottom)
- Main view (top) + details (bottom)

Activate: Ctrl+Shift+Alt+F

4. STACK Layout (One at a Time)

Currently Visible:
┌─────────────────────────────────────────┐
│                                         │
│                                         │
│                  1                      │
│              (Visible)                  │
│                                         │
│                                         │
└─────────────────────────────────────────┘

Hidden Behind: Windows 2, 3, 4, 5...

Switch with:
- Ctrl+Shift+=  (show visible window)
- Ctrl+Shift+-  (cycle through stack)
- Ctrl+1-9      (jump to specific window)

Perfect for:
- Full-screen focus on one task
- Presentations
- Distraction-free coding
- Multiple full-screen dashboards

Activate: Ctrl+Shift+Alt+S

5. GRID Layout (Auto-arrange)

2 Windows:                4 Windows:
┌──────────┬──────────┐  ┌──────────┬──────────┐
│          │          │  │    1     │    2     │
│    1     │    2     │  ├──────────┼──────────┤
│          │          │  │    3     │    4     │
└──────────┴──────────┘  └──────────┴──────────┘

6 Windows:                9 Windows:
┌──────┬──────┬──────┐  ┌─────┬─────┬─────┐
│  1   │  2   │  3   │  │  1  │  2  │  3  │
├──────┼──────┼──────┤  ├─────┼─────┼─────┤
│  4   │  5   │  6   │  │  4  │  5  │  6  │
└──────┴──────┴──────┘  ├─────┼─────┼─────┤
                        │  7  │  8  │  9  │
                        └─────┴─────┴─────┘

Perfect for:
- Monitoring multiple servers
- Comparing outputs
- Dashboard views
- Multi-camera setups

Activate: Ctrl+Shift+Alt+G

6. HORIZONTAL Layout (Stacked Rows)

┌─────────────────────────────────────────┐
│                  1                      │
├─────────────────────────────────────────┤
│                  2                      │
├─────────────────────────────────────────┤
│                  3                      │
├─────────────────────────────────────────┤
│                  4                      │
└─────────────────────────────────────────┘

Perfect for:
- Log watching (multiple log files)
- Terminal sessions stacked
- Reading multiple documents
- Sequential workflows

Activate: Ctrl+Shift+Alt+H

7. VERTICAL Layout (Stacked Columns)

┌─────┬─────┬─────┬─────┬─────┬─────┐
│     │     │     │     │     │     │
│  1  │  2  │  3  │  4  │  5  │  6  │
│     │     │     │     │     │     │
└─────┴─────┴─────┴─────┴─────┴─────┘

Perfect for:
- Wide-screen monitors
- Comparing code side-by-side
- Multi-column workflows
- Timeline views

Activate: Ctrl+Shift+Alt+V

🔄 Layout Transformations

Rotation Example

Starting Layout (Grid):
┌──────────┬──────────┐
│    1     │    2     │
├──────────┼──────────┤
│    3     │    4     │
└──────────┴──────────┘

Press: Ctrl+Alt+Space (Rotate)

After 1 Rotation:
┌──────────┬──────────┐
│    4     │    1     │
├──────────┼──────────┤
│    3     │    2     │
└──────────┴──────────┘

After 2 Rotations:
┌──────────┬──────────┐
│    4     │    3     │
├──────────┼──────────┤
│    2     │    1     │
└──────────┴──────────┘

Mirror Example

Starting Layout (Tall):
┌────────────────┬──────┐
│                │  2   │
│       1        ├──────┤
│                │  3   │
└────────────────┴──────┘

Press: Ctrl+Alt+M (Mirror)

After Mirror:
┌──────┬────────────────┐
│  2   │                │
├──────┤       1        │
│  3   │                │
└──────┴────────────────┘

📊 Real-World Workflow Examples

Workflow 1: Full-Stack Development

Tab 1: FRONTEND (Tall Layout)
┌─────────────────────┬────────────┐
│                     │   Node     │
│   VSCode/Neovim     │   Server   │
│   (React code)      ├────────────┤
│                     │   Tests    │
│                     ├────────────┤
│                     │   Build    │
└─────────────────────┴────────────┘

Tab 2: BACKEND (Tall Layout)
┌─────────────────────┬────────────┐
│                     │   Django   │
│   VSCode/Neovim     │   Server   │
│   (Python code)     ├────────────┤
│                     │   DB       │
│                     ├────────────┤
│                     │   Celery   │
└─────────────────────┴────────────┘

Tab 3: DATABASE (Horizontal Layout)
┌─────────────────────────────────────┐
│   psql (PostgreSQL CLI)             │
├─────────────────────────────────────┤
│   pgcli (Interactive)               │
├─────────────────────────────────────┤
│   watch -n 1 'SELECT * FROM stats'  │
└─────────────────────────────────────┘

Setup:
1. Ctrl+T (3 times for 3 tabs)
2. Alt+1 (go to tab 1)
3. Alt+\ then Ctrl+Shift+Alt+T (frontend)
4. Alt+2 (go to tab 2)
5. Alt+\ then Ctrl+Shift+Alt+T (backend)
6. Alt+3 (go to tab 3)
7. Alt+- (twice) then Ctrl+Shift+Alt+H

Workflow 2: DevOps Monitoring

Tab 1: SERVER STATS (Grid Layout)
┌──────────────┬──────────────┬──────────────┐
│   Server 1   │   Server 2   │   Server 3   │
│   htop       │   htop       │   htop       │
├──────────────┼──────────────┼──────────────┤
│   Server 4   │   Server 5   │   Server 6   │
│   htop       │   htop       │   htop       │
└──────────────┴──────────────┴──────────────┘

Tab 2: LOGS (Fat Layout)
┌─────────────────────────────────────────────┐
│   tail -f /var/log/nginx/access.log         │
├──────────────────┬──────────────────────────┤
│   App Logs       │   Error Logs             │
└──────────────────┴──────────────────────────┘

Tab 3: DOCKER (Vertical Layout)
┌───────┬───────┬───────┬───────┬───────┐
│ Web   │ API   │ DB    │Redis  │Queue  │
│docker │docker │docker │docker │docker │
│stats  │stats  │stats  │stats  │stats  │
└───────┴───────┴───────┴───────┴───────┘

Enable broadcast (Ctrl+Shift+B) on Tab 1
to control all servers simultaneously!

Workflow 3: Writing & Research

Tab 1: WRITING (Tall Layout)
┌──────────────────────┬─────────────┐
│                      │  Outline    │
│   Main Document      │  & TOC      │
│   (Neovim/Vim)       ├─────────────┤
│                      │  Grammar    │
│                      │  Check      │
└──────────────────────┴─────────────┘

Tab 2: RESEARCH (Stack Layout)
Window 1: w3m https://wikipedia.org
Window 2: w3m https://scholar.google.com
Window 3: w3m https://github.com
Window 4: notes.md (snippets)

Cycle through with Ctrl+Shift+=/- 

Tab 3: REFERENCES (Grid Layout)
┌─────────────────┬─────────────────┐
│  Bibliography   │  Quotes File    │
├─────────────────┼─────────────────┤
│  Citations      │  Image Links    │
└─────────────────┴─────────────────┘

Workflow 4: Video Editing

Tab 1: EDITING (Splits Layout)
┌──────────────────┬──────────────────┐
│                  │                  │
│   Video Editor   │   File Browser   │
│   (kdenlive)     │   (ranger/lf)    │
│                  │                  │
├──────────────────┴──────────────────┤
│   Render Progress & Logs            │
└─────────────────────────────────────┘

Tab 2: ASSETS (Grid Layout)
┌──────────────┬──────────────┬──────────────┐
│  Audio       │  Video       │  Images      │
│  Files       │  Files       │  & Graphics  │
├──────────────┼──────────────┼──────────────┤
│  Scripts     │  Captions    │  Effects     │
│  & Storyboard│  & Subtitles │  Presets     │
└──────────────┴──────────────┴──────────────┘

🎯 Window Sizing Strategies

Golden Ratio Split (60/40)

┌──────────────────────┬───────────┐
│                      │           │
│        60%           │    40%    │
│                      │           │
└──────────────────────┴───────────┘

Achieve:
1. Alt+\ (split)
2. Alt+Shift+H (widen left) x 3-4 times

Triple Split (50/25/25)

┌──────────────────┬────────┬────────┐
│                  │        │        │
│       50%        │  25%   │  25%   │
│                  │        │        │
└──────────────────┴────────┴────────┘

Achieve:
1. Alt+\ (split)
2. Alt+L (move right)
3. Alt+\ (split again)
4. Ctrl+Shift+E (equalize right two)
5. Alt+H (move to left)
6. Alt+Shift+H (widen main)

Monitoring Layout (75/25 horizontal)

┌──────────────────────────────────────┐
│                                      │
│              75%                     │
│           (Main Work)                │
├──────────────────────────────────────┤
│              25%                     │
│           (Monitoring)               │
└──────────────────────────────────────┘

Achieve:
1. Alt+- (horizontal split)
2. Alt+Shift+K (make top taller) x 3-4 times

🔀 Layout Transition Strategies

From Splits to Organized Layout

Step 1: Created manually
┌─────────┬─────────┐
│    1    │    2    │
├─────────┼─────────┤
│    3    │    4    │
└─────────┴─────────┘

Step 2: Press Ctrl+Shift+Alt+T (Tall)
┌──────────────────┬──────┐
│                  │  2   │
│        1         ├──────┤
│                  │  3   │
│                  ├──────┤
│                  │  4   │
└──────────────────┴──────┘

Step 3: Press Ctrl+Shift+F (Next = Fat)
┌──────────────────────────┐
│            1             │
├────────┬────────┬────────┤
│   2    │   3    │   4    │
└────────┴────────┴────────┘

Keep pressing Ctrl+Shift+F to explore!

📏 Measurement & Sizing

Understanding Window Sizes

Initial Window: 800x500 (configured)
window_margin_width: 5px outer margin
window_padding_width: 2px inner padding

Actual usable space:
┌─5px margin─────────────────5px margin─┐
│ ┌─2px pad────────────────2px pad─┐   │
│ │                                │   │
│ │     Usable Terminal Area       │   │
│ │     (790x490 approximately)    │   │
│ │                                │   │
│ └────────────────────────────────┘   │
└──────────────────────────────────────┘

Font Scaling Effect

Base size: 13pt
After Ctrl+=:  15pt (+2)
After Ctrl+=:  17pt (+2)
After Ctrl+=:  19pt (+2)

Reset to 13pt: Cmd+0

🎨 Visual Border Indicators

Active vs Inactive Windows

Active Window (Green Border):
┌─#00ff00────────────────────────┐
│ █                              │
│ Your current focus is here     │
│                                │
└────────────────────────────────┘

Inactive Windows (Dark Gray Border):
┌─#282828────────────────────────┐
│                                │
│ Background window              │
│                                │
└────────────────────────────────┘

This makes it easy to see where you are!

🖱️ Mouse-Based Window Management

Drag to Resize

1. Hover over window border
2. Cursor changes to ↔ or ↕
3. Click and drag to resize
4. Release to set

Alternative: Use Alt+Shift+H/J/K/L

Move with Mouse

1. Hold Ctrl+Shift
2. Click and drag window
3. Drop in new position

Note: Works in floating WM mode

💡 Pro Tips for Each Layout

SPLITS Tips

  • Start with Tall/Fat, then switch to Splits for fine control
  • Use Ctrl+Shift+E often to reset proportions
  • Ctrl+Alt+Space to rotate when stuck

TALL Tips

  • Perfect for code + output
  • Keep main window at 60-70% width
  • Stack holds up to 10 windows comfortably

FAT Tips

  • Great for widescreen monitors
  • Main window for primary content
  • Bottom stack for context/tools

STACK Tips

  • Use Ctrl+1-9 to jump directly
  • Perfect for full-screen focus
  • Hide distractions while keeping them ready

GRID Tips

  • Auto-balances all windows
  • Great for 4, 6, or 9 windows
  • Use with broadcast for server management

HORIZONTAL Tips

  • Perfect for log files
  • Stack up to 5-6 comfortably
  • Pair with tail -f or watch commands

VERTICAL Tips

  • Utilize ultra-wide monitors
  • Side-by-side comparisons
  • Good for 3-5 windows

🎓 Learning Path

Week 1: Basics

  • Master tab creation (Ctrl+T)
  • Learn splitting (Alt+\ and Alt+-)
  • Practice navigation (Alt+H/J/K/L)

Week 2: Layouts

  • Try each layout type
  • Practice cycling (Ctrl+Shift+F)
  • Find your favorites

Week 3: Efficiency

  • Use number focus (Ctrl+1-9)
  • Learn resize shortcuts
  • Practice workflow setups

Week 4: Advanced

  • Master broadcast mode
  • Use remote control
  • Create custom scripts

📐 Layout Selection Decision Tree

Do you need full-screen focus?
├─ YES → Stack Layout
└─ NO ↓

Do you have one primary window?
├─ YES → Tall or Fat Layout
│        ├─ Wide content? → Fat
│        └─ Tall content? → Tall
└─ NO ↓

Do you have many equal windows?
├─ YES → Grid Layout
└─ NO ↓

Do you need custom arrangement?
├─ YES → Splits Layout
└─ NO ↓

Is monitor orientation a factor?
├─ Wide → Vertical Layout
└─ Tall → Horizontal Layout

Visual guides help! Refer to this document when exploring layouts.

Practice makes perfect - try each layout with real work!