feat: custom kitty tab bar with system status + install scripts
Custom tab_bar.py with flat tabs, right-aligned status area (git branch, CPU%, memory, uptime, hostname, clock) using Nerd Font icons. F12/Shift+F12 toggle for tab bar. Added Kitty-setup.md, theme-setup.md, and install scripts for kitty-only and full Debian theme deployment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+125
@@ -0,0 +1,125 @@
|
||||
# Kitty Terminal Setup
|
||||
|
||||
Custom kitty terminal theme with a status bar showing system info.
|
||||
|
||||
## What You Get
|
||||
|
||||
- Borderless window (no titlebar)
|
||||
- Dark theme with orange (#D35400) accent
|
||||
- Custom tab/status bar at top with:
|
||||
- Flat tab style (0-indexed)
|
||||
- `user@` prefix for non-seth users
|
||||
- Right-aligned status: git branch, CPU%, memory, uptime, hostname, clock
|
||||
- Nerd Font icons
|
||||
- F12 to hide tab bar, Shift+F12 to show it
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **kitty** terminal (`>= 0.41`)
|
||||
- **JetBrainsMono Nerd Font** (for status bar icons)
|
||||
- **git** (for branch display in status bar)
|
||||
- **Linux** (CPU/memory/uptime read from `/proc`)
|
||||
|
||||
## Quick Install
|
||||
|
||||
```bash
|
||||
git clone https://git.sethpc.xyz/Seth/seth-linux-theme.git
|
||||
cd seth-linux-theme
|
||||
./install-kitty-theme.sh
|
||||
```
|
||||
|
||||
Or for a specific user's home:
|
||||
|
||||
```bash
|
||||
./install-kitty-theme.sh /home/username
|
||||
```
|
||||
|
||||
## Manual Install
|
||||
|
||||
### 1. Install the Nerd Font
|
||||
|
||||
```bash
|
||||
mkdir -p /tmp/nerdfonts && cd /tmp/nerdfonts
|
||||
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
|
||||
sudo mkdir -p /usr/local/share/fonts/NerdFonts
|
||||
sudo unzip -o JetBrainsMono.zip -d /usr/local/share/fonts/NerdFonts/
|
||||
sudo fc-cache -f
|
||||
```
|
||||
|
||||
Verify:
|
||||
|
||||
```bash
|
||||
fc-list | grep -i "JetBrains.*Nerd"
|
||||
```
|
||||
|
||||
### 2. Copy theme files
|
||||
|
||||
```bash
|
||||
cp kitty/kitty-theme.conf ~/.config/kitty/
|
||||
cp kitty/tab_bar.py ~/.config/kitty/
|
||||
cp kitty/tab-bar-hide.conf ~/.config/kitty/
|
||||
cp kitty/tab-bar-show.conf ~/.config/kitty/
|
||||
```
|
||||
|
||||
### 3. Set the font in kitty.conf
|
||||
|
||||
```bash
|
||||
# In ~/.config/kitty/kitty.conf, set:
|
||||
font_family JetBrainsMono Nerd Font
|
||||
font_size 11.0
|
||||
```
|
||||
|
||||
### 4. Include the theme
|
||||
|
||||
Add this line to the end of `~/.config/kitty/kitty.conf`:
|
||||
|
||||
```
|
||||
include kitty-theme.conf
|
||||
```
|
||||
|
||||
### 5. Restart kitty
|
||||
|
||||
Close and reopen kitty. Ctrl+Shift+F5 does NOT reload tab bar or font changes.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `kitty-theme.conf` | Colors, tab bar settings, keybindings |
|
||||
| `tab_bar.py` | Custom tab bar renderer (flat tabs + status area) |
|
||||
| `tab-bar-hide.conf` | Config snippet to hide tab bar |
|
||||
| `tab-bar-show.conf` | Config snippet to show tab bar |
|
||||
|
||||
## Keybindings
|
||||
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| F12 | Hide tab/status bar |
|
||||
| Shift+F12 | Show tab/status bar |
|
||||
|
||||
## Status Bar Items
|
||||
|
||||
All read from `/proc` (no subprocess overhead except git):
|
||||
|
||||
| Item | Source | Icon |
|
||||
|------|--------|------|
|
||||
| Git branch | `git rev-parse` (1s timeout) | |
|
||||
| CPU % | `/proc/stat` (delta between refreshes) | |
|
||||
| Memory | `/proc/meminfo` (used/total in GB) | |
|
||||
| Uptime | `/proc/uptime` | |
|
||||
| Hostname | `os.uname().nodename` | |
|
||||
| Clock | `datetime.now()` (HH:MM) | |
|
||||
|
||||
## Customization
|
||||
|
||||
- **Colors**: Edit `_ORANGE`, `_DIM`, `_TAB_BG`, `_BAR_BG` in `tab_bar.py`
|
||||
- **Status items**: Add/remove cells in the `if is_last:` block in `tab_bar.py`
|
||||
- **Refresh rate**: Change `tab_bar_timeout` in `kitty-theme.conf` (seconds)
|
||||
- **User prefix**: The `_prefix` logic in `tab_bar.py` shows `user@` for non-seth users
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Icons show as boxes**: Nerd Font not installed or kitty not using it. Check `font_family` in kitty.conf.
|
||||
- **Status bar not updating**: Ensure `tab_bar_timeout 60.0` is set in kitty-theme.conf.
|
||||
- **F12 does nothing**: Ensure `allow_remote_control yes` and `listen_on unix:/tmp/kitty-{kitty_pid}` are in config. Restart kitty (not just reload).
|
||||
- **CPU shows "..."**: Normal on first draw — needs two samples to compute delta.
|
||||
Reference in New Issue
Block a user