A terminal UI for managing Ghostty terminal emulator settings
Project description
Ghostty Settings TUI
A terminal user interface for managing Ghostty terminal emulator configuration.
Overview
Ghostty Settings TUI provides an intuitive, interactive terminal-based interface for viewing and editing your Ghostty configuration. Instead of manually editing the config file, you can navigate through categorized options, search for specific settings, and make changes with real-time validation. Built with Textual, it offers a modern experience for managing terminal settings.
Features
- Category Navigation: Browse options organized into logical categories (Font, Colors, Cursor, Window, Shell, Keybindings, macOS, Linux, X11, Wayland, and more)
- Real-time Search: Fuzzy search across all configuration options, descriptions, and categories
- Type-Aware Display: View and understand all option types including booleans, strings, integers, floats, colors, enums, paths, and keybindings
- Smart Validation: Type-specific validation for configuration values
- Configuration Management: Read and write to Ghostty config file with automatic backup support
- Keyboard Navigation: Full keyboard-driven interface with intuitive shortcuts
- Environment-Aware: Respects
XDG_CONFIG_HOMEand standard Ghostty config locations - Dracula Theme: Beautiful Dracula-inspired color scheme
Requirements
- Python 3.10 or higher
- Ghostty terminal emulator installed and accessible in PATH
- Terminal with at least 80x24 characters
Installation
From PyPI (Recommended)
pip install ghostty-tui
From Source
git clone https://github.com/necoli1822/ghostty-tui.git
cd ghostty-tui
pip install -e .
Development Setup
pip install -e ".[dev]"
Usage
Basic Usage
# Launch the TUI
ghostty-tui
# Or using Python module
python -m ghostty_tui
Command Line Options
ghostty-tui --help # Show help message
ghostty-tui --version # Show version
ghostty-tui --config /path/to/custom/config # Use custom config file
ghostty-tui --schema-file /path/to/schema.txt # Use schema from file (testing)
Keyboard Shortcuts
| Key | Action |
|---|---|
Tab / Shift+Tab |
Navigate between widgets (search input, category list, options panel) |
↑ / ↓ |
Scroll through categories or options |
Enter / Space |
Select a category |
Ctrl+S |
Save configuration to file |
/ |
Focus search input to filter options |
Escape |
Clear search query and return to category view |
? |
Display help screen |
Ctrl+Q |
Quit application |
Workflow Examples
Browse by Category
- Launch
ghostty-tui - Use arrow keys to navigate category list
- Press Enter to select a category
- View all options in that category with their current values, defaults, and descriptions
Search for an Option
- Press
/to focus the search input - Type a partial option name (e.g., "font-size", "cursor", "background")
- Results appear instantly, sorted by relevance
- Press Escape to clear search and return to category view
View Option Details
Each option displays:
- Name: The configuration option identifier
- Type: The expected value type (boolean, string, integer, color, enum, etc.)
- Current Value: What's currently set (or empty if using default)
- Default Value: The built-in default
- Valid Options: For enum types, the list of valid values
- Description: Explanation of what the option does
- Status: An asterisk (*) indicates modified values
Configuration
The application reads and writes to your Ghostty config file location:
- Linux/Unix:
~/.config/ghostty/config(respects$XDG_CONFIG_HOME) - macOS:
~/.config/ghostty/config
If the config file doesn't exist, it will be created when you save changes.
Config File Format
# Ghostty configuration - standard format
font-family = "Monospace"
font-size = 14
cursor-style = bar
background = #1a1b26
foreground = #c0caf5
# Comments and blank lines are preserved
keybind = super+c=copy_to_clipboard
keybind = super+v=paste_from_clipboard
Development
Setup Development Environment
# Install with development dependencies
pip install -e ".[dev]"
Running Tests
pytest
Type Checking
mypy src/ghostty_tui
Code Formatting and Linting
# Check code style
ruff check src/ghostty_tui tests
# Format code
ruff format src/ghostty_tui tests
Project Structure
ghostty_setting_tui/
├── src/ghostty_tui/
│ ├── __init__.py # Package initialization and public API
│ ├── __main__.py # CLI entry point with argument parsing
│ ├── app.py # Main Textual application and UI logic
│ ├── models.py # Data classes for options, config, and app state
│ ├── parser.py # Ghostty schema parser
│ ├── config_manager.py # Config file read/write operations
│ ├── categories.py # Category definitions and sorting logic
│ ├── search.py # Search functionality
│ ├── exceptions.py # Custom exception classes
│ ├── widgets/ # Custom Textual widgets
│ │ ├── __init__.py
│ │ ├── sidebar.py # Category sidebar widget
│ │ ├── option_panel.py # Options display panel
│ │ ├── option_row.py # Individual option row
│ │ ├── option_input.py # Text input widget for options
│ │ ├── option_select.py # Dropdown/enum selector widget
│ │ └── option_toggle.py # Boolean toggle widget
│ ├── screens/ # Textual screens
│ │ ├── __init__.py
│ │ ├── main_screen.py # Main application screen
│ │ └── help_screen.py # Help/keybindings screen
│ └── styles/ # CSS styling files
│ └── app.tcss # Textual CSS stylesheet
├── tests/ # Test suite
├── sample_data/ # Sample config and schema files for testing
└── pyproject.toml # Project configuration and dependencies
Configuration Categories
Options are automatically organized into these categories:
- Font: Font family, size, and styling
- Colors: Color palette and color scheme settings
- Theme: Theme and appearance customization
- Cursor: Cursor style and behavior
- Window: Window size, position, and decoration
- Mouse: Mouse behavior and interactions
- Clipboard: Copy and paste behavior
- Scrollback: Scrollback buffer configuration
- Shell: Shell command and working directory settings
- Terminal: Terminal behavior and emulation
- Keybindings: Custom keyboard shortcuts
- Links: URL and link handling
- Behavior: General behavior settings
- macOS: macOS-specific configuration
- GTK/Linux: GTK and Linux-specific settings
- X11: X11-specific configuration
- Wayland: Wayland-specific settings
- Advanced: Advanced/internal settings
- Other: Miscellaneous settings
Supported Option Types
The application understands and displays information about these option types:
- Boolean: True/false values
- String: Text values
- Integer: Whole numbers
- Float: Decimal numbers
- Color: Hex color codes (e.g.,
#1a1b26) - Enum: Predefined set of valid values
- Path: File system paths
- Keybind: Keyboard shortcuts
Error Handling
The application handles common errors gracefully:
- Ghostty Not Found: If Ghostty is not installed, you'll be notified with instructions
- Config File Missing: The config directory will be created when saving if needed
- Schema Parsing Errors: Detailed error messages help diagnose schema issues
- Permission Errors: Clear feedback if config file can't be read or written
- Terminal Size: Application requires minimum 80x24 terminal dimensions
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Roadmap
Potential future enhancements:
- Profile management (save/load configuration profiles)
- Diff view (see what changed before saving)
- Theme preview (live preview of color changes)
- Configuration validation against Ghostty's type system
- Integration with Ghostty's live reload feature
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Ghostty - The amazing terminal emulator
- Textual - Modern TUI framework for Python
- Community contributors and testers
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghostty_tui-0.1.0.tar.gz.
File metadata
- Download URL: ghostty_tui-0.1.0.tar.gz
- Upload date:
- Size: 39.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02eecb74dfc9a10d5830c39fa79753005779d2e1f87647d4251071208f975ef9
|
|
| MD5 |
a3410299fdf091f73a1a67a6a551af0c
|
|
| BLAKE2b-256 |
a2ff27cba4badcf596389a0f55384f6a2b44a8b3ee1fefafc513ece76e6bb3f8
|
File details
Details for the file ghostty_tui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ghostty_tui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccea505c1ad6812a7a99b4b59ea018382c79be1ed87e3d97dbe40def2db91db2
|
|
| MD5 |
853fc1f6c0eb380ea250d6a4f26d6db0
|
|
| BLAKE2b-256 |
5d0304f9918ab5d3f7b1bc44b3146f9194f45c14602116bd4235b4a1bf0a18c2
|