prompt now display contextual infos

This commit is contained in:
fatalerrors
2026-05-20 14:14:06 +02:00
parent 28e4c112af
commit d22b24e54c
14 changed files with 159 additions and 6 deletions

View File

@@ -308,7 +308,7 @@ PROMPT_COLOR_USER_FG = $ICyan
PROMPT_COLOR_DIR_FG = $IYellow
```
The eleven available `PROMPT_COLOR_*` keys are:
The twelve available `PROMPT_COLOR_*` keys are:
| Key | Role |
|---|---|
@@ -319,6 +319,28 @@ The eleven available `PROMPT_COLOR_*` keys are:
| `PROMPT_COLOR_ROOT_FG` | Username colour when running as root |
| `PROMPT_COLOR_USER_FG` | Username@host colour for normal users |
| `PROMPT_COLOR_DIR_FG` | Working directory colour |
| `PROMPT_COLOR_CTX_FG` | Git/Conda context segment colour at end of top bar |
**Top-bar context segment (Git / Conda):**
```ini
[prompt]
PROMPT_SHOW_GIT = 1
PROMPT_SHOW_GIT_STATUS = 1
PROMPT_SHOW_CONDA = 1
PROMPT_SHOW_VENV = 1
PROMPT_SHOW_SESSION = 1
```
When enabled, the top prompt bar appends:
- `git:<branch>` when inside a Git repository
- `git:<branch>*` when local changes are present
- `git:<branch> +N/-M` when ahead/behind upstream
- `conda:<env>` when a Conda environment is active
- `venv:<name>` when a Python virtualenv is active (and Conda is not)
- `ssh`, `tmux`, `screen` markers when the session runs in those contexts
- both, separated by `|`, when both are available
**Writing a custom theme file:**