Added zoxide

This commit is contained in:
2024-07-19 20:46:26 +02:00
parent 2ee4e44788
commit ee405d9008
2 changed files with 18 additions and 9 deletions

View File

@@ -6,14 +6,14 @@ set -x MANROFFOPT "-c"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
## Environment setup
# Env vars
export EDITOR=nvim
export VISUAL=nvim
if test -f ~/.fish_profile
source ~/.fish_profile
end
# Other env vars
export EDITOR=nvim
export VISUAL=nvim
# Add ~/.local/bin to PATH
if test -d ~/.local/bin
if not contains -- ~/.local/bin $PATH
@@ -21,7 +21,7 @@ if test -d ~/.local/bin
end
end
# Plugin configuration
## Plugin configuration
# Set settings for https://github.com/franciscolourenco/done
set -U __done_min_cmd_duration 10000
set -U __done_notification_urgency_level low
@@ -31,6 +31,11 @@ if type -q starship && status --is-interactive
starship init fish | source
end
# Zoxide
if type -q zoxide && status --is-interactive
zoxide init fish | source
end
## Functions
# Fish command history
function history
@@ -113,7 +118,7 @@ function ya
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
cd "$cwd"
end
rm -f -- "$tmp"
end
@@ -138,6 +143,11 @@ if type -q paru
alias yay='paru'
end
# Replace cd with zoxide
if type -q zoxide
alias cd='z'
end
# Common use
alias :q=exit
alias ipn='ip'
@@ -175,11 +185,9 @@ alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/p
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
## Run fastfetch if session is interactive
## Run fastfetch
if status --is-interactive
if type -q fastfetch
fastfetch -l arch
else if type -q neofetch
neofetch --ascii_distro arch
end
end