diff --git a/README.md b/README.md index ed38561..82fb34b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ abbreviation system for keyboard-driven workflows. - [Documentation](#documentation) - [Installation](#installation) - [Personalization](#personalization) +- [Minimal Mode](#minimal-mode) - [Attribution](#attribution) - [License](#license) @@ -28,6 +29,7 @@ This config layers on top of the CachyOS base Fish configuration and adds: - **Kitty terminal** deep integration for splits, tabs, and SSH - **AI workflow** helpers for Claude and Antigravity session management - **WakaTime** shell activity tracking +- **Opt-out toggles** for every opinionated component — see [Minimal Mode](#minimal-mode) --- @@ -162,6 +164,35 @@ end --- +## Minimal Mode + +Everything opinionated in this config — command shadows, startup side-effects, key and environment overrides, and terminal integrations — is active by default but can be switched off with universal variables. Four category toggles and one master switch are available: + +| Variable | Disables | +|---|---| +| `__fish_config_op_aliases` | Command shadows: `ls`→eza, `cat`→bat, `cd`→zoxide, `rm`→trash, `top`→btop, and friends; `grep`/`cp`/`mv`/`wget` flag injection | +| `__fish_config_op_autoexec` | Startup side-effects: Fisher bootstrap, theme apply, `paru`/`yay` wrapper generation, auto venv activation, WakaTime hook | +| `__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_opinionated` | Master switch — all four categories at once | + +Set any of them to a falsy value (`0`, `false`, `no`, `off`, `n`) to disable; erase the variable to re-enable: + +```fish +# Plain shell: disable everything opinionated +set -U __fish_config_opinionated 0 + +# Or pick a single category, e.g. keep integrations but drop command shadows +set -U __fish_config_op_aliases off + +# Back to full flavor +set -Ue __fish_config_opinionated +``` + +Command shadows react immediately; bindings, prompt, and abbreviations take effect in new shells. With aliases disabled, `rm` deletes permanently again instead of trashing. See `help config opinionated` for the full component list. + +--- + ## Attribution The core of the [Zoxide integration](docs/wiki/2-path-setup.md) in this repository was originally adapted from the [icezyclon/zoxide.fish](https://github.com/icezyclon/zoxide.fish) plugin (MIT Licensed) and has since been heavily customized for performance and Fish 4.x compatibility. diff --git a/docs/fish-config.index b/docs/fish-config.index index 06dacd4..b39e85d 100644 --- a/docs/fish-config.index +++ b/docs/fish-config.index @@ -162,6 +162,11 @@ local=## Machine-local Configuration secrets=## Secrets and API Keys overrides=## Overriding Configuration Variables universal=## Fish Universal Variables +opinionated=## Opinionated Components (Minimal Mode) +minimal=## Opinionated Components (Minimal Mode) +minimal-mode=## Opinionated Components (Minimal Mode) +opt-out=## Opinionated Components (Minimal Mode) +toggles=## Opinionated Components (Minimal Mode) # ── Section 8: Fisher Plugins ───────────────────────────────── plugins=# 8. FISHER PLUGINS diff --git a/docs/fish-config.md b/docs/fish-config.md index 2ca8a6a..5701818 100644 --- a/docs/fish-config.md +++ b/docs/fish-config.md @@ -1375,6 +1375,61 @@ Some settings (fzf colors, theme) are stored in fish_variables via `set -U`. These are machine-local and git-ignored. Do not commit fish_variables. +## Opinionated Components (Minimal Mode) + +Every opinionated piece of this config is active by default but can be +switched off through four 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. + + Variable Disables + ------------------------------ ------------------------------------ + __fish_config_op_aliases Command shadows and flag injection: + ls->eza, cat->bat, cd->zoxide, + rm->trash, less->ov, top->btop, + ping->prettyping, ssh->kitten, + du->duf/dust, mkdir/bash wrappers, + history timestamps, grep/cp/mv/wget + flag injection, help intercept + __fish_config_op_autoexec Startup side-effects: Fisher + bootstrap, theme apply, paru/yay + wrapper generation, auto venv + activation, WakaTime hook + __fish_config_op_overrides Key and env overrides: Vi mode, + exit->smart_exit, PAGER/MANPAGER, + CDPATH, bang-bang system, autopair, + puffer, starship prompt, theme + colors, FZF_DEFAULT_OPTS, right + prompt + __fish_config_op_integrations Terminal/tool coupling: Kitty/ + WezTerm window abbreviations, done + notifications, spwin/tab/split, + hist, logs, upgrade, WakaTime + +Examples: + + # Disable command shadows only (rm becomes plain rm again): + set -U __fish_config_op_aliases off + + # Full minimal mode — disable all four categories at once: + set -U __fish_config_opinionated 0 + + # Re-enable everything: + set -Ue __fish_config_opinionated + +Notes: + + - Command shadows (rm, cat, ls, ...) react immediately; conf.d-level + components (bindings, prompt, abbreviations, hooks) take effect in + new shells. + - With aliases disabled, rm falls back to bare `command rm` — files + are deleted permanently, not trashed. + - Disabled integration commands (spwin, tab, split, hist, logs, + upgrade) print an error naming the variable that disabled them. + - On CachyOS, the distro fish config's own aliases, history override, + and bang-bang bindings are stripped per category as well. + ## Prompt and Theme ### Starship