ghostty-rice 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ghostty_rice-0.1.0/.gitignore +13 -0
- ghostty_rice-0.1.0/LICENSE +21 -0
- ghostty_rice-0.1.0/PKG-INFO +202 -0
- ghostty_rice-0.1.0/README.md +171 -0
- ghostty_rice-0.1.0/README_ZH.md +173 -0
- ghostty_rice-0.1.0/ghostty_rice/__init__.py +3 -0
- ghostty_rice-0.1.0/ghostty_rice/cli.py +191 -0
- ghostty_rice-0.1.0/ghostty_rice/paths.py +37 -0
- ghostty_rice-0.1.0/ghostty_rice/platform.py +343 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/Catppuccin Mocha +11 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/Cyber +11 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/Frosted +11 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/Minimal +10 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/Rose Pine +11 -0
- ghostty_rice-0.1.0/ghostty_rice/presets/manifest.toml +24 -0
- ghostty_rice-0.1.0/ghostty_rice/preview.py +137 -0
- ghostty_rice-0.1.0/ghostty_rice/profile.py +151 -0
- ghostty_rice-0.1.0/ghostty_rice/reload.py +11 -0
- ghostty_rice-0.1.0/pyproject.toml +59 -0
- ghostty_rice-0.1.0/tests/__init__.py +0 -0
- ghostty_rice-0.1.0/tests/unit/__init__.py +0 -0
- ghostty_rice-0.1.0/tests/unit/test_cli.py +32 -0
- ghostty_rice-0.1.0/tests/unit/test_platform.py +28 -0
- ghostty_rice-0.1.0/tests/unit/test_profile.py +77 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jayleonc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ghostty-rice
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Full visual profile manager for Ghostty terminal — beyond just colors.
|
|
5
|
+
Project-URL: Homepage, https://github.com/jayleonc/ghostty-rice
|
|
6
|
+
Project-URL: Repository, https://github.com/jayleonc/ghostty-rice
|
|
7
|
+
Project-URL: Issues, https://github.com/jayleonc/ghostty-rice/issues
|
|
8
|
+
Author: jayleonc
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: customization,ghostty,rice,terminal,theme
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: click>=8.1
|
|
23
|
+
Requires-Dist: rich>=13.0
|
|
24
|
+
Requires-Dist: tomli>=2.0; python_version < '3.11'
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<h1 align="center">🍚 ghostty-rice</h1>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<b>Full visual profile manager for <a href="https://ghostty.org">Ghostty</a> — beyond just colors.</b>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://pypi.org/project/ghostty-rice/"><img src="https://img.shields.io/pypi/v/ghostty-rice?style=flat-square&color=blue&logo=pypi&logoColor=white" alt="PyPI"></a>
|
|
40
|
+
<img src="https://img.shields.io/pypi/pyversions/ghostty-rice?style=flat-square&logo=python&logoColor=white" alt="Python">
|
|
41
|
+
<a href="https://github.com/jayleonc/ghostty-rice/actions"><img src="https://img.shields.io/github/actions/workflow/status/jayleonc/ghostty-rice/ci.yml?style=flat-square&label=CI&logo=github" alt="CI"></a>
|
|
42
|
+
<a href="https://github.com/jayleonc/ghostty-rice/blob/main/LICENSE"><img src="https://img.shields.io/github/license/jayleonc/ghostty-rice?style=flat-square" alt="License"></a>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<b>English</b> • <a href="./README_ZH.md">简体中文</a>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
Color themes only change 16 ANSI colors. **ghostty-rice** manages complete visual profiles — colors, opacity, blur, titlebar, cursor, padding, icons — and switches them with a single command.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
rice use "Catppuccin Mocha" # Switch profile, auto-reloads Ghostty
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Why ghostty-rice?
|
|
58
|
+
|
|
59
|
+
Projects like [catppuccin/ghostty](https://github.com/catppuccin/ghostty) and [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) are color palettes. A terminal's look is more than 16 colors:
|
|
60
|
+
|
|
61
|
+
| Other Color Schemes | 🍚 `ghostty-rice` |
|
|
62
|
+
|---------------------|-------------------|
|
|
63
|
+
| ✅ Foreground & Background | ✅ **Everything they do, plus:** |
|
|
64
|
+
| ✅ 16 ANSI Palette Colors | ✅ Window Opacity & Blur Effects |
|
|
65
|
+
| ❌ Titlebar Style | ✅ Titlebar Style (tabs, transparent, hidden) |
|
|
66
|
+
| ❌ Cursor Customization | ✅ Cursor Shape, Color & Animation |
|
|
67
|
+
| ❌ Window Spacing | ✅ Window Padding & Spacing |
|
|
68
|
+
| ❌ App Icon | ✅ App Icon Variant |
|
|
69
|
+
|
|
70
|
+
## Install
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pipx install ghostty-rice
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary>Other methods</summary>
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# With pip
|
|
81
|
+
pip install ghostty-rice
|
|
82
|
+
|
|
83
|
+
# From source
|
|
84
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
85
|
+
cd ghostty-rice
|
|
86
|
+
pip install -e .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
## Quick Start
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# List available profiles
|
|
95
|
+
rice list
|
|
96
|
+
|
|
97
|
+
# Switch profile (auto-reloads Ghostty)
|
|
98
|
+
rice use "Catppuccin Mocha"
|
|
99
|
+
|
|
100
|
+
# Preview without switching
|
|
101
|
+
rice preview "Cyber"
|
|
102
|
+
|
|
103
|
+
# Check setup
|
|
104
|
+
rice doctor
|
|
105
|
+
|
|
106
|
+
# See current profile
|
|
107
|
+
rice current
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Built-in Profiles
|
|
111
|
+
|
|
112
|
+
| Profile | Style |
|
|
113
|
+
|---------|-------|
|
|
114
|
+
| ☕ **Catppuccin Mocha** | Warm, cozy, the most popular dev palette |
|
|
115
|
+
| 🌲 **Rose Pine** | Elegant dark with automatic light/dark switching |
|
|
116
|
+
| 🤖 **Cyber** | High transparency, hidden chrome, holographic icon |
|
|
117
|
+
| ⬜ **Minimal** | No titlebar, no blur, just code |
|
|
118
|
+
| 🧊 **Frosted** | macOS native frosted glass, light mode |
|
|
119
|
+
|
|
120
|
+
## Custom Profiles
|
|
121
|
+
|
|
122
|
+
Profile files follow Ghostty's own format — plain `key = value`, no file extension, filename is the profile name.
|
|
123
|
+
|
|
124
|
+
**1. Create from an existing profile:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
rice create "My Theme" --from "Catppuccin Mocha"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**2. Or write one from scratch:**
|
|
131
|
+
|
|
132
|
+
Create a file in your Ghostty config directory under `rice-profiles/`:
|
|
133
|
+
|
|
134
|
+
| Platform | Path |
|
|
135
|
+
|----------|------|
|
|
136
|
+
| macOS | `~/Library/Application Support/com.mitchellh.ghostty/rice-profiles/` |
|
|
137
|
+
| Linux | `~/.config/ghostty/rice-profiles/` |
|
|
138
|
+
|
|
139
|
+
```ini
|
|
140
|
+
theme = Catppuccin Mocha
|
|
141
|
+
background-opacity = 0.90
|
|
142
|
+
background-blur = macos-glass-regular
|
|
143
|
+
macos-titlebar-style = transparent
|
|
144
|
+
window-padding-x = 12
|
|
145
|
+
window-padding-y = 8
|
|
146
|
+
cursor-style = block
|
|
147
|
+
cursor-style-blink = true
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**3. Add metadata** (optional) in `manifest.toml` alongside your profiles:
|
|
151
|
+
|
|
152
|
+
```toml
|
|
153
|
+
[profiles."My Theme"]
|
|
154
|
+
description = "My custom visual profile"
|
|
155
|
+
author = "me"
|
|
156
|
+
tags = ["dark", "custom"]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**4. Use it:**
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
rice use "My Theme"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Diagnostics
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
rice doctor
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Checks Ghostty installation, version, running state, automation permissions, config directory, and profile status in one command.
|
|
172
|
+
|
|
173
|
+
## How It Works
|
|
174
|
+
|
|
175
|
+
ghostty-rice preserves your base Ghostty config (shell, fonts, keybinds) and only manages the visual profile section. When you switch profiles:
|
|
176
|
+
|
|
177
|
+
1. Your base config stays untouched
|
|
178
|
+
2. The profile section is replaced
|
|
179
|
+
3. Ghostty is auto-reloaded (macOS: native AppleScript API, Linux: xdotool)
|
|
180
|
+
|
|
181
|
+
## Platform Support
|
|
182
|
+
|
|
183
|
+
| Platform | Profile switching | Auto-reload |
|
|
184
|
+
|----------|------------------|-------------|
|
|
185
|
+
| macOS | Full | Native AppleScript API |
|
|
186
|
+
| Linux | Full | Via xdotool (optional) |
|
|
187
|
+
|
|
188
|
+
## Contributing
|
|
189
|
+
|
|
190
|
+
Contributions welcome — especially new profiles, platform support, and shader management.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
194
|
+
cd ghostty-rice
|
|
195
|
+
uv venv .venv && source .venv/bin/activate
|
|
196
|
+
uv pip install -e ".[dev]"
|
|
197
|
+
pytest
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<h1 align="center">🍚 ghostty-rice</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<b>Full visual profile manager for <a href="https://ghostty.org">Ghostty</a> — beyond just colors.</b>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.org/project/ghostty-rice/"><img src="https://img.shields.io/pypi/v/ghostty-rice?style=flat-square&color=blue&logo=pypi&logoColor=white" alt="PyPI"></a>
|
|
9
|
+
<img src="https://img.shields.io/pypi/pyversions/ghostty-rice?style=flat-square&logo=python&logoColor=white" alt="Python">
|
|
10
|
+
<a href="https://github.com/jayleonc/ghostty-rice/actions"><img src="https://img.shields.io/github/actions/workflow/status/jayleonc/ghostty-rice/ci.yml?style=flat-square&label=CI&logo=github" alt="CI"></a>
|
|
11
|
+
<a href="https://github.com/jayleonc/ghostty-rice/blob/main/LICENSE"><img src="https://img.shields.io/github/license/jayleonc/ghostty-rice?style=flat-square" alt="License"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<b>English</b> • <a href="./README_ZH.md">简体中文</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
Color themes only change 16 ANSI colors. **ghostty-rice** manages complete visual profiles — colors, opacity, blur, titlebar, cursor, padding, icons — and switches them with a single command.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
rice use "Catppuccin Mocha" # Switch profile, auto-reloads Ghostty
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why ghostty-rice?
|
|
27
|
+
|
|
28
|
+
Projects like [catppuccin/ghostty](https://github.com/catppuccin/ghostty) and [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) are color palettes. A terminal's look is more than 16 colors:
|
|
29
|
+
|
|
30
|
+
| Other Color Schemes | 🍚 `ghostty-rice` |
|
|
31
|
+
|---------------------|-------------------|
|
|
32
|
+
| ✅ Foreground & Background | ✅ **Everything they do, plus:** |
|
|
33
|
+
| ✅ 16 ANSI Palette Colors | ✅ Window Opacity & Blur Effects |
|
|
34
|
+
| ❌ Titlebar Style | ✅ Titlebar Style (tabs, transparent, hidden) |
|
|
35
|
+
| ❌ Cursor Customization | ✅ Cursor Shape, Color & Animation |
|
|
36
|
+
| ❌ Window Spacing | ✅ Window Padding & Spacing |
|
|
37
|
+
| ❌ App Icon | ✅ App Icon Variant |
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pipx install ghostty-rice
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
<details>
|
|
46
|
+
<summary>Other methods</summary>
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# With pip
|
|
50
|
+
pip install ghostty-rice
|
|
51
|
+
|
|
52
|
+
# From source
|
|
53
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
54
|
+
cd ghostty-rice
|
|
55
|
+
pip install -e .
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
</details>
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# List available profiles
|
|
64
|
+
rice list
|
|
65
|
+
|
|
66
|
+
# Switch profile (auto-reloads Ghostty)
|
|
67
|
+
rice use "Catppuccin Mocha"
|
|
68
|
+
|
|
69
|
+
# Preview without switching
|
|
70
|
+
rice preview "Cyber"
|
|
71
|
+
|
|
72
|
+
# Check setup
|
|
73
|
+
rice doctor
|
|
74
|
+
|
|
75
|
+
# See current profile
|
|
76
|
+
rice current
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Built-in Profiles
|
|
80
|
+
|
|
81
|
+
| Profile | Style |
|
|
82
|
+
|---------|-------|
|
|
83
|
+
| ☕ **Catppuccin Mocha** | Warm, cozy, the most popular dev palette |
|
|
84
|
+
| 🌲 **Rose Pine** | Elegant dark with automatic light/dark switching |
|
|
85
|
+
| 🤖 **Cyber** | High transparency, hidden chrome, holographic icon |
|
|
86
|
+
| ⬜ **Minimal** | No titlebar, no blur, just code |
|
|
87
|
+
| 🧊 **Frosted** | macOS native frosted glass, light mode |
|
|
88
|
+
|
|
89
|
+
## Custom Profiles
|
|
90
|
+
|
|
91
|
+
Profile files follow Ghostty's own format — plain `key = value`, no file extension, filename is the profile name.
|
|
92
|
+
|
|
93
|
+
**1. Create from an existing profile:**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
rice create "My Theme" --from "Catppuccin Mocha"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**2. Or write one from scratch:**
|
|
100
|
+
|
|
101
|
+
Create a file in your Ghostty config directory under `rice-profiles/`:
|
|
102
|
+
|
|
103
|
+
| Platform | Path |
|
|
104
|
+
|----------|------|
|
|
105
|
+
| macOS | `~/Library/Application Support/com.mitchellh.ghostty/rice-profiles/` |
|
|
106
|
+
| Linux | `~/.config/ghostty/rice-profiles/` |
|
|
107
|
+
|
|
108
|
+
```ini
|
|
109
|
+
theme = Catppuccin Mocha
|
|
110
|
+
background-opacity = 0.90
|
|
111
|
+
background-blur = macos-glass-regular
|
|
112
|
+
macos-titlebar-style = transparent
|
|
113
|
+
window-padding-x = 12
|
|
114
|
+
window-padding-y = 8
|
|
115
|
+
cursor-style = block
|
|
116
|
+
cursor-style-blink = true
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**3. Add metadata** (optional) in `manifest.toml` alongside your profiles:
|
|
120
|
+
|
|
121
|
+
```toml
|
|
122
|
+
[profiles."My Theme"]
|
|
123
|
+
description = "My custom visual profile"
|
|
124
|
+
author = "me"
|
|
125
|
+
tags = ["dark", "custom"]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**4. Use it:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
rice use "My Theme"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Diagnostics
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
rice doctor
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Checks Ghostty installation, version, running state, automation permissions, config directory, and profile status in one command.
|
|
141
|
+
|
|
142
|
+
## How It Works
|
|
143
|
+
|
|
144
|
+
ghostty-rice preserves your base Ghostty config (shell, fonts, keybinds) and only manages the visual profile section. When you switch profiles:
|
|
145
|
+
|
|
146
|
+
1. Your base config stays untouched
|
|
147
|
+
2. The profile section is replaced
|
|
148
|
+
3. Ghostty is auto-reloaded (macOS: native AppleScript API, Linux: xdotool)
|
|
149
|
+
|
|
150
|
+
## Platform Support
|
|
151
|
+
|
|
152
|
+
| Platform | Profile switching | Auto-reload |
|
|
153
|
+
|----------|------------------|-------------|
|
|
154
|
+
| macOS | Full | Native AppleScript API |
|
|
155
|
+
| Linux | Full | Via xdotool (optional) |
|
|
156
|
+
|
|
157
|
+
## Contributing
|
|
158
|
+
|
|
159
|
+
Contributions welcome — especially new profiles, platform support, and shader management.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
163
|
+
cd ghostty-rice
|
|
164
|
+
uv venv .venv && source .venv/bin/activate
|
|
165
|
+
uv pip install -e ".[dev]"
|
|
166
|
+
pytest
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<h1 align="center">🍚 ghostty-rice</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<b><a href="https://ghostty.org">Ghostty</a> 终端的全方位视觉配置管理器 —— 不只是换颜色。</b>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.org/project/ghostty-rice/"><img src="https://img.shields.io/pypi/v/ghostty-rice?style=flat-square&color=blue&logo=pypi&logoColor=white" alt="PyPI"></a>
|
|
9
|
+
<img src="https://img.shields.io/pypi/pyversions/ghostty-rice?style=flat-square&logo=python&logoColor=white" alt="Python">
|
|
10
|
+
<a href="https://github.com/jayleonc/ghostty-rice/actions"><img src="https://img.shields.io/github/actions/workflow/status/jayleonc/ghostty-rice/ci.yml?style=flat-square&label=CI&logo=github" alt="CI"></a>
|
|
11
|
+
<a href="https://github.com/jayleonc/ghostty-rice/blob/main/LICENSE"><img src="https://img.shields.io/github/license/jayleonc/ghostty-rice?style=flat-square" alt="License"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="./README.md">English</a> • <b>简体中文</b>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
传统主题只改 16 色调色盘。**ghostty-rice** 管理完整的视觉方案 —— 颜色、透明度、毛玻璃、标题栏、光标、边距、图标 —— 一条命令全部切换。
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
rice use "Catppuccin Mocha" # 切换方案,Ghostty 自动重载
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 为什么需要 ghostty-rice?
|
|
27
|
+
|
|
28
|
+
[catppuccin/ghostty](https://github.com/catppuccin/ghostty) 和 [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) 是优秀的调色盘项目。但终端的视觉体验远不止 16 个颜色:
|
|
29
|
+
|
|
30
|
+
| 传统调色盘项目 | 🍚 `ghostty-rice` |
|
|
31
|
+
|---------------|-------------------|
|
|
32
|
+
| ✅ 前景色与背景色 | ✅ **涵盖左侧所有内容,外加:** |
|
|
33
|
+
| ✅ 16 色 ANSI 调色盘 | ✅ 窗口透明度与毛玻璃效果 |
|
|
34
|
+
| ❌ 标题栏样式 | ✅ 标题栏样式(标签页 / 透明 / 隐藏) |
|
|
35
|
+
| ❌ 光标定制 | ✅ 光标形状、颜色与动画 |
|
|
36
|
+
| ❌ 窗口内外边距 | ✅ 窗口内边距定制 |
|
|
37
|
+
| ❌ App 图标 | ✅ App 图标一键切换 |
|
|
38
|
+
|
|
39
|
+
**一句话:它们是调色盘,我们是整套视觉方案。**
|
|
40
|
+
|
|
41
|
+
## 安装
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pipx install ghostty-rice
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary>其他安装方式</summary>
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# pip 安装
|
|
52
|
+
pip install ghostty-rice
|
|
53
|
+
|
|
54
|
+
# 从源码安装
|
|
55
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
56
|
+
cd ghostty-rice
|
|
57
|
+
pip install -e .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
## 快速上手
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 查看所有可用方案
|
|
66
|
+
rice list
|
|
67
|
+
|
|
68
|
+
# 切换方案(自动重载 Ghostty)
|
|
69
|
+
rice use "Catppuccin Mocha"
|
|
70
|
+
|
|
71
|
+
# 预览方案(不切换)
|
|
72
|
+
rice preview "Cyber"
|
|
73
|
+
|
|
74
|
+
# 一键检查环境
|
|
75
|
+
rice doctor
|
|
76
|
+
|
|
77
|
+
# 查看当前方案
|
|
78
|
+
rice current
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 内置方案
|
|
82
|
+
|
|
83
|
+
| 方案 | 风格 |
|
|
84
|
+
|------|------|
|
|
85
|
+
| ☕ **Catppuccin Mocha** | 温暖柔和,程序员圈最火的配色 |
|
|
86
|
+
| 🌲 **Rose Pine** | 优雅暗色,跟随系统自动切换明暗 |
|
|
87
|
+
| 🤖 **Cyber** | 赛博朋克 —— 高透明度、隐藏标题栏、全息图标 |
|
|
88
|
+
| ⬜ **Minimal** | 极简 —— 无标题栏、无模糊、只有代码 |
|
|
89
|
+
| 🧊 **Frosted** | macOS 原生毛玻璃,亮色模式 |
|
|
90
|
+
|
|
91
|
+
## 自定义方案
|
|
92
|
+
|
|
93
|
+
方案文件完全遵循 Ghostty 原生格式 —— 纯 `key = value`,无文件扩展名,文件名即方案名。
|
|
94
|
+
|
|
95
|
+
**1. 从已有方案创建:**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
rice create "My Theme" --from "Catppuccin Mocha"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**2. 或者从零开始:**
|
|
102
|
+
|
|
103
|
+
在 Ghostty 配置目录的 `rice-profiles/` 下创建文件:
|
|
104
|
+
|
|
105
|
+
| 平台 | 路径 |
|
|
106
|
+
|------|------|
|
|
107
|
+
| macOS | `~/Library/Application Support/com.mitchellh.ghostty/rice-profiles/` |
|
|
108
|
+
| Linux | `~/.config/ghostty/rice-profiles/` |
|
|
109
|
+
|
|
110
|
+
```ini
|
|
111
|
+
theme = Catppuccin Mocha
|
|
112
|
+
background-opacity = 0.90
|
|
113
|
+
background-blur = macos-glass-regular
|
|
114
|
+
macos-titlebar-style = transparent
|
|
115
|
+
window-padding-x = 12
|
|
116
|
+
window-padding-y = 8
|
|
117
|
+
cursor-style = block
|
|
118
|
+
cursor-style-blink = true
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**3. 添加元数据**(可选),在同目录下的 `manifest.toml` 中:
|
|
122
|
+
|
|
123
|
+
```toml
|
|
124
|
+
[profiles."My Theme"]
|
|
125
|
+
description = "我的自定义方案"
|
|
126
|
+
author = "me"
|
|
127
|
+
tags = ["dark", "custom"]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**4. 使用:**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
rice use "My Theme"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 环境诊断
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
rice doctor
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
一键检查:Ghostty 安装状态、版本号、运行状态、自动化权限、配置目录、方案加载情况。
|
|
143
|
+
|
|
144
|
+
## 工作原理
|
|
145
|
+
|
|
146
|
+
ghostty-rice 会保留你的基础配置(Shell、字体、快捷键等),只管理视觉方案部分。切换时:
|
|
147
|
+
|
|
148
|
+
1. 基础配置原封不动
|
|
149
|
+
2. 视觉方案部分被替换
|
|
150
|
+
3. Ghostty 自动重载(macOS 通过原生 AppleScript API,Linux 通过 xdotool)
|
|
151
|
+
|
|
152
|
+
## 平台支持
|
|
153
|
+
|
|
154
|
+
| 平台 | 方案切换 | 自动重载 |
|
|
155
|
+
|------|---------|---------|
|
|
156
|
+
| macOS | 完整支持 | 原生 AppleScript API |
|
|
157
|
+
| Linux | 完整支持 | xdotool(可选) |
|
|
158
|
+
|
|
159
|
+
## 参与贡献
|
|
160
|
+
|
|
161
|
+
欢迎贡献 —— 特别是新的视觉方案、平台支持、Shader 管理。
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git clone https://github.com/jayleonc/ghostty-rice.git
|
|
165
|
+
cd ghostty-rice
|
|
166
|
+
uv venv .venv && source .venv/bin/activate
|
|
167
|
+
uv pip install -e ".[dev]"
|
|
168
|
+
pytest
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## 开源协议
|
|
172
|
+
|
|
173
|
+
[MIT](LICENSE)
|