Ghostty - Emulateur terminal
*Ultimate Ghostty reference pour les raccourcis, la configuration et les fonctionnalités de productivité *
Ghostty est un émulateur terminal rapide, riche en fonctionnalités et multiplateforme créé par Mitchell Hashimoto, co-fondateur de HashiCorp. Construit avec Zig et conçu pour les performances, Ghostty utilise l'interface utilisateur plate-forme-native et l'accélération GPU pour offrir une expérience terminale exceptionnelle. Cette feuille de tri couvre les raccourcis essentiels, les options de configuration et les fonctionnalités avancées pour maximiser votre productivité avec Ghostty.
Commencer
Installation
# macOS - Download from official website
# Ready-to-run binaries available at https://ghostty.org/
# Linux - Build from source
git clone https://github.com/ghostty-org/ghostty.git
cd ghostty
zig build -Doptimize=ReleaseFast
# Check installation
ghostty --version
# List default keybindings
ghostty +list-keybinds --default
Premier lancement
# Launch Ghostty
ghostty
# Launch with specific configuration
ghostty --config-file=/path/to/config
# Launch in debug mode
ghostty --debug
# Launch with specific working directory
ghostty --working-directory=/path/to/dir
```_
## Raccourcis de clavier essentiels
### Gestion des fenêtres
```bash
# New window
Cmd+N (macOS) / Ctrl+Shift+N (Linux)
# Close window
Cmd+W (macOS) / Ctrl+Shift+W (Linux)
# Close all windows (macOS only)
Cmd+Option+W
# Toggle fullscreen
Cmd+Enter (macOS) / F11 (Linux)
# Toggle window decorations (Linux only)
Ctrl+Shift+F12
# Minimize window
Cmd+M (macOS)
# Hide all windows (macOS only)
Cmd+H
```_
### Gestion des onglets
```bash
# New tab
Cmd+T (macOS) / Ctrl+Shift+T (Linux)
# Close tab
Cmd+W (macOS) / Ctrl+Shift+W (Linux)
# Next tab
Cmd+Shift+] (macOS) / Ctrl+Page Down (Linux)
# Previous tab
Cmd+Shift+[ (macOS) / Ctrl+Page Up (Linux)
# Go to last tab
Cmd+9 (macOS) / Ctrl+9 (Linux)
# Go to specific tab (1-9)
Cmd+1-8 (macOS) / Ctrl+1-8 (Linux)
# Move tab left/right
Cmd+Shift+Left/Right (macOS)
# Toggle tab overview (libadwaita)
Ctrl+Shift+Tab
Gestion par division
# New split (right)
Cmd+D (macOS) / Ctrl+Shift+D (Linux)
# New split (down)
Cmd+Shift+D (macOS) / Ctrl+Shift+Down (Linux)
# New split (auto direction)
Cmd+Shift+Enter
# Focus split (directional)
Cmd+Option+Arrow (macOS) / Ctrl+Alt+Arrow (Linux)
# Focus next split
Cmd+] (macOS) / Ctrl+Shift+] (Linux)
# Focus previous split
Cmd+[ (macOS) / Ctrl+Shift+[ (Linux)
# Zoom/unzoom current split
Cmd+Shift+Z (macOS) / Ctrl+Shift+Z (Linux)
# Resize split
Cmd+Shift+Arrow (macOS) / Ctrl+Shift+Alt+Arrow (Linux)
# Equalize all splits
Cmd+Shift+E (macOS) / Ctrl+Shift+E (Linux)
# Close split
Cmd+W (macOS) / Ctrl+Shift+W (Linux)
Opérations textuelles
Copier et coller
# Copy selection
Cmd+C (macOS) / Ctrl+Shift+C (Linux)
# Paste from clipboard
Cmd+V (macOS) / Ctrl+Shift+V (Linux)
# Paste from selection (Linux)
Shift+Insert
# Copy URL under cursor
Cmd+Shift+U (macOS) / Ctrl+Shift+U (Linux)
# Select all
Cmd+A (macOS) / Ctrl+Shift+A (Linux)
Sélection du texte
# Start selection mode
Cmd+Shift+X (macOS) / Ctrl+Shift+X (Linux)
# Select word
Double-click
# Select line
Triple-click
# Extend selection
Shift+Arrow keys
# Adjust selection
Shift+Arrow (left, right, up, down)
Shift+Page Up/Down (page selection)
Shift+Home/End (line selection)
Recherche et navigation
# Search in terminal
Cmd+F (macOS) / Ctrl+Shift+F (Linux)
# Find next
Cmd+G (macOS) / F3 (Linux)
# Find previous
Cmd+Shift+G (macOS) / Shift+F3 (Linux)
# Jump to prompt (forward/backward)
Cmd+Up/Down (macOS) / Ctrl+Shift+Up/Down (Linux)
Police et affichage
Contrôle de la taille des polices
# Increase font size
Cmd+Plus (macOS) / Ctrl+Plus (Linux)
# Decrease font size
Cmd+Minus (macOS) / Ctrl+Minus (Linux)
# Reset font size
Cmd+0 (macOS) / Ctrl+0 (Linux)
Contrôle de l'écran
# Clear screen
Cmd+K (macOS) / Ctrl+Shift+K (Linux)
# Clear screen and scrollback
Cmd+Shift+K (macOS) / Ctrl+Shift+L (Linux)
# Reset terminal
Cmd+R (macOS) / Ctrl+Shift+R (Linux)
# Scroll to top
Cmd+Home (macOS) / Ctrl+Home (Linux)
# Scroll to bottom
Cmd+End (macOS) / Ctrl+End (Linux)
# Scroll page up/down
Page Up/Page Down
# Scroll line up/down
Shift+Up/Down
Caractéristiques avancées
Terminal rapide
# Toggle quick terminal (macOS only)
Cmd+` (backtick)
# Global quick terminal (works when Ghostty not focused)
# Configure with: keybind = global:cmd+grave_accent=toggle_quick_terminal
# Quick terminal features:
# - Slides in from screen edge
# - Disappears when focus lost
# - Preserves terminal state
# - Supports splits (no tabs)
# - Singleton instance
Inspecteur et débogage
# Toggle terminal inspector
Cmd+I (macOS) / Ctrl+Shift+I (Linux)
# Show inspector
Cmd+Shift+I (macOS)
# Hide inspector
Cmd+Option+I (macOS)
# Inspector features:
# - View terminal state
# - Debug rendering issues
# - Monitor performance
# - Inspect escape sequences
Gestion de la configuration
# Open configuration file
Cmd+, (macOS) / Ctrl+, (Linux)
# Reload configuration
Cmd+Shift+R (macOS) / Ctrl+Shift+F5 (Linux)
# Configuration locations:
# macOS: ~/.config/ghostty/config
# Linux: ~/.config/ghostty/config
# Windows: %APPDATA%\ghostty\config
Exemples de configuration
Configuration de base
# ~/.config/ghostty/config
# Font settings
font-family = "JetBrains Mono"
font-size = 14
font-weight = normal
# Window settings
window-width = 120
window-height = 30
window-padding-x = 10
window-padding-y = 10
# Theme
theme = "catppuccin-mocha"
background-opacity = 0.95
# Cursor
cursor-style = block
cursor-style-blink = true
# Shell
shell-integration = true
shell-integration-features = cursor,sudo,title
Reliures de clés personnalisées
# Custom keybindings
keybind = cmd+shift+enter=new_split:auto
keybind = cmd+shift+h=new_split:left
keybind = cmd+shift+j=new_split:down
keybind = cmd+shift+k=new_split:up
keybind = cmd+shift+l=new_split:right
# Vim-style split navigation
keybind = cmd+h=goto_split:left
keybind = cmd+j=goto_split:down
keybind = cmd+k=goto_split:up
keybind = cmd+l=goto_split:right
# Quick terminal with custom key
keybind = global:cmd+grave_accent=toggle_quick_terminal
# Text operations
keybind = cmd+shift+c=copy_to_clipboard
keybind = cmd+shift+v=paste_from_clipboard
keybind = cmd+shift+u=copy_url_to_clipboard
Configuration avancée
# Performance settings
gpu-acceleration = true
renderer = auto
# Terminal behavior
scrollback-limit = 10000
mouse-hide-while-typing = true
confirm-close-surface = false
# Shell integration
shell-integration = true
shell-integration-features = cursor,sudo,title,jump
# Quick terminal settings
quick-terminal = true
quick-terminal-position = top
quick-terminal-screen = main
quick-terminal-animation-duration = 200
# Security
secure-input = false
# Appearance
window-decoration = true
window-theme = auto
macos-non-native-fullscreen = false
Thèmes et personnalisation
Thèmes intégrés
# Popular built-in themes
theme = "catppuccin-mocha"
theme = "dracula"
theme = "gruvbox-dark"
theme = "nord"
theme = "solarized-dark"
theme = "tokyo-night"
theme = "one-dark"
# List all available themes
ghostty +list-themes
# Preview themes (in theme preview interface)
# Press 'c' to copy theme name
# Press '?' for keybinding help
Schémas de couleurs personnalisés
# Custom colors
background = #1e1e2e
foreground = #cdd6f4
cursor-color = #f5e0dc
# Normal colors
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#bac2de
# Bright colors
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#a6adc8
Conseils en matière de productivité
Optimisation du flux de travail
# Use splits for multiple tasks
# Cmd+D for vertical split
# Cmd+Shift+D for horizontal split
# Navigate with Cmd+Option+Arrow
# Quick terminal for temporary tasks
# Cmd+` to toggle
# Perfect for quick commands without opening new window
# Shell integration features
# Automatic title updates
# Sudo password prompts
# Command completion
# Jump between prompts
Opérations de fichiers
# Write scrollback to file
# Configure with: keybind = cmd+shift+s=write_scrollback_file:paste
# Options: paste, open
# Write screen contents
# keybind = cmd+shift+o=write_screen_file:open
# Write selection to file
# keybind = cmd+shift+w=write_selection_file:paste
Gestion des séances
# Save and restore sessions (via shell integration)
# Automatic working directory restoration
# Command history preservation
# Environment variable restoration
# Use tmux/screen for persistent sessions
# Ghostty integrates well with terminal multiplexers
# Shell integration works with tmux/screen
Dépannage
Questions communes
# Terminal appears broken
# Use reset action: Cmd+R (macOS) / Ctrl+Shift+R (Linux)
# Font rendering issues
# Check GPU acceleration: gpu-acceleration = true/false
# Try different renderer: renderer = auto/software/opengl
# Performance issues
# Reduce scrollback: scrollback-limit = 1000
# Disable animations: quick-terminal-animation-duration = 0
# Check GPU acceleration settings
# Configuration not loading
# Check config file location
# Reload config: Cmd+Shift+R (macOS) / Ctrl+Shift+F5 (Linux)
# Check logs for errors
Déboguer les commandes
# Enable debug logging
ghostty --debug
# List all keybindings
ghostty +list-keybinds
# List default keybindings
ghostty +list-keybinds --default
# List available themes
ghostty +list-themes
# Check configuration
ghostty +validate-config
# Version information
ghostty --version
Caractéristiques spécifiques de la plateforme
Caractéristiques de macOS
# Native macOS integration
# - Touch Bar support
# - macOS notifications
# - System appearance integration
# - Secure input mode
# - Quick terminal global access
# macOS-specific shortcuts
Cmd+H # Hide all windows
Cmd+Option+W # Close all windows
Cmd+M # Minimize window
Cmd+` # Quick terminal
# macOS configuration
macos-non-native-fullscreen = false
macos-option-as-alt = true
macos-titlebar-style = transparent
Fonctionnalités Linux
# Linux-specific features
# - Wayland and X11 support
# - libadwaita integration
# - System theme integration
# - Window decoration control
# Linux-specific shortcuts
Ctrl+Shift+F12 # Toggle window decorations
F11 # Toggle fullscreen
Ctrl+Shift+Tab # Tab overview (libadwaita)
# Linux configuration
linux-cgroup = v2
wayland-app-id = com.mitchellh.ghostty
x11-instance-name = ghostty
Intégration et automatisation
Intégration Shell
# Enable shell integration
shell-integration = true
shell-integration-features = cursor,sudo,title,jump
# Features:
# - cursor: Enhanced cursor positioning
# - sudo: Secure sudo password prompts
# - title: Automatic window title updates
# - jump: Jump between command prompts
Intégration des outils externes
# Works well with:
# - tmux/screen (terminal multiplexers)
# - zsh/bash/fish (modern shells)
# - vim/neovim (text editors)
# - fzf (fuzzy finder)
# - ripgrep/ag (search tools)
# Example fzf integration
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
# Example with ripgrep
alias rg='rg --color=always --line-number --no-heading --smart-case'
Optimisation des performances
Accélération du GPU
# Enable GPU acceleration
gpu-acceleration = true
renderer = auto
# Renderer options:
# - auto: Automatic selection
# - software: CPU rendering
# - opengl: OpenGL rendering
# - metal: Metal rendering (macOS)
# - vulkan: Vulkan rendering (Linux)
Gestion de la mémoire
# Optimize memory usage
scrollback-limit = 10000
image-storage-limit = 320000000
# Reduce memory footprint
background-opacity = 1.0 # Disable transparency
cursor-style-blink = false # Disable cursor blinking
Performance de démarrage
# Fast startup
window-save-state = never
restore-state = false
# Minimal configuration for speed
theme = builtin
font-family = monospace
Caractéristiques de sécurité
Mode d'entrée sécurisé
# Toggle secure input (macOS only)
# Prevents other apps from monitoring input
# Useful for passwords and sensitive data
# Must be manually toggled off
# Configure secure input
secure-input = false # Default state
Sécurité de configuration
# Protect configuration file
chmod 600 ~/.config/ghostty/config
# Use environment variables for sensitive data
# Instead of hardcoding in config file
shell-integration-features = $\\{GHOSTTY_FEATURES\\}
Interface de ligne de commande
Commandes de base
# Launch options
ghostty # Default launch
ghostty --help # Show help
ghostty --version # Show version
ghostty --config-file=/path/to/config # Custom config
ghostty --working-directory=/path # Set working directory
# Utility commands
ghostty +list-keybinds # List all keybindings
ghostty +list-keybinds --default # List default keybindings
ghostty +list-themes # List available themes
ghostty +validate-config # Validate configuration
CLI avancé Utilisation
# Debug and development
ghostty --debug # Enable debug logging
ghostty --log-level=trace # Set log level
ghostty --renderer=software # Force software rendering
# Profile and benchmark
ghostty --profile # Enable profiling
ghostty --benchmark # Run benchmarks
# Testing and development
ghostty --test-config # Test configuration
ghostty --dry-run # Validate without launching