Merge pull request 'feat(greeting): add C6 — Greeting & First-Run UI opinionated guard' (#40) from feat/greeting-toggle-c6 into main
Generate documentation / build-docs (push) Successful in 35s
Offline docs drift reminder / remind (push) Successful in 11s

Reviewed-on: #40
This commit was merged in pull request #40.
This commit is contained in:
2026-06-11 02:48:05 +00:00
5 changed files with 40 additions and 13 deletions
+3 -2
View File
@@ -166,7 +166,7 @@ end
## Minimal Mode
Everything opinionated in this config — command shadows, startup side-effects, key and environment overrides, terminal integrations, and logging — is active by default but can be switched off with universal variables. Five category toggles and one master switch are available:
Everything opinionated in this config — command shadows, startup side-effects, key and environment overrides, terminal integrations, logging, and the first-run greeting — is active by default but can be switched off with universal variables. Six category toggles and one master switch are available:
| Variable | Disables |
|---|---|
@@ -175,7 +175,8 @@ Everything opinionated in this config — command shadows, startup side-effects,
| `__fish_config_op_overrides` | Vi mode, `exit``smart_exit`, `$PAGER`/`$MANPAGER`/`$CDPATH`, bang-bang history expansion, autopair, puffer, Starship prompt, theme colors |
| `__fish_config_op_integrations` | Kitty/WezTerm window abbreviations, `done` notifications, `spwin`/`tab`/`split`, `hist`, `logs`, `upgrade`, WakaTime |
| `__fish_config_op_logging` | Scrollback capture on exit, `paru`/`yay` AUR log wrappers, Kitty watcher capture (sentinel-file coordinated) |
| `__fish_config_opinionated` | Master switch — all five categories at once |
| `__fish_config_op_greeting` | Per-session `fish_greeting` (suppresses distro greetings such as CachyOS fastfetch by overriding with an empty function); first-run welcome banner |
| `__fish_config_opinionated` | Master switch — all six categories at once |
Set any of them to a falsy value (`0`, `false`, `no`, `off`, `n`) to disable; erase the variable to re-enable:
+10 -5
View File
@@ -23,11 +23,16 @@ end
set -U __fish_config_first_run_complete 1
# ──────────────────────────── Welcome message ───────────────────────────
echo ""
echo " Welcome to your fish shell configuration!"
echo " Run 'help config' for offline documentation."
echo " Run 'fish-deps' to check and install dependencies."
echo ""
# Printing a first-run welcome banner is opinionated (C6 greeting). The
# first-run state variable is already set unconditionally above, so
# disabling the greeting never re-triggers this file.
if __fish_config_op_enabled __fish_config_op_greeting
echo ""
echo " Welcome to your fish shell configuration!"
echo " Run 'help config' for offline documentation."
echo " Run 'fish-deps' to check and install dependencies."
echo ""
end
# ─────────────────────── Opinionated auto-exec guard ────────────────────
# Startup side-effects below (Fisher curl, fisher update, theme apply) are
+12
View File
@@ -14,6 +14,8 @@
# __fish_config_op_autoexec C2 — startup side-effects
# __fish_config_op_overrides C3 — key bindings, env, prompt overrides
# __fish_config_op_integrations C4 — terminal/tool coupling
# __fish_config_op_logging C5 — scrollback capture / AUR log wrappers
# __fish_config_op_greeting C6 — per-session greeting / first-run welcome
# Example: set -U __fish_config_op_aliases off (erase to re-enable)
# ──────────────────────── Source CachyOS configs ────────────────────────
@@ -230,6 +232,16 @@ if status is-interactive
# your main config or secrets files. For example, you might want different PATH additions,
# aliases, or environment variables on your work laptop vs. your home desktop.
test -f "$dot_fish/local.fish"; and source "$dot_fish/local.fish"
# ─────────────────── C6: Greeting & First-Run UI override ───────────────
# When the greeting category is disabled, stamp out any fish_greeting
# function that distro configs set (e.g., CachyOS defines it as fastfetch).
# This runs last inside the interactive block so our empty definition wins
# over whatever cachyos-config.fish or vendor conf.d installed.
if not __fish_config_op_enabled __fish_config_op_greeting
function fish_greeting
end
end
#
# ╭──────────────────────────── END OVERRIDES ──────────────────────────╮
# │ End of override section. │
+11 -4
View File
@@ -1382,7 +1382,7 @@ fish_variables.
## Opinionated Components (Minimal Mode)
Every opinionated piece of this config is active by default but can be
switched off through five category opt-out variables, each evaluated via
switched off through six category opt-out variables, each evaluated via
__fish_variable_check. Set a variable to any falsy value (0, false, no,
off, n) to disable its category; erase it or set a truthy value (1, true,
yes, on, y) to re-enable. Unset means enabled.
@@ -1415,13 +1415,19 @@ yes, on, y) to re-enable. Unset means enabled.
wrappers, Kitty watcher capture;
sentinel file coordinates
cross-process state
__fish_config_op_greeting Greeting & first-run UI: per-session
fish_greeting override (defines empty
function late in config.fish to
suppress distro greetings such as
CachyOS fastfetch); first-run welcome
banner in conf.d/first_run.fish
Examples:
# Disable command shadows only (rm becomes plain rm again):
set -U __fish_config_op_aliases off
# Full minimal mode — disable all five categories at once:
# Full minimal mode — disable all six categories at once:
set -U __fish_config_opinionated 0
# Re-enable everything:
@@ -1478,8 +1484,9 @@ on first run via `conf.d/first_run.fish`. Colors are stored in fish_variables
Fisher is bootstrapped automatically on the **first interactive session** via
`conf.d/first_run.fish`. This also applies the Catppuccin Mocha theme and
prints a one-time welcome message. Subsequent sessions skip all first-run
logic with zero overhead.
prints a one-time welcome message (gated by __fish_config_op_greeting; set
it to 0 to suppress). Subsequent sessions skip all first-run logic with zero
overhead.
To re-trigger first-run initialization (e.g., after a fresh install or for
testing), run:
+4 -2
View File
@@ -17,8 +17,10 @@
# ARGUMENTS
# category_variable Name (without $) of the category opt-out variable:
# __fish_config_op_aliases, __fish_config_op_autoexec,
# __fish_config_op_overrides, or
# __fish_config_op_integrations
# __fish_config_op_overrides,
# __fish_config_op_integrations,
# __fish_config_op_logging, or
# __fish_config_op_greeting
#
# RETURNS
# 0 Component enabled (variables truthy, unset, or unrecognized)