From 7e1c727b690aa024f21db519a0d6c143b81961e8 Mon Sep 17 00:00:00 2001 From: rootiest Date: Thu, 30 Apr 2026 20:04:36 -0400 Subject: [PATCH 1/3] docs: fisher and plugins are automatically installed - A bootstrap script in the config.fish file handles automatic installation of fisher and the included plugins upon launching the shell for the first time --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index f7430b3..a275f12 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,7 @@ Managed via [Fisher](https://github.com/jorgebucaran/fisher): | `mattmc3/magic-enter.fish` | Smart Enter: runs `ls` / `git status` on blank line | | `jorgebucaran/spark.fish` | Sparkline bar charts in the terminal | -Install plugins after cloning: - -```fish -fisher update -``` +Fisher and all listed plugins are installed automatically by the bootstrap script in `config.fish` upon launching the shell for the first time. --- -- 2.52.0 From 8d1ab2eeb9ee881a2fddba5631cc9d590d81defa Mon Sep 17 00:00:00 2001 From: rootiest Date: Thu, 30 Apr 2026 20:11:50 -0400 Subject: [PATCH 2/3] 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 --- README.md | 2 ++ conf.d/tailscale.fish | 4 ++++ conf.d/wakatime.fish | 1 - conf.d/zoxide.fish | 5 +++++ config.fish | 4 +++- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a275f12..f886ad2 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ See [FZF Bindings](#fzf-bindings) under Key Bindings for the default FZF shortcu ## Integrations +> **Note:** All integrations listed below are designed to elegantly fallback to basic commands or safely ignore their configuration if their required external dependencies are not installed on the system. + ### Zoxide Smart `cd` replacement. `cd` (or `z`) `` jumps to the best frecency match; `cdi` (or `zi`) opens an interactive selector. diff --git a/conf.d/tailscale.fish b/conf.d/tailscale.fish index 10af6b3..dce3602 100644 --- a/conf.d/tailscale.fish +++ b/conf.d/tailscale.fish @@ -14,6 +14,10 @@ # fish completion for tailscale -*- shell-script -*- +if not type -q tailscale + return +end + function __tailscale_debug set -l file "$BASH_COMP_DEBUG_FILE" if test -n "$file" diff --git a/conf.d/wakatime.fish b/conf.d/wakatime.fish index cb2d75f..bedd7e0 100644 --- a/conf.d/wakatime.fish +++ b/conf.d/wakatime.fish @@ -29,7 +29,6 @@ function __register_wakatime_fish_before_exec -e fish_postexec else if type -p ~/.wakatime/wakatime-cli 2>&1 > /dev/null set wakatime_path (type -p ~/.wakatime/wakatime-cli) else - echo "wakatime command not found. Please read \"https://wakatime.com/terminal\" and install wakatime." return 1 end diff --git a/conf.d/zoxide.fish b/conf.d/zoxide.fish index 2c29a00..17f7e62 100644 --- a/conf.d/zoxide.fish +++ b/conf.d/zoxide.fish @@ -1,8 +1,13 @@ # ============================================================================= # +# # Utility functions for zoxide. # +if not type -q zoxide + return +end + # pwd based on the value of _ZO_RESOLVE_SYMLINKS. function __zoxide_pwd builtin pwd -L diff --git a/config.fish b/config.fish index 7a34463..16ca6e8 100644 --- a/config.fish +++ b/config.fish @@ -81,7 +81,9 @@ set -Ux FZF_DEFAULT_OPTS "\ # # The Auto-Venv script above will ignore directories with a # .envrc file (direnv configuration) to prevent conflicts. -direnv hook fish | source +if type -q direnv + direnv hook fish | source +end # ────────────────────────────── Auto-Venv ─────────────────────────────── # Auto-activate Python venv on directory change -- 2.52.0 From a39df3c4661dd3c8092b6c2fd48aedde51e38afc Mon Sep 17 00:00:00 2001 From: rootiest Date: Thu, 30 Apr 2026 20:44:58 -0400 Subject: [PATCH 3/3] 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 --- README.md | 8 +- conf.d/abbr.fish | 256 ++++++++++++++++++++------------- functions/check_fish_deps.fish | 49 +++++++ functions/clone.fish | 7 +- functions/clonet.fish | 7 +- functions/rg.fish | 7 +- functions/split.fish | 5 + functions/spwin.fish | 4 + 8 files changed, 236 insertions(+), 107 deletions(-) create mode 100644 functions/check_fish_deps.fish diff --git a/README.md b/README.md index f886ad2..494d03e 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ See [FZF Bindings](#fzf-bindings) under Key Bindings for the default FZF shortcu ## Integrations -> **Note:** All integrations listed below are designed to elegantly fallback to basic commands or safely ignore their configuration if their required external dependencies are not installed on the system. +> **Note:** All integrations listed below are designed to gracefully fallback to basic commands or safely ignore their configuration if their required external dependencies are not installed on the system. ### Zoxide @@ -388,9 +388,9 @@ These abbreviations replicate Bash's bang-style history expansions. They expand | `cmf` | `chezmoi forget` | | `cmi` | `chezmoi init` | -### Kitty Window Management +### Kitty / WezTerm Window Management -These abbreviations mirror Vim/tmux ergonomics for managing Kitty splits, tabs, and windows. +These abbreviations mirror Vim/tmux ergonomics for managing terminal splits, tabs, and windows. They automatically detect whether you are using Kitty or WezTerm and execute the appropriate terminal CLI commands. | Abbr | Action | |---|---| @@ -479,7 +479,7 @@ Named context shortcuts (e.g. `dcr`, `dck`) live in `~/.config/.user-dots/fish/l | [lazygit](https://github.com/jesseduffield/lazygit) | git TUI | | [lazydocker](https://github.com/jesseduffield/lazydocker) | Docker TUI | | [trash-cli](https://github.com/andreafrancia/trash-cli) | Safe `rm` | -| [Kitty](https://sw.kovidgoyal.net/kitty/) | Terminal emulator | +| [Kitty](https://sw.kovidgoyal.net/kitty/) / [WezTerm](https://wezfurlong.org/wezterm/) | Terminal emulator | | [WakaTime](https://wakatime.com/) | Activity tracking | --- diff --git a/conf.d/abbr.fish b/conf.d/abbr.fish index a20ed32..e5eab84 100644 --- a/conf.d/abbr.fish +++ b/conf.d/abbr.fish @@ -19,16 +19,24 @@ abbr -a v antigravity # Kate abbr -a k kate # WezTerm SSH -abbr -a s wezterm ssh +if test "$TERM_PROGRAM" = WezTerm + abbr -a s wezterm ssh +end # Neovim in a new tab -#abbr -a editt wezterm cli spawn nvim # WezTerm -abbr -a editt kitty @ launch --type=tab --cwd=current nvim # Kitty +if test "$TERM" = xterm-kitty + abbr -a editt kitty @ launch --type=tab --cwd=current nvim # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a editt wezterm cli spawn nvim # WezTerm +end # LazyGit abbr -a lg lazygit # Sudo shell abbr -a sudu sudo -s # Kitty -abbr -a kt kitty +if test "$TERM" = xterm-kitty + abbr -a kt kitty +end # cat abbr -a c cat # chezmoi @@ -65,10 +73,14 @@ abbr -a g git abbr -a ag antigravity abbr -a ag. antigravity . # Quit -# abbr -a :q wezterm cli kill-pane # WezTerm -# abbr -a :Q wezterm cli kill-pane # WezTerm -abbr -a :q kitty @ close-window # Kitty (Closes the active split/pane) -abbr -a :Q kitty @ close-tab # Kitty (Closes the whole tab) +if test "$TERM" = xterm-kitty + abbr -a :q kitty @ close-window # Kitty (Closes the active split/pane) + abbr -a :Q kitty @ close-tab # Kitty (Closes the whole tab) +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :q wezterm cli kill-pane # WezTerm + abbr -a :Q wezterm cli kill-pane # WezTerm +end ######### Alternates ########## ### ls alternates @@ -86,116 +98,162 @@ abbr -a lT lt abbr -a lsT lstree # Window Creation (OS Windows) -# abbr -a :w wezterm cli spawn --new-window # WezTerm -abbr -a :w kitty @ launch --type=os-window # Kitty +if test "$TERM" = xterm-kitty + abbr -a :w kitty @ launch --type=os-window # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :w wezterm cli spawn --new-window # WezTerm +end # Window Splits (Panes) -# abbr -a :wv wezterm cli split-pane --bottom # WezTerm -abbr -a :wv kitty @ launch --location=hsplit # Kitty (Horizontal split) -# abbr -a :wh wezterm cli split-pane --right # WezTerm -abbr -a :wh kitty @ launch --location=vsplit # Kitty (Vertical split) +if test "$TERM" = xterm-kitty + abbr -a :wv kitty @ launch --location=hsplit # Kitty (Horizontal split) + abbr -a :wh kitty @ launch --location=vsplit # Kitty (Vertical split) +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :wv wezterm cli split-pane --bottom # WezTerm + abbr -a :wh wezterm cli split-pane --right # WezTerm +end # Window Detach (Move Pane) -# abbr -a :wo wezterm cli move-pane-to-new-tab --new-window # WezTerm -abbr -a :wo kitty @ detach-window --target-tab=new # Kitty (Moves pane to new tab) -# abbr -a :wot wezterm cli move-pane-to-new-tab # WezTerm -abbr -a :wot kitty @ detach-window # Kitty (Same as above, default behavior) +if test "$TERM" = xterm-kitty + abbr -a :wo kitty @ detach-window --target-tab=new # Kitty (Moves pane to new tab) + abbr -a :wot kitty @ detach-window # Kitty (Same as above, default behavior) +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :wo wezterm cli move-pane-to-new-tab --new-window # WezTerm + abbr -a :wot wezterm cli move-pane-to-new-tab # WezTerm +end # Tab Creation -# abbr -a :t wezterm cli spawn # WezTerm -abbr -a :t kitty @ launch --type=tab # Kitty +if test "$TERM" = xterm-kitty + abbr -a :t kitty @ launch --type=tab # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :t wezterm cli spawn # WezTerm +end # Rename Tab -# abbr -a :tl wezterm cli set-tab-title # WezTerm -abbr -a :tl "kitty @ set-tab-title" # Kitty -> Usage: :tl "New Title" +if test "$TERM" = xterm-kitty + abbr -a :tl "kitty @ set-tab-title" # Kitty -> Usage: :tl "New Title" +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :tl wezterm cli set-tab-title # WezTerm +end # Rename Window -# abbr -a :tw wezterm cli set-window-title # WezTerm -abbr -a :tw "kitty @ set-window-title" # Kitty +if test "$TERM" = xterm-kitty + abbr -a :tw "kitty @ set-window-title" # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :tw wezterm cli set-window-title # WezTerm +end # Rename Workspace -# abbr -a :twk wezterm cli rename-workspace # WezTerm +if test "$TERM_PROGRAM" = WezTerm + abbr -a :twk wezterm cli rename-workspace # WezTerm +end # Kitty does not have a direct CLI equivalent for renaming a dynamic "workspace" session. # Tab Navigation -# abbr -a :tp wezterm cli activate-tab --tab-relative -1 # WezTerm -abbr -a :tp "kitty @ focus-tab --match neighbor:left" # Kitty -# abbr -a :tn wezterm cli activate-tab --tab-relative 1 # WezTerm -abbr -a :tn "kitty @ focus-tab --match neighbor:right" # Kitty +if test "$TERM" = xterm-kitty + abbr -a :tp "kitty @ focus-tab --match neighbor:left" # Kitty + abbr -a :tn "kitty @ focus-tab --match neighbor:right" # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :tp wezterm cli activate-tab --tab-relative -1 # WezTerm + abbr -a :tn wezterm cli activate-tab --tab-relative 1 # WezTerm +end # Specialty Tab Shortcuts (New Tab in specific dir) -# abbr -a :tgk wezterm cli spawn --cwd ~/.config/kitty # WezTerm -abbr -a :tgk kitty @ launch --type=tab --cwd ~/.config/kitty # Kitty -# abbr -a :tgn wezterm cli spawn --cwd ~/.config/nvim # WezTerm -abbr -a :tgn kitty @ launch --type=tab --cwd ~/.config/nvim # Kitty -# abbr -a :tgf wezterm cli spawn --cwd ~/.config/fish # WezTerm -abbr -a :tgf kitty @ launch --type=tab --cwd ~/.config/fish # Kitty -# abbr -a :tgh wezterm cli spawn --cwd ~ # WezTerm -abbr -a :tgh kitty @ launch --type=tab --cwd ~ -# abbr -a :tgcz wezterm cli spawn --cwd ~/.local/share/chezmoi # WezTerm -abbr -a :tgcz kitty @ launch --type=tab --cwd ~/.local/share/chezmoi # Kitty -# abbr -a :tgcm wezterm cli spawn --cwd ~/.config/chezmoi # WezTerm -abbr -a :tgcm kitty @ launch --type=tab --cwd ~/.config/chezmoi # Kitty -# abbr -a :tgp wezterm cli spawn --cwd ~/projects # WezTerm -abbr -a :tgp kitty @ launch --type=tab --cwd ~/projects # Kitty -# abbr -a :tgr wezterm cli spawn -- sudo -i # WezTerm -abbr -a :tgr kitty @ launch --type=tab -- sudo -i +if test "$TERM" = xterm-kitty + abbr -a :tgk kitty @ launch --type=tab --cwd ~/.config/kitty # Kitty + abbr -a :tgn kitty @ launch --type=tab --cwd ~/.config/nvim # Kitty + abbr -a :tgf kitty @ launch --type=tab --cwd ~/.config/fish # Kitty + abbr -a :tgh kitty @ launch --type=tab --cwd ~ + abbr -a :tgcz kitty @ launch --type=tab --cwd ~/.local/share/chezmoi # Kitty + abbr -a :tgcm kitty @ launch --type=tab --cwd ~/.config/chezmoi # Kitty + abbr -a :tgp kitty @ launch --type=tab --cwd ~/projects # Kitty + abbr -a :tgr kitty @ launch --type=tab -- sudo -i +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :tgk wezterm cli spawn --cwd ~/.config/kitty # WezTerm + abbr -a :tgn wezterm cli spawn --cwd ~/.config/nvim # WezTerm + abbr -a :tgf wezterm cli spawn --cwd ~/.config/fish # WezTerm + abbr -a :tgh wezterm cli spawn --cwd ~ # WezTerm + abbr -a :tgcz wezterm cli spawn --cwd ~/.local/share/chezmoi # WezTerm + abbr -a :tgcm wezterm cli spawn --cwd ~/.config/chezmoi # WezTerm + abbr -a :tgp wezterm cli spawn --cwd ~/projects # WezTerm + abbr -a :tgr wezterm cli spawn -- sudo -i # WezTerm +end # Specialty Window Shortcuts (New OS Window in specific dir) -# abbr -a :wgk wezterm cli spawn --new-window --cwd ~/.config/kitty # WezTerm -abbr -a :wgk kitty @ launch --type=os-window --cwd ~/.config/kitty # Kitty -# abbr -a :wgn wezterm cli spawn --new-window --cwd ~/.config/nvim # WezTerm -abbr -a :wgn kitty @ launch --type=os-window --cwd ~/.config/nvim # Kitty -# abbr -a :wgf wezterm cli spawn --new-window --cwd ~/.config/fish # WezTerm -abbr -a :wgf kitty @ launch --type=os-window --cwd ~/.config/fish # Kitty -# abbr -a :wgh wezterm cli spawn --new-window --cwd ~ # WezTerm -abbr -a :wgh kitty @ launch --type=os-window --cwd ~ -# abbr -a :wgzd wezterm cli spawn --new-window --cwd ~/.local/share/chezmoi # WezTerm -abbr -a :wgzd kitty @ launch --type=os-window --cwd ~/.local/share/chezmoi # Kitty -# abbr -a :wgcz wezterm cli spawn --new-window --cwd ~/.config/chezmoi # WezTerm -abbr -a :wgcz kitty @ launch --type=os-window --cwd ~/.config/chezmoi # Kitty -# abbr -a :wgp wezterm cli spawn --new-window --cwd ~/projects # WezTerm -abbr -a :wgp kitty @ launch --type=os-window --cwd ~/projects # Kitty -# abbr -a :wgr wezterm cli spawn --new-window -- sudo -i # WezTerm -abbr -a :wgr kitty @ launch --type=os-window -- sudo -i # Kitty +if test "$TERM" = xterm-kitty + abbr -a :wgk kitty @ launch --type=os-window --cwd ~/.config/kitty # Kitty + abbr -a :wgn kitty @ launch --type=os-window --cwd ~/.config/nvim # Kitty + abbr -a :wgf kitty @ launch --type=os-window --cwd ~/.config/fish # Kitty + abbr -a :wgh kitty @ launch --type=os-window --cwd ~ + abbr -a :wgzd kitty @ launch --type=os-window --cwd ~/.local/share/chezmoi # Kitty + abbr -a :wgcz kitty @ launch --type=os-window --cwd ~/.config/chezmoi # Kitty + abbr -a :wgp kitty @ launch --type=os-window --cwd ~/projects # Kitty + abbr -a :wgr kitty @ launch --type=os-window -- sudo -i # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :wgk wezterm cli spawn --new-window --cwd ~/.config/kitty # WezTerm + abbr -a :wgn wezterm cli spawn --new-window --cwd ~/.config/nvim # WezTerm + abbr -a :wgf wezterm cli spawn --new-window --cwd ~/.config/fish # WezTerm + abbr -a :wgh wezterm cli spawn --new-window --cwd ~ # WezTerm + abbr -a :wgzd wezterm cli spawn --new-window --cwd ~/.local/share/chezmoi # WezTerm + abbr -a :wgcz wezterm cli spawn --new-window --cwd ~/.config/chezmoi # WezTerm + abbr -a :wgp wezterm cli spawn --new-window --cwd ~/projects # WezTerm + abbr -a :wgr wezterm cli spawn --new-window -- sudo -i # WezTerm +end # Specialty Window Vertical Shortcuts (Split Bottom) -# abbr -a :wvgk wezterm cli split-pane --bottom --cwd ~/.config/kitty # WezTerm -abbr -a :wvgk kitty @ launch --location=hsplit --cwd ~/.config/kitty # Kitty -# abbr -a :wvgn wezterm cli split-pane --bottom --cwd ~/.config/nvim # WezTerm -abbr -a :wvgn kitty @ launch --location=hsplit --cwd ~/.config/nvim # Kitty -# abbr -a :wvgf wezterm cli split-pane --bottom --cwd ~/.config/fish # WezTerm -abbr -a :wvgf kitty @ launch --location=hsplit --cwd ~/.config/fish # Kitty -# abbr -a :wvgh wezterm cli split-pane --bottom --cwd ~ # WezTerm -abbr -a :wvgh kitty @ launch --location=hsplit --cwd ~ # Kitty -# abbr -a :wvgcz wezterm cli split-pane --bottom --cwd ~/.local/share/chezmoi # WezTerm -abbr -a :wvgcz kitty @ launch --location=hsplit --cwd ~/.local/share/chezmoi # Kitty -# abbr -a :wvgcm wezterm cli split-pane --bottom --cwd ~/.config/chezmoi # WezTerm -abbr -a :wvgcm kitty @ launch --location=hsplit --cwd ~/.config/chezmoi # Kitty -# abbr -a :wvgp wezterm cli split-pane --bottom --cwd ~/projects # WezTerm -abbr -a :wvgp kitty @ launch --location=hsplit --cwd ~/projects # Kitty -# abbr -a :wvgr wezterm cli split-pane --bottom -- sudo -i # WezTerm -abbr -a :wvgr kitty @ launch --location=hsplit -- sudo -i # Kitty +if test "$TERM" = xterm-kitty + abbr -a :wvgk kitty @ launch --location=hsplit --cwd ~/.config/kitty # Kitty + abbr -a :wvgn kitty @ launch --location=hsplit --cwd ~/.config/nvim # Kitty + abbr -a :wvgf kitty @ launch --location=hsplit --cwd ~/.config/fish # Kitty + abbr -a :wvgh kitty @ launch --location=hsplit --cwd ~ # Kitty + abbr -a :wvgcz kitty @ launch --location=hsplit --cwd ~/.local/share/chezmoi # Kitty + abbr -a :wvgcm kitty @ launch --location=hsplit --cwd ~/.config/chezmoi # Kitty + abbr -a :wvgp kitty @ launch --location=hsplit --cwd ~/projects # Kitty + abbr -a :wvgr kitty @ launch --location=hsplit -- sudo -i # Kitty +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :wvgk wezterm cli split-pane --bottom --cwd ~/.config/kitty # WezTerm + abbr -a :wvgn wezterm cli split-pane --bottom --cwd ~/.config/nvim # WezTerm + abbr -a :wvgf wezterm cli split-pane --bottom --cwd ~/.config/fish # WezTerm + abbr -a :wvgh wezterm cli split-pane --bottom --cwd ~ # WezTerm + abbr -a :wvgcz wezterm cli split-pane --bottom --cwd ~/.local/share/chezmoi # WezTerm + abbr -a :wvgcm wezterm cli split-pane --bottom --cwd ~/.config/chezmoi # WezTerm + abbr -a :wvgp wezterm cli split-pane --bottom --cwd ~/projects # WezTerm + abbr -a :wvgr wezterm cli split-pane --bottom -- sudo -i # WezTerm +end # Specialty Window Horizontal Shortcuts (Split Right) -# abbr -a :whgk wezterm cli split-pane --bottom --cwd ~/.config/kitty # WezTerm -abbr -a :whgk kitty @ launch --location=vsplit --cwd ~/.config/kitty # Kitty -# abbr -a :whgn wezterm cli split-pane --bottom --cwd ~/.config/nvim # WezTerm -abbr -a :whgn kitty @ launch --location=vsplit --cwd ~/.config/nvim # Kitty -# abbr -a :whgf wezterm cli split-pane --bottom --cwd ~/.config/fish # WezTerm -abbr -a :whgf kitty @ launch --location=vsplit --cwd ~/.config/fish # Kitty -# abbr -a :whgh wezterm cli split-pane --bottom --cwd ~ # WezTerm -abbr -a :whgh kitty @ launch --location=vsplit --cwd ~ # Kitty -# abbr -a :whgcz wezterm cli split-pane --bottom --cwd ~/.local/share/chezmoi # WezTerm -abbr -a :whgcz kitty @ launch --location=vsplit --cwd ~/.local/share/chezmoi # Kitty -# abbr -a :whgcm wezterm cli split-pane --bottom --cwd ~/.config/chezmoi # WezTerm -abbr -a :whgcm kitty @ launch --location=vsplit --cwd ~/.config/chezmoi # Kitty -# abbr -a :whgp wezterm cli split-pane --bottom --cwd ~/projects # WezTerm -abbr -a :whgp kitty @ launch --location=vsplit --cwd ~/projects # Kitty -# abbr -a :whgr wezterm cli split-pane --bottom -- sudo -i # WezTerm -abbr -a :whgr kitty @ launch --location=vsplit --cwd current sudo -i # Kitty -> Specialty cd Shortcuts -abbr -a :cdk 'cd ~/.config/kitty/ # Kitty Config' -abbr -a :cdkn 'cd ~/.config/kitty;nvim' +if test "$TERM" = xterm-kitty + abbr -a :whgk kitty @ launch --location=vsplit --cwd ~/.config/kitty # Kitty + abbr -a :whgn kitty @ launch --location=vsplit --cwd ~/.config/nvim # Kitty + abbr -a :whgf kitty @ launch --location=vsplit --cwd ~/.config/fish # Kitty + abbr -a :whgh kitty @ launch --location=vsplit --cwd ~ # Kitty + abbr -a :whgcz kitty @ launch --location=vsplit --cwd ~/.local/share/chezmoi # Kitty + abbr -a :whgcm kitty @ launch --location=vsplit --cwd ~/.config/chezmoi # Kitty + abbr -a :whgp kitty @ launch --location=vsplit --cwd ~/projects # Kitty + abbr -a :whgr kitty @ launch --location=vsplit --cwd current sudo -i # Kitty -> Specialty cd Shortcuts + abbr -a :cdk 'cd ~/.config/kitty/ # Kitty Config' + abbr -a :cdkn 'cd ~/.config/kitty;nvim' +end +if test "$TERM_PROGRAM" = WezTerm + abbr -a :whgk wezterm cli split-pane --bottom --cwd ~/.config/kitty # WezTerm + abbr -a :whgn wezterm cli split-pane --bottom --cwd ~/.config/nvim # WezTerm + abbr -a :whgf wezterm cli split-pane --bottom --cwd ~/.config/fish # WezTerm + abbr -a :whgh wezterm cli split-pane --bottom --cwd ~ # WezTerm + abbr -a :whgcz wezterm cli split-pane --bottom --cwd ~/.local/share/chezmoi # WezTerm + abbr -a :whgcm wezterm cli split-pane --bottom --cwd ~/.config/chezmoi # WezTerm + abbr -a :whgp wezterm cli split-pane --bottom --cwd ~/projects # WezTerm + abbr -a :whgr wezterm cli split-pane --bottom -- sudo -i # WezTerm +end abbr -a :cdn cd '~/.config/nvim/ # Neovim Config' abbr -a :cdnn 'cd ~/.config/nvim;nvim' abbr -a :cdf 'cd ~/.config/fish/ # Fish Config' @@ -211,9 +269,13 @@ abbr -a :cdp --regex ':cdp' --set-cursor 'cd ~/projects/%' abbr -a :cdpn 'cd ~/projects;nvim' abbr -a :cdw 'cd ~/.config/wezterm/ # WezTerm Config' abbr -a :cdwn 'cd ~/.config/wezterm;nvim' -abbr -a editt kitty @ launch --type tab nvim +if test "$TERM" = xterm-kitty + abbr -a editt kitty @ launch --type tab nvim +end # Spawn window -abbr -a :sw spwin +if test "$TERM" = xterm-kitty + abbr -a :sw spwin +end ### Docker ### abbr -a dcl 'docker context use default # Local Host' diff --git a/functions/check_fish_deps.fish b/functions/check_fish_deps.fish new file mode 100644 index 0000000..9a42c4a --- /dev/null +++ b/functions/check_fish_deps.fish @@ -0,0 +1,49 @@ +# Copyright (C) 2026 Rootiest +# SPDX-License-Identifier: AGPL-3.0-or-later + +function check_fish_deps --description "Check all fish-related dependencies" + set -l required fish fisher starship fzf zoxide direnv paru + set -l integrations wakatime tailscale + set -l recommended eza lsd bat btop dust duf prettyping most rg lazygit lazydocker trash kitty wezterm + + function __print_dep + set -l dep $argv[1] + if type -q $dep + set_color green + echo -n "  " + set_color normal + echo -n "$dep " + set_color brblack + echo "(Found at "(type -p $dep)")" + set_color normal + else + set_color red + echo -n "  " + set_color normal + echo -n "$dep " + set_color brblack + echo "(Not installed)" + set_color normal + end + end + + set_color cyan; echo "Required Dependencies:"; set_color normal + for dep in $required + __print_dep $dep + end + echo "" + + set_color cyan; echo "Integrations:"; set_color normal + for dep in $integrations + __print_dep $dep + end + echo "" + + set_color cyan; echo "Recommended Dependencies:"; set_color normal + for dep in $recommended + __print_dep $dep + end + echo "" + + functions -e __print_dep +end diff --git a/functions/clone.fish b/functions/clone.fish index 6ac66ba..f3f32ed 100644 --- a/functions/clone.fish +++ b/functions/clone.fish @@ -2,6 +2,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later function clone --wraps=clone-in-kitty --description 'alias clone=clone-in-kitty' - clone-in-kitty $argv - + if test "$TERM" != xterm-kitty + echo "Error: The 'clone' command requires Kitty terminal." >&2 + return 1 + end + clone-in-kitty $argv end diff --git a/functions/clonet.fish b/functions/clonet.fish index 33cdded..a923982 100644 --- a/functions/clonet.fish +++ b/functions/clonet.fish @@ -2,6 +2,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later function clonet --wraps='clone-in-kitty --type=tab' --description 'alias clonet=clone-in-kitty --type=tab' - clone-in-kitty --type=tab $argv - + if test "$TERM" != xterm-kitty + echo "Error: The 'clonet' command requires Kitty terminal." >&2 + return 1 + end + clone-in-kitty --type=tab $argv end diff --git a/functions/rg.fish b/functions/rg.fish index 0d89bf9..118a463 100644 --- a/functions/rg.fish +++ b/functions/rg.fish @@ -2,6 +2,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later function rg --description 'alias rg=rg --hyperlink-format=kitty' - command rg --hyperlink-format=kitty $argv - + if test "$TERM" = xterm-kitty + command rg --hyperlink-format=kitty $argv + else + command rg $argv + end end diff --git a/functions/split.fish b/functions/split.fish index 29f0283..8f0ef66 100644 --- a/functions/split.fish +++ b/functions/split.fish @@ -2,6 +2,11 @@ # SPDX-License-Identifier: AGPL-3.0-or-later function split --description 'Run a command in a new Kitty split' + if test "$TERM" != xterm-kitty + echo "Error: The 'split' command requires Kitty terminal." >&2 + return 1 + end + set -l location hsplit switch $argv[1] diff --git a/functions/spwin.fish b/functions/spwin.fish index fe1ecd9..62a590e 100644 --- a/functions/spwin.fish +++ b/functions/spwin.fish @@ -2,5 +2,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later function spwin --wraps='~/.config/kitty/spawn-window.sh' --description 'alias spwin=~/.config/kitty/spawn-window.sh' + if test "$TERM" != xterm-kitty + echo "Error: The 'spwin' command requires Kitty terminal." >&2 + return 1 + end ~/.config/kitty/spawn-window.sh $argv end -- 2.52.0