This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/fish/config.fish

60 lines
1.8 KiB
Fish
Raw Normal View History

2021-11-03 12:01:43 -05:00
source (dirname (status --current-filename))/paths.fish
2020-01-16 17:01:59 -06:00
2021-03-06 22:07:30 -06:00
for s in $ENV_PATH/*/config.d.fish
source $s (dirname $s)
end
2023-07-12 10:36:27 -05:00
for f in vars colors functions
2021-03-03 01:05:58 -06:00
source $FISH_PATH/$f.fish
2020-01-20 14:01:06 -06:00
end
2021-03-06 22:07:30 -06:00
2023-07-13 10:51:22 -05:00
if has_command rtx
2023-06-06 00:57:28 -05:00
rtx activate fish | source
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish
2022-05-18 01:27:19 -05:00
set --universal --export ASDF_DIR (brew --prefix asdf)
2022-05-10 13:23:32 -05:00
source (brew --prefix asdf)/libexec/asdf.fish
2021-05-14 15:13:43 -05:00
else if test -f $HOME/.asdf/asdf.fish
source $HOME/.asdf/asdf.fish
else if test -f /opt/asdf-vm/asdf.fish
source /opt/asdf-vm/asdf.fish
end
2023-07-18 16:58:12 -05:00
if test -f $HOME/.nix-profile/etc/profile.d/nix.fish
. $HOME/.nix-profile/etc/profile.d/nix.fish
2022-03-16 00:16:55 -05:00
end
2023-07-12 11:30:38 -05:00
if has_command nnn
source $DOTFILES_PATH/common/nnn/config.fish
end
# everything after this is ONLY relevant to interactive shells
status --is-interactive || exit
for f in prompt key-bindings
source $FISH_PATH/$f.fish
end
if test -f /usr/share/password-store/extensions/otp.bash
source $FISH_PATH/pass-otp-completions.fish
end
2022-12-13 15:34:46 -06:00
if set -q KITTY_INSTALLATION_DIR
set --global KITTY_SHELL_INTEGRATION enabled
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
end
2022-05-18 01:27:19 -05:00
test $PWD = $HOME && begin
cd $NICE_HOME || cd
end
2022-12-13 13:41:40 -06:00
2023-07-05 10:27:34 -05:00
# If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features
# Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij
2023-07-12 11:30:38 -05:00
if not set --query ZELLIJ && set --query FISH_START_ZELLIJ
2023-07-08 01:30:19 -05:00
# simulate auto attach
2023-07-08 01:31:58 -05:00
zellij attach -c
2023-07-08 01:30:19 -05:00
# simulate auto kill
kill $fish_pid
2023-07-12 11:30:38 -05:00
else if not set --query TMUX && set --query FISH_START_TMUX
2023-07-05 10:27:34 -05:00
tmux att -t default || tmux new -s default
2022-12-13 13:41:40 -06:00
end