Commit Graph

42 Commits

Author SHA1 Message Date
rootiest 85be47582b feat(greeting): add C6 greeting guard to first_run.fish welcome message 2026-06-10 22:25:10 -04:00
rootiest 76349ad94b fix(logging): register C5 event handlers in conf.d for reliable startup
--on-variable handlers in functions/ are only autoloaded on explicit call,
so they never fire when a universal variable changes. Moving the definitions
to conf.d/logging-events.fish ensures they are registered at shell init.

Also adds a startup __fish_config_sync_logging call so pre-set variable
values (e.g. set before this shell was opened) take effect immediately
without requiring a re-set.
2026-06-10 21:54:56 -04:00
rootiest 7e266cb61a feat(logging): gate paru/yay wrapper generation under C5 guard (Tasks 5-6)
Add C5 (Logging & Capture) guard to wrapper generation in both
conf.d/paru-wrapper.fish and conf.d/yay-wrapper.fish. When C5 logging
is disabled, the guard removes any generated wrapper and returns early,
allowing the system to fall back to the bare binary.

Also replaces stale Task #4 comment references with C5 classification.
2026-06-10 21:33:54 -04:00
rootiest ce84db593c feat(guards): add opinionated component guards to config.fish and conf.d
Adds __fish_config_op_enabled helper (master __fish_config_opinionated
evaluated first via __fish_variable_check, then the category variable)
and gates C1-C4 components: CachyOS surgical override, PAGER/MANPAGER,
CDPATH, Vi mode, exit override, bang-bang bindings, history/cp/mv/wget/
grep aliases, cd->z alias, Fisher bootstrap and theme apply, paru/yay
wrapper generation, WakaTime hook, custom key chords, puffer, autopair,
starship prompt, Catppuccin colors, FZF_DEFAULT_OPTS, done notifications,
and Kitty/WezTerm window-management abbreviations.
2026-06-10 11:28:43 -04:00
rootiest 13eb93ce12 fix(sponge): escape leading -- in auth-flag pattern; purge stale -- patterns on load 2026-06-08 22:29:20 -04:00
rootiest 8911146d3f fix(sponge): guard set -q value[1] before string length to handle unset vars 2026-06-08 22:26:00 -04:00
rootiest 1637dc3122 fix(sponge): use $$var[1] to avoid test arg-count error on array vars 2026-06-08 22:24:31 -04:00
rootiest bceff8f4ec feat(sponge): add three-layer privacy filtering for shell history
conf.d/sponge_privacy.fish registers patterns and filters that prevent
credentials from reaching fish history:

  Layer 1 (static regex, universal): auth flags, env assignments,
  credential-bearing URLs, Authorization headers, sshpass, docker
  login, openssl -passin/-passout

  Layer 2 (dynamic values, session globals): on the first prompt, after
  secrets.fish has loaded, reads the literal values of all exported
  credential-named vars (TOKEN, PASSWORD, SECRET, etc.), escapes them
  for regex, and merges them with the static patterns as a session
  global — auto-refreshes on login so rotated tokens are never stale

  Layer 3 (per-command filter, sponge_filter_secrets): catches
  credentials in variables exported mid-session (e.g. project .env)

Also exempts functions/sponge_filter_secrets.fish from the sponge_*
gitignore glob so our custom filter is committed alongside the config.
2026-06-08 22:23:29 -04:00
rootiest 8e7e450a9d docs: clarify that plugin functionality is bundled, not managed by fisher
Only jorgebucaran/fisher itself is in fish_plugins. The functionality
from catppuccin/fish, fzf.fish, done, autopair, and puffer-fish is
bundled directly with this config in modified form and must not be
installed or updated via fisher.

Removes sponge (not present), corrects file path mappings for bundled
components, fixes stale "Plugin sync failed" message in first_run.fish,
and expands fish-config.index with missing sections 9–11.
2026-06-08 21:51:27 -04:00
rootiest 761ac9eb1b docs(welcome): update offline doc command and add deps check instruction 2026-06-06 23:44:55 -04:00
rootiest c9d360809d fix: improve error handling in first_run.fish 2026-06-06 23:09:00 -04:00
rootiest e2738f2ab4 feat: add first_run.fish for one-time shell initialization 2026-06-06 23:09:00 -04:00
rootiest 4117b0ddb6 feat(tricks): auto-create fish-config.1 symlink on shell start
Offline docs drift reminder / remind (push) Failing after 3s
Generate man page / build-manpage (push) Successful in 16s
The symlink from ~/.local/share/man/man1/fish-config.1 to
docs/fish-config.1 is now created automatically alongside the
existing MANPATH setup, making `man fish-config` work out of the
box on any machine after cloning. Simplified docs accordingly.
2026-06-06 04:37:58 -04:00
rootiest c9a5577c11 feat(manpath): expose user-local man pages for man fish-config
Adds ~/.local/share/man to MANPATH so the generated fish-config.1
(symlinked from docs/) is accessible via `man fish-config`.
2026-06-06 04:31:48 -04:00
rootiest 2a08e1acef feat(shell): add fzf inline picker bound to @@
Adds __fzf_inline_picker function and @@ keybinding (Emacs + all Vi
modes). Opens an fzf session and injects the selected item at the
cursor position in the current command line. Includes SYNOPSIS/
DESCRIPTION doc block per project conventions. Updates README with
new binding in the User Bindings table.
2026-06-05 19:46:54 -04:00
rootiest db33d9cff7 feat(shell): enhance log browser, add yay wrapper, and integrate starship OSC prompt markers
- logs.fish: add yay category, ov-powered viewing for paru/yay (section
  headers, color highlights, ==> AUR build markers) and scrollback logs
  (OSC 133;A sticky prompt headers); add fzf Ctrl-D delete with Y/n
  confirm and list refresh, ? toggleable help overlay; run
  _scrollback_prune_junk before building file list
- _scrollback_prune_junk: new utility to remove empty, single-line, and
  Kitty tab-rename noise logs before display and before max-file pruning;
  called from both logs and smart_exit
- smart_exit: call _scrollback_prune_junk before counting toward max files
- conf.d/yay-wrapper.fish: auto-generate ~/.local/bin/yay logging wrapper
  mirroring paru-wrapper; tees output to timestamped logs, prunes old ones
- conf.d/starship.fish: move fish_prompt from config.fish; emit OSC 133;A
  after the prompt's leading newline so the marker lands on the info-bar
  line rather than the blank line above it; guard with type -q starship so
  clean fish sessions use built-in markers unchanged
- config.fish: remove inline fish_prompt block (now in conf.d/starship.fish);
  add return sentinel at EOF to prevent tool-injected init lines from running
- completions/ov.fish: add ov tab completions
- README.md: document all of the above
2026-06-03 01:02:55 -04:00
rootiest f97272d0ec feat(shell): replace pager with ov, add logs browser, and auto-generate paru wrapper
- Set $PAGER to ov in config.fish (falls back to less); remove LESS=-R
- Rewrite less wrapper with full hierarchy: $PAGER → ov → less → more → cat
- Simplify view.fish fallback to delegate to the less wrapper
- Add logs function: fzf browser for scrollback and paru logs, opens in $PAGER
- Add claude wrapper: auto-injects --remote-control unless already present
- Add conf.d/paru-wrapper.fish: generates ~/.local/bin/paru on first run,
  versioned so future template changes auto-propagate on next shell start
- Sync README.md and requirements.md to document all of the above
2026-05-31 20:39:52 -04:00
rootiest 378cb6b221 feat(shell): add scrollback history capture on shell exit
- Add smart_exit function: captures Kitty scrollback to a timestamped
  log file on exit; --no-log/-n skips capture; auto-prunes oldest logs
  once count exceeds SCROLLBACK_HISTORY_MAX_FILES
- Wire exit → smart_exit in config.fish for interactive sessions;
  export SCROLLBACK_HISTORY_DIR and SCROLLBACK_HISTORY_MAX_FILES with
  sane defaults (~/.terminal_history and 100 respectively)
- Update cat to detect files in SCROLLBACK_HISTORY_DIR or containing
  raw ANSI escape sequences and pass them through command cat instead
  of bat, preserving color output
- Remove redundant alias rm="rm -i" from tricks.fish (superseded by
  functions/rm.fish trash-aware wrapper)
- Sync README: new Scrollback History integration section, smart_exit
  added to System functions table, cat description updated, stale rm
  Safety Wrapper entry and note removed
2026-05-30 01:20:40 -04:00
rootiest 1ef4bb9f0a feat(shell): expand tricks.fish with system aliases, bat man pages, and done plugin
- Add system aliases: dot-navigation (.., ..., etc.), color overrides for
  grep/dir/vdir, safety wrappers (cp/mv/rm -i), archive shortcuts
  (tarnow, untar), wget resume, tb (termbin), and jctl
- Set MANPAGER/MANROFFOPT to render man pages through bat when available
- Configure franciscolourenco/done notification plugin settings
  (__done_min_cmd_duration=10s, __done_notification_urgency_level=low)
- Add psmem/psmem10 memory-monitoring helpers
- Switch PATH setup to fish_add_path (handles deduplication automatically)
- Add conf.d/done.fish (done plugin v1.19.1)
- Source tricks.fish explicitly after CachyOS base config in config.fish
- Sync README with all new functions, aliases, and integrations
2026-05-29 14:04:03 -04:00
rootiest e4743bc8e2 feat(shell): add CachyOS-derived tricks.fish and copy utilities
Adds conf.d/tricks.fish (PATH additions for ~/.local/bin and depot_tools,
bang-bang key bindings, history timestamp override, backup utility) and
functions/copy.fish (smarter cp wrapper that strips trailing slashes from
source directories, fixing a CachyOS-specific cp quirk).

Updates config.fish to explicitly source copy.fish on startup and refactors
several conditional blocks to single-line style for consistency. Syncs
README.md to document all new utilities.
2026-05-29 13:36:03 -04:00
rootiest 508f0798fa feat(function): adds a gi function that generates gitignore patterns 2026-05-22 23:44:21 -04:00
rootiest 4a9ff30519 fix(fisher): remove magic-enter and clean up fisher plugin handling 2026-05-22 23:42:50 -04:00
rootiest e075c40c9d feat(ai): migrate gemini-cli references to antigravity-cli (agy)
Rename gemini-resume → antigravity-resume and save_gemini_session →
save_antigravity_session; update all session files from .gemini_session
to .antigravity_session and LAST_GEMINI_SESSION → LAST_ANTIGRAVITY_SESSION.
Replace gemini/gemini-cli binary calls with agy throughout superpowers,
code-resume, and the resume function. Add antigravity-ide wrapper for the
renamed IDE binary; update abbr v → antigravity-ide (VSCode-equivalent)
and update README/requirements to reflect the new tool names.
2026-05-20 20:41:04 -04:00
rootiest e502cff8cb fix(keybinds): guard bindings on required binaries and fix fzf bg-transform
- conf.d/fzf.fish: skip fzf_configure_bindings if fzf is not in PATH
- key_bindings.fish: only bind Ctrl+Alt+= when qalc is installed
- _qalc_eval: return 1 early if qalc is absent so callers can react
- _smart_execute: fall back to normal execute when _qalc_eval returns 1
- integrations/fzf.fish: replace bg-transform with transform (available
  since fzf 0.53; bg-transform requires a newer version and caused
  "unknown action" errors on fzf 0.60 devel)
2026-05-18 20:34:00 -04:00
rootiest 05139354cf fix(zoxide): restore CDPATH support in cd/z execution
The CDPATH regression was introduced when unifying completions: the `z`
function only checked `test -d` (absolute path existence) before falling
through to zoxide query, silently ignoring CDPATH-relative directories.
Now mirrors the completion logic — checks direct path, then each CDPATH
prefix, then zoxide — so `cd subdir` resolves correctly when `subdir`
lives under a CDPATH entry.
2026-05-12 00:43:59 -04:00
rootiest 520217d4a9 fix(zoxide): suppress missing-zoxide startup message
Silent degradation is cleaner; the shell already handles the
missing binary gracefully without any output.
2026-05-11 23:57:46 -04:00
rootiest 4e255f4502 chore(license): add copyright/SPDX headers to zoxide files
- Add copyright + SPDX header to functions/zoxide.fish and
  conf.d/zoxide.fish (modified from original, owned by Rootiest)
- Add sourced-from attribution to completions/zoxide.fish
  (unmodified from icezyclon/zoxide.fish, MIT)
2026-05-11 23:47:27 -04:00
rootiest 2e3230974c feat(completions): unify cd/z completions across CWD, CDPATH, and zoxide
Previous to this commit, tab completion and auto-suggestions for cd/z
were inconsistent — only one or two of: CWD, CDPATH, and zoxide frecency
results would work at a time, with different sourced matches shown in
tab completion, shown in auto-suggest, and execution after pressing
<Enter>.

- Add _zoxide_z_complete in functions/zoxide.fish that merges all three
  sources into a single completion list (CWD via __fish_complete_cd,
  CDPATH via __fish_complete_directories, zoxide via query -l capped at
25)
- Wire the new completer to both z and cd via complete directives in
  conf.d/zoxide.fish, replacing the previous incomplete approach
- Add completions/zoxide.fish for full tab completion of the zoxide CLI
  itself (add, query, remove, import, init subcommands)
- Update README to document the unified completion behavior and fix
  structural issues in Personalization/Attribution/Dependencies sections
2026-05-11 23:28:59 -04:00
rootiest b62c2476da feat(functions,bindings): add smart-execute, fast-cli; refactor qalc and rm
- Add _smart_execute: context-aware Ctrl+Enter that routes to qalc when
  the buffer ends with '=', or falls through to standard execute otherwise
- Refactor qalc_eval → _qalc_eval (private helper, same behavior)
- Bind Ctrl+Enter to _smart_execute in all vi modes
- Add fast-cli wrapper (fast.com speed test) and fast placeholder with
  a friendly ANSI redirect message
- Add speedtest-fast abbreviation expanding to fast-cli
- Enhance _replace_command_token to handle sudo-prefixed commands: places
  cursor at index 5 (between sudo and the replacement slot)
- Improve rm error reporting: colored output, culprit-path listing, and
  cleaned technical detail for non-missing-file errors
- Add SPDX copyright headers to cat, ld, claude-docs, claude-pr functions
- Update README: Ctrl+Enter binding, fast-cli/fast functions, speedtest-fast abbr
2026-05-10 01:36:14 -04:00
rootiest d8bd2b32ab feat(config): refactor config.fish, add XDG compliance, new functions, and keybindings
Restructure and expand the Fish shell configuration for better XDG compliance,
interactive-session gating, modularity, and ergonomics.

config.fish:
- Add full XDG Base Directory variable block (XDG_CONFIG_HOME, XDG_CACHE_HOME,
  XDG_DATA_HOME, XDG_STATE_HOME) and redirect tool caches/configs accordingly
  (cargo, rustup, go, bun, npm, gnupg, wakatime, wget, nvidia, codeium, etc.)
- Add editor setup with `type -q nvim` guard and NVIM_APPNAME
- Add CDPATH block (., ~/projects, ~) with explanatory comments
- Gate all interactive-only setup (key bindings, FZF, direnv, starship, secrets,
  local overrides, CLAUDE_CODE_NO_FLICKER) behind `status is-interactive`
- Guard FZF integration source behind a file-existence check
- Move secrets.fish and local.fish sourcing into the interactive block as overrides
- Remove obsolete universal `cdp` variable and duplicate PATH/editor blocks
- Update PATH entries to use XDG-resolved $CARGO_HOME and $BUN_INSTALL

conf.d/theme.fish:
- Move FZF_DEFAULT_OPTS (Catppuccin Mocha palette) from config.fish into theme.fish
  so all theming lives in one place
- Add section header for FZF colors; condense file header comment

conf.d/abbr.fish:
- Add `/exit` abbreviation as a vim-style alias for the `exit` builtin

conf.d/key_bindings.fish:
- Bind Ctrl+Alt+= to new `qalc_eval` function (inline Qalculate! evaluation)
- Add binding in both normal and all Vi modes
- Add descriptive comment block explaining the keybinding purpose

functions/bash.fish:
- Pass `--rcfile "$XDG_CONFIG_HOME/bash/bashrc"` so bash respects XDG config location

functions/cat.fish:
- Extend cat wrapper: detect directory arguments and delegate to `ls` instead of bat
- Preserve stdin-passthrough behavior when no arguments are provided

functions/__auto_source_fallback_venv.fish (new):
- Extract auto-venv PWD watcher from config.fish into its own autoloaded function file
- Skips activation when direnv manages the directory (.envrc present or DIRENV_DIR set)
- Deactivates venv when leaving its project tree

functions/ld.fish (new):
- Wrapper for lazydocker that injects the active Docker context's DOCKER_HOST,
  enabling correct context-aware operation

functions/joplin.fish (new):
- Joplin CLI wrapper function

functions/qalc_eval.fish (new):
- Inline Qalculate! evaluator: reads the current commandline buffer, passes it to
  `qalc`, prints the result, and clears the buffer for rapid-fire math in the shell

README.md:
- Remove stale `cdp` variable example from the local.fish documentation section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 00:45:02 -04:00
rootiest a39df3c466 feat(terminal): harden terminal abbreviations and functions
- Wrap Kitty-specific abbreviations and functions with $TERM checks

- Resurrect WezTerm abbreviations and wrap with $TERM_PROGRAM checks

- Add check_fish_deps function to list and verify all fish-related dependencies

- Update README to recommend Kitty and WezTerm and document requirements

- Improve fallback behavior for rg outside of Kitty
2026-04-30 20:44:58 -04:00
rootiest 8d1ab2eeb9 feat: gracefully fallback when integration dependencies are not met
If a dependency for an integration is missing, fallback gracefully so as
not to interrupt user experience
2026-04-30 20:11:50 -04:00
rootiest f9c53926b9 refactor: clean up keybinding implementations
- Cleans and organizes key binding definitions for plugins and user
keybinds.

- Update documentation for keybindings
2026-04-30 19:49:31 -04:00
rootiest 3019fc6c61 refactor: implement global syntax highlighting theme 2026-04-30 19:46:23 -04:00
rootiest 0a238c84a1 feat: make zoxide the default cd provider
- `cd` is now essentially aliased to `z` allowing frecency matching for
`cd` commands.
- `cdi` is now aliased to `zi` allowing interactive frecency matching
for `cd` commands.
2026-04-30 19:44:26 -04:00
rootiest ada58e8818 feat(shell): add bash-style history expansions and interactive keybindings
- Replicate bash bang-operations (!^, !*, !string, etc.) via abbreviations
- Add Ctrl+G for previous path head insertion
- Add Ctrl+F for interactive history substitution
- Add Ctrl+Alt+U to quickly replace command tokens
- Update README documentation for all new features
2026-04-30 01:03:13 -04:00
rootiest 6722deea3c feat: add git and history utility functions
- Add branch, fc, and gitup functions
- Update README documentation for new functions and abbreviations
- Remove obsolete push-vim function
2026-04-29 17:23:13 -04:00
rootiest bc9cbb22fc refactor: consolidate and expand ls function family
- Upgrade ls to long listing (-l -a) and drop the standalone l and lS functions in favor of abbreviations
- Remove llm (ambiguous name, redundant with ltr)
- Add lsr (reversed time oneline), lss (size-sorted), lD (dirs-only), lx (extension-sorted)
- Enhance ltr with --all and age color-scale gradient
- Wire up ls abbreviations: l, lS, lsR, lX, lT, lsT
- Update README functions table and add Listing abbreviations section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 13:21:05 -04:00
rootiest 9f72897072 refactor: move machine-specific abbreviations to local.fish 2026-04-26 02:20:14 -04:00
rootiest 4e696f6a06 refactor: move VI key bindings to config.fish, remove bobthefish 2026-04-26 01:52:10 -04:00
rootiest c26db619ac feat(keybindings): add Ctrl+Alt+U to replace first command token 2026-04-26 01:45:56 -04:00
rootiest 4c1e7a7eb9 feat: initial fish shell configuration
- Core config layered on CachyOS base with Catppuccin Mocha theming
- Fisher plugins: fzf.fish, catppuccin, autopair, replay, puffer-fish, magic-enter, spark
- Smart CLI wrappers with fallbacks (bat, lsd, btop, dust, prettyping)
- Custom functions: git, docker, network, kitty, AI session management
- Extensive abbreviation system for keyboard-driven workflows
- Secrets/local sourcing pattern for private and machine-specific config
- README with full documentation and personalization guide
- AGPLv3+ license with copyright headers on all source files
2026-04-26 01:37:38 -04:00