Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

Commit 5538cbf

Browse files
committed
feat: update ghostty configs
1 parent 4337e30 commit 5538cbf

File tree

17 files changed

+791
-592
lines changed

17 files changed

+791
-592
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ generated
2020
\%APPDATA\%
2121
buffers
2222
current_preset
23+
home/config/.config/ghostty/os/current.conf

home/config/.config/ghostty/AI.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ghostty documentation reference
2+
3+
- remember to look for configuration by viewing this site:
4+
- https://ghostty.org/docs/config
5+
- https://ghostty.org/docs/config/reference (configuration options)
6+
- to help figure out keybinds, use the following links as references:
7+
- https://ghostty.org/docs/config/keybind
8+
- https://ghostty.org/docs/config/keybind/sequence
9+
- https://ghostty.org/docs/config/keybind/reference
10+
- to learn about configuring on linux
11+
- https://ghostty.org/docs/linux
12+
- https://ghostty.org/docs/linux/systemd
13+
- to learn about the features that ghostty supports, use the following links as references:
14+
- https://ghostty.org/docs/features
15+
- https://ghostty.org/docs/features/theme
16+
- https://ghostty.org/docs/features/shell-integration
17+
- for learning about common issues and solutions, refer to ghostty help links attached below:
18+
- https://ghostty.org/docs/help
19+
- https://ghostty.org/docs/help/terminfo
20+
- https://ghostty.org/docs/help/gtk-single-instance
21+
- https://ghostty.org/docs/help/gtk-opengl-context
22+
- https://ghostty.org/docs/help/macos-tiling-wms
23+
- https://ghostty.org/docs/help/macos-login-shells
Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
# Ghostty Terminal Configuration
2+
3+
Clean, modular configuration for [Ghostty](https://ghostty.org/) terminal emulator with OS-specific optimizations and custom cursor effects.
4+
5+
## Quick Start
6+
7+
1. **Clone/symlink this config:**
8+
9+
```bash
10+
# macOS
11+
ln -s ~/.config/ghostty ~/Library/Application\ Support/com.mitchellh.ghostty
12+
13+
# Linux
14+
# Already in ~/.config/ghostty
15+
```
16+
17+
2. **Set up OS-specific config:**
18+
19+
```bash
20+
cd ~/.config/ghostty/os
21+
22+
# macOS
23+
ln -sf macos.conf current.conf
24+
25+
# Linux
26+
ln -sf linux.conf current.conf
27+
```
28+
29+
3. **Reload Ghostty** - `Ctrl+Cmd+R` (macOS) or restart
30+
31+
## Configuration Structure
32+
33+
```
34+
ghostty/
35+
├── config # Main entry point
36+
├── theme.conf # Kanagawa Dragon colors
37+
├── appearance.conf # Visual settings
38+
├── keybinds.conf # Keyboard shortcuts
39+
├── quick-terminal.conf # Dropdown terminal
40+
├── os/
41+
│ ├── current.conf # Symlink (gitignored) → macos.conf or linux.conf
42+
│ ├── macos.conf # macOS-only settings
43+
│ └── linux.conf # Linux-only settings
44+
└── shaders/
45+
└── cursor-warp.glsl # Cursor trail effect
46+
```
47+
48+
## Theme
49+
50+
**Kanagawa Dragon** - Dark, muted color scheme inspired by Japanese art
51+
52+
| Element | Color | Hex |
53+
| ---------- | ------------- | --------- |
54+
| Background | Deep charcoal | `#181616` |
55+
| Foreground | Warm gray | `#c8c093` |
56+
| Cursor | Light gray | `#c5c9c5` |
57+
| Selection | Deep blue | `#2d4f67` |
58+
59+
**16 ANSI Colors:**
60+
61+
- **Normal:** Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
62+
- **Bright:** Enhanced versions for bold text
63+
- Optimized with `minimum-contrast = 1.1` for readability
64+
- Bold text uses bright palette colors
65+
66+
## Visual Features
67+
68+
### Background
69+
70+
- **Opacity:** 88% transparency
71+
- **Blur:** 20px radius for depth
72+
- **Padding:** 4px comfortable spacing
73+
74+
### Cursor Trail Shader
75+
76+
Smooth motion trail when cursor moves:
77+
78+
- **Duration:** 0.2s animation
79+
- **Easing:** EaseOutCirc for natural motion
80+
- **Threshold:** Activates on movements > 1.5 cursor heights
81+
- **Customizable:** Edit `TRAIL_SIZE`, `TRAIL_THICKNESS` in shader
82+
83+
**Disable shader:**
84+
85+
```ini
86+
# appearance.conf
87+
# custom-shader = shaders/cursor-warp.glsl
88+
```
89+
90+
### Split Appearance
91+
92+
- Unfocused splits dimmed to 80% opacity
93+
- Subtle divider color `#2a2a2a`
94+
95+
## Keybindings
96+
97+
### Window & Tabs
98+
99+
```
100+
Cmd+N New window
101+
Cmd+W Close window
102+
Cmd+T New tab
103+
Cmd+1-9 Jump to tab 1-9
104+
Ctrl+Tab Next tab
105+
Ctrl+Shift+Tab Previous tab
106+
```
107+
108+
### Splits (Vim-style)
109+
110+
```
111+
Cmd+D Split right
112+
Cmd+Shift+D Split down
113+
Cmd+H/J/K/L Navigate left/down/up/right
114+
Cmd+Shift+Z Toggle zoom
115+
Ctrl+Cmd+E Equalize all splits
116+
```
117+
118+
### Terminal
119+
120+
```
121+
Cmd+K Clear screen
122+
Cmd+A Select all
123+
Cmd+Plus/Minus Font size
124+
Cmd+0 Reset font size
125+
```
126+
127+
### Navigation
128+
129+
```
130+
Cmd+Up/Down Scroll to top/bottom
131+
Ctrl+Shift+P Previous prompt (shell integration)
132+
Ctrl+Shift+N Next prompt (shell integration)
133+
```
134+
135+
### System
136+
137+
```
138+
Cmd+P Command palette
139+
Cmd+, Open config
140+
Ctrl+Cmd+R Reload config
141+
Cmd+` Toggle quick terminal
142+
```
143+
144+
## Quick Terminal
145+
146+
Dropdown terminal overlay - press **Cmd+`** from anywhere (requires Accessibility permissions on macOS).
147+
148+
**Behavior:**
149+
150+
- Appears from top of screen
151+
- 55% width, 600px max height
152+
- Auto-hides when clicking outside
153+
- Follows mouse to correct display
154+
- 0.18s smooth animation (macOS)
155+
156+
**Use cases:**
157+
158+
- Quick git commands while in browser
159+
- Run tests without switching windows
160+
- Temporary command execution
161+
162+
## OS-Specific Settings
163+
164+
### macOS (`os/macos.conf`)
165+
166+
- Native tabs titlebar style
167+
- Blueprint app icon
168+
- Window shadows enabled
169+
- Step resize (by cell increments)
170+
- Auto secure input for passwords
171+
- Option key as Alt
172+
- Auto-update checking
173+
- Quick terminal animations
174+
- Undo timeout: 8 seconds
175+
176+
### Linux (`os/linux.conf`)
177+
178+
- GTK titlebar with top tabs
179+
- Single instance detection
180+
- Window quit delay: 2 seconds
181+
- CGroup process isolation
182+
- Wayland overlay quick terminal
183+
- On-demand keyboard interactivity
184+
185+
### Cross-Platform (`config`)
186+
187+
- Shell integration with SSH terminfo auto-install
188+
- Quit behavior (configurable per OS preference)
189+
- Undo support
190+
- Quick terminal screen following
191+
192+
## Shell Integration
193+
194+
Enabled features:
195+
196+
- **cursor** - Blinking cursor at prompt
197+
- **title** - Auto-update window title
198+
- **sudo** - Preserve terminfo in sudo
199+
- **ssh-terminfo** - Auto-install terminfo on remote hosts
200+
- **path** - Add Ghostty to PATH
201+
202+
**Benefits:**
203+
204+
- Jump between prompts with Ctrl+Shift+P/N
205+
- Smart close confirmations
206+
- Directory inheritance for new tabs/splits
207+
208+
## Clipboard & Selection
209+
210+
- Copy on select enabled
211+
- Selection clears after copy
212+
- Paste protection for unsafe content
213+
- Ask before clipboard read access
214+
- Mouse hides while typing
215+
- Precision scroll: 0.9x, Discrete: 3x
216+
217+
## Customization
218+
219+
### Change Theme Colors
220+
221+
Edit `theme.conf`:
222+
223+
```ini
224+
background = #181616
225+
foreground = #c8c093
226+
palette = 0=#0d0c0c # ANSI black
227+
palette = 1=#c4746e # ANSI red
228+
# ... etc
229+
```
230+
231+
### Adjust Transparency
232+
233+
Edit `appearance.conf`:
234+
235+
```ini
236+
background-opacity = 0.88 # 0.0 = invisible, 1.0 = solid
237+
background-blur-radius = 20
238+
```
239+
240+
### Modify Cursor Trail
241+
242+
Edit `shaders/cursor-warp.glsl`:
243+
244+
```glsl
245+
const float DURATION = 0.2; // Animation length
246+
const float TRAIL_SIZE = 0.8; // 0.0-1.0, smear amount
247+
const float TRAIL_THICKNESS = 1.0; // Height multiplier
248+
const float FADE_ENABLED = 0.0; // 1.0 for fade gradient
249+
```
250+
251+
### Add Keybinds
252+
253+
Edit `keybinds.conf`:
254+
255+
```ini
256+
keybind = trigger=action
257+
# Example:
258+
keybind = ctrl+shift+x=new_window
259+
```
260+
261+
See [Ghostty keybind reference](https://ghostty.org/docs/config/keybind/reference) for actions.
262+
263+
## Git Workflow
264+
265+
The `os/current.conf` symlink is **gitignored** to prevent conflicts:
266+
267+
1. **Both configs tracked:** `os/macos.conf` and `os/linux.conf`
268+
2. **Symlink ignored:** `os/current.conf` (machine-specific)
269+
3. **First setup:** Create symlink pointing to your OS config
270+
4. **Pull/push:** No conflicts, configs sync across machines
271+
272+
## Requirements
273+
274+
- **Ghostty:** Version 1.2.0+
275+
- **macOS:** Accessibility permissions for global quick terminal
276+
- **Compositor:** For transparency/blur (macOS built-in, Linux needs compositor)
277+
278+
## Troubleshooting
279+
280+
**Shaders not working?**
281+
282+
- Check GPU support
283+
- Try commenting out shader in `appearance.conf`
284+
285+
**Quick terminal not appearing?**
286+
287+
- macOS: Grant Accessibility permissions in System Settings
288+
- Linux: Ensure compositor running for overlay
289+
290+
**Keybinds not working?**
291+
292+
- Check for conflicts with system shortcuts
293+
- Try alternative modifiers (ctrl vs super)
294+
295+
**Colors look wrong?**
296+
297+
- Verify `theme.conf` loaded
298+
- Check terminal $TERM value (`xterm-ghostty`)
299+
300+
## Documentation
301+
302+
- [Ghostty Docs](https://ghostty.org/docs)
303+
- [Config Reference](https://ghostty.org/docs/config/reference)
304+
- [Keybind Reference](https://ghostty.org/docs/config/keybind/reference)
305+
- [Shell Integration](https://ghostty.org/docs/features/shell-integration)
306+
- [Linux Setup](https://ghostty.org/docs/linux)
307+
308+
## License
309+
310+
Free to use and modify.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Appearance Settings
2+
3+
# Font
4+
font-size = 13
5+
6+
# Window
7+
window-decoration = true
8+
window-theme = auto
9+
window-padding-x = 4
10+
window-padding-y = 4
11+
12+
# Background
13+
background-opacity = 0.88
14+
background-blur-radius = 20
15+
16+
# Shaders
17+
custom-shader = shaders/cursor-warp.glsl
18+
19+
# Mouse
20+
mouse-hide-while-typing = true
21+
mouse-scroll-multiplier = precision:0.9,discrete:3
22+
23+
# Clipboard
24+
clipboard-read = ask
25+
clipboard-paste-protection = true
26+
copy-on-select = true
27+
selection-clear-on-copy = true
28+
29+
# Misc
30+
link-url = true
31+
bell-features = no-audio,attention,border

0 commit comments

Comments
 (0)