Commit Graph

23 Commits

Author SHA1 Message Date
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 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 6d91f49521 fix(completions): add cdi function as alias for zi
cdi was documented and expected to work as an interactive zoxide
directory picker but was never defined as a function, causing it
to silently fail. Wraps zi so completions are inherited correctly.
2026-05-11 23:37:21 -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 37f35ce0a0 feat(functions): add claude-docs and claude-pr helper functions
Add two Claude Code helper functions to streamline common dev workflows:
- `claude-docs`: triggers Claude to sync README.md with recent session changes
- `claude-pr`: triggers Claude to create a branch, commit, push, and open a PR

Also add `.claude` to .gitignore and document both functions in README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:37:41 -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 bb681afa95 fix: ensure the split function handles other terminal emulators correctly 2026-04-30 23:33:00 -04:00
rootiest 85f45a9e8a refactor: properly alias cb to y
Instead of re-defining the same behavior, just write `cb` into the
y.fish function file as an alias for y
2026-04-30 23:32:37 -04:00
rootiest 084e6fb9ca refactor(functions): standardize documentation, metadata, and wrappers
- Add comprehensive `--description` flags to all fish functions for better `help` and `functions` output.
- Introduce and correct `--wraps` flags to ensure proper completions for aliased commands (e.g., `top` wrapping `btop`, `zellij`, `upgrade` wrapping `paru`).
- Prepend descriptive comments before function definitions for better source readability.
- Add standard copyright and SPDX license identifiers to shell scripts.
- Enhance script robustness by ensuring consistent terminal checks (Kitty, WezTerm) and graceful fallbacks in window/tab spawning functions (`spwin`, `tab`).
- Implement graceful fallbacks to basic core utilities when preferred modern alternatives are missing (e.g., `top` falling back to system `top` if `btop` is missing, `view` falling back to `less` or `cat` if `nvim` is unavailable).
- Improve overall code consistency across the `functions/` directory.
2026-04-30 23:16:28 -04:00
rootiest a4d8574f49 refactor: remove obsolete or private functions
Remove several functions that are either no longer relevant or belong in
.user-dots as local/machine-specific functions.
2026-04-30 23:13:44 -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 ed62c8c100 feat(history): add support for Nth history index in substitution
Extends the interactive history substitution function to support an
optional third field `old/new/index`.

- Keeps default behavior of targeting the most recent command (index 1).
- Allows targeting a specific history entry by appending a number.
- Validates that the index is a positive integer before attempting retrieval.
- Safely handles cases where the requested history index does not exist.

Example: 'cat/bat/5' now replaces 'cat' with 'bat' in the 5th previous command.
2026-04-30 18:18:31 -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 5c6691c32c fix: correct sort direction
Use reverse sorting by time for eza in `ltr` function.

Note: eza sorts oldest-to-newest by default, while lsd requires the
--reverse flag.
When the --reverse flag is used in eza the listing is done
newest-to-oldest which is not the intended direction.
2026-04-27 13:28:14 -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 0a578e7b09 fix: move shebang above copyright header in scripts 2026-04-26 03:15:54 -04:00
rootiest 01c22e7a4d feat: prefer eza over lsd in all ls-related functions
fix: clean stale wraps metadata
fix: ensure user functions take precedence over CachyOS overrides
2026-04-26 03:07:51 -04:00
rootiest 36aacc6a50 feat(functions): adds a function for generating .gitignore patterns
command: gi

This tool generates .gitignore patterns for specified languages.
2026-04-26 02:04:49 -04:00
rootiest e9ae94b6cf fix(keybindings): preserve space after command token on Ctrl+Alt+U 2026-04-26 01:48:55 -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