Start the starship prompt and build it from the active theme

This commit is contained in:
2026-09-21 01:07:27 +00:00
parent e74c9c5bc1
commit 64afc07250
8 changed files with 74 additions and 12 deletions
+4
View File
@@ -42,6 +42,10 @@ with `--check`.
panels come up full of blanks. `fonts.conf` binds `monospace` to
`JetBrainsMono Nerd Font`; `blob font set` rewrites the same file, and the
installer then reports it as a local change and keeps your choice.
`~/.bashrc` gets one line sourcing `session/bashrc`, which is what starts
the starship prompt and puts `blob` on `PATH` in an interactive shell. The
line is added once, a `.bak` is kept, and a `~/.bashrc` that already has it
is left alone.
`session/profile.sh` also goes to `/etc/profile.d/blob.sh`, which sources
`session/env-bootstrap` and is what puts `blob` on `PATH` in a login shell.
Without it `BLOB_PATH` and `$BLOB_PATH/bin` are only set by
+19 -4
View File
@@ -30,12 +30,13 @@ the shell and the CLI never disagree about what a slot means.
Each rendered file is picked up differently: `foot.ini` and `kitty.conf` by an
`include` in the shipped terminal config, `hyprland.lua` through Hyprland's Lua
module path, `shell.toml` and `chromium.theme` read straight from the state
directory, and `btop.theme`, `neovim.lua` and `gtk.css` through symlinks the
installer makes into those apps' own config trees.
directory, and `btop.theme`, `neovim.lua`, `gtk.css` and `starship.toml`
through symlinks the installer makes into those apps' own config trees.
`default/themed/*.tpl` are rendered per theme into
`~/.local/state/blob/current/theme/`. Ten ship: foot, kitty, btop, chromium,
hyprland, the screenshare picker, neovim, `shell.toml`, zen, and `gtk.css`.
`~/.local/state/blob/current/theme/`. Eleven ship: foot, kitty, btop, chromium,
hyprland, the screenshare picker, neovim, `shell.toml`, zen, `gtk.css`, and
`starship.toml`.
An app picks its colors up in one of two ways. Most include the generated file
directly, so nothing has to run:
@@ -65,6 +66,20 @@ so an app that was already open keeps its old colors until it is restarted.
Adding a template for another app means dropping a `.tpl` in `default/themed/`
and, if it cannot include a file, adding an applier to that list.
## The prompt
`starship.toml` is linked to `~/.config/starship.toml`. It carries a
`[palettes.blob]` block built from the theme - `accent`, `foreground`, `muted`,
`success`, `warning`, `error` - and every style in the file names one of those
rather than a literal color, so the prompt moves with the theme. Starship reads
its config on each prompt, so a theme change shows up on the next command, in
shells that are already open.
`starship init bash` runs from `session/bashrc`, which `install.sh` sources from
`~/.bashrc` with a single line. That file returns immediately in a
non-interactive shell, so it cannot disturb `scp` or `rsync`, and it also
sources `session/env-bootstrap` so `blob` is on `PATH` in any interactive shell.
## The three ways to set a theme
| Command | Does |