Push
This commit is contained in:
parent
95379f40e6
commit
20064853fa
|
@ -5,7 +5,8 @@ source ~/.config/fish/config.fish
|
||||||
|
|
||||||
while true
|
while true
|
||||||
clear
|
clear
|
||||||
|
sleep 2 &
|
||||||
echo (tput setaf 0)(date) polled (tput setaf 4)"'"$argv"'"(tput setaf 7)
|
echo (tput setaf 0)(date) polled (tput setaf 4)"'"$argv"'"(tput setaf 7)
|
||||||
eval $argv
|
eval $argv
|
||||||
sleep 2
|
wait
|
||||||
end
|
end
|
|
@ -8,13 +8,7 @@ for f in vars colors functions
|
||||||
source $FISH_PATH/$f.fish
|
source $FISH_PATH/$f.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
status --is-interactive || exit
|
if has_command rtx && not set --query RTX_SHELL
|
||||||
|
|
||||||
for f in prompt key-bindings
|
|
||||||
source $FISH_PATH/$f.fish
|
|
||||||
end
|
|
||||||
|
|
||||||
if has_command rtx
|
|
||||||
rtx activate fish | source
|
rtx activate fish | source
|
||||||
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish
|
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish
|
||||||
set --universal --export ASDF_DIR (brew --prefix asdf)
|
set --universal --export ASDF_DIR (brew --prefix asdf)
|
||||||
|
@ -25,10 +19,6 @@ else if test -f /opt/asdf-vm/asdf.fish
|
||||||
source /opt/asdf-vm/asdf.fish
|
source /opt/asdf-vm/asdf.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -f /usr/share/password-store/extensions/otp.bash
|
|
||||||
source $FISH_PATH/pass-otp-completions.fish
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile
|
set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile
|
||||||
set --export --universal NIX_PROFILES "$nix_profiles"
|
set --export --universal NIX_PROFILES "$nix_profiles"
|
||||||
|
@ -47,27 +37,38 @@ if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin
|
set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
if set -q KITTY_INSTALLATION_DIR
|
if set -q KITTY_INSTALLATION_DIR
|
||||||
set --global KITTY_SHELL_INTEGRATION enabled
|
set --global KITTY_SHELL_INTEGRATION enabled
|
||||||
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
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"
|
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
||||||
end
|
end
|
||||||
|
|
||||||
if has_command nnn
|
|
||||||
source $DOTFILES_PATH/common/nnn/config.fish
|
|
||||||
end
|
|
||||||
|
|
||||||
test $PWD = $HOME && begin
|
test $PWD = $HOME && begin
|
||||||
cd $NICE_HOME || cd
|
cd $NICE_HOME || cd
|
||||||
end
|
end
|
||||||
|
|
||||||
# If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features
|
# 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
|
# Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij
|
||||||
if not set --query ZELLIJ && set --query FISH_START_ZELLIJ && status is-interactive
|
if not set --query ZELLIJ && set --query FISH_START_ZELLIJ
|
||||||
# simulate auto attach
|
# simulate auto attach
|
||||||
zellij attach -c
|
zellij attach -c
|
||||||
# simulate auto kill
|
# simulate auto kill
|
||||||
kill $fish_pid
|
kill $fish_pid
|
||||||
else if not set --query TMUX && set --query FISH_START_TMUX && status is-interactive
|
else if not set --query TMUX && set --query FISH_START_TMUX
|
||||||
tmux att -t default || tmux new -s default
|
tmux att -t default || tmux new -s default
|
||||||
end
|
end
|
Reference in a new issue