Files
kalina-ci/shell/README.md
T
Kalina 6882349bf4 feat(shell): Kalina-CI-Prompt und Installer fuer weitere Maschinen (#2)
prompt.zsh: zweizeiliger zsh-Prompt aus den CI-Token (Tinte, Knochenweiss, Markenrot nur als Grafik, Text-Rot fuer Fehlercodes, Salbei nur an Git). install.sh: idempotent, sichert jede Datei, erkennt foot/qterminal/xfce4-terminal/xterm und prueft mit zsh -n, foot --check-config und xrdb.
2026-11-02 18:29:25 +01:00

67 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Kalina CI in der Shell
Prompt und Terminal-Palette in derselben Farbwelt wie das VS-Code-Theme
(`themes/kalina-ci-dark.json`). Der Prompt ist ein eigenstaendiges zsh-Modul,
kein oh-my-zsh und kein powerlevel10k noetig.
```
┌─ kalina ~/kalina-ci · main ✚1 ✎2 · 4.2s
└─ ❯
```
| Farbe | Wert | Rolle |
|---|---|---|
| Tinte | `#0B0F14` | Flaeche |
| Knochenweiss | `#F5F5EF` | Text, Pfad |
| Markenrot | `#C1121F` | **nur Grafik** (Pfeil, Cursor) — 3,09:1 auf Tinte |
| Text-Rot | `#E0454F` | Fehlercode, Akzent — 4,70:1 auf Tinte |
| Salbei | `#7FA88C` | **nur** Git „hinzugefuegt" |
| Steel | `#3A4250` | Linien |
| Muted | `#8A94A2` | Hostname |
## Installation auf einer neuen Maschine
```sh
git clone http://192.168.188.161:3000/mm/kalina-ci.git
cd kalina-ci/shell
./install.sh --dry-run # zeigen, was passieren wuerde
./install.sh # ausfuehren
```
Das Skript ist idempotent, sichert jede Datei nach `.vor-kalina-ci-<stempel>`
und laesst sich in Teilen fahren:
| Schalter | Wirkung |
|---|---|
| `--dry-run` | nichts schreiben, nur anzeigen |
| `--shell-only` | nur zsh + Prompt |
| `--terminal-only` | nur Terminal-Palette |
| `--no-chsh` | Login-Shell nicht umstellen |
Erkannt und eingerichtet werden: **foot** (`~/.config/foot/foot.ini`,
`[colors-dark]`), **qterminal** (`~/.local/share/qterminal-ci/…/KalinaCI.colorscheme`
plus `~/.config/qterminal.org/qterminal.ini` und ein `environment.d`-Eintrag,
weil qtermwidget6 nur `XDG_DATA_DIRS` durchsucht), **xfce4-terminal**
(`~/.config/xfce4/terminal/terminalrc` **und** `xfconf-query`, sonst gewinnt
das GTK-Theme) sowie **xterm** (`~/.Xresources`, aktiv nach `xrdb -merge`).
## Schalter im Prompt
| Variable | Wirkung |
|---|---|
| `KALINA_CI_PROMPT=0` | Prompt abschalten (Modul wird nicht geladen) |
| `KALINA_CI_NO_NEWLINE=1` | keine Leerzeile vor dem Prompt |
| `KALINA_CI_TRUECOLOR=0\|1` | Farbmodus erzwingen (sonst Automatik) |
## Fallen, die beim Ausrollen aufgefallen sind
- **Truecolor kommt per SSH nicht an.** `COLORTERM` wird nicht uebertragen, remote
greift der 256-Farben-Ersatz (231/145/60/161 statt exakt). Das ist gewollt.
- **Der erste Prompt darf kein `✗1` zeigen.** `precmd` liest `$?` aus dem Ende der
`.zshrc`; das Modul setzt den ersten echten Prompt deshalb auf 0.
- **p10k wird abgeloest, nicht umgef aerbt.** Wer `~/.p10k.zsh` behaelt, muss
`ZSH_THEME=""` setzen und die Instant-Prompt-Zeilen samt `fi` auskommentieren —
sonst startet jede Shell mit `parse error near 'fi'`.
- **Login-Shell-Wechsel:** nicht-interaktive zsh-Aufrufe (`ssh host '…'`) brechen bei
leerem Glob ab, bash nicht. Das Modul setzt deshalb `no_nomatch` in `~/.zshenv`.