Added zoxide
This commit is contained in:
@@ -6,14 +6,14 @@ set -x MANROFFOPT "-c"
|
|||||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
|
|
||||||
## Environment setup
|
## Environment setup
|
||||||
|
# Env vars
|
||||||
|
export EDITOR=nvim
|
||||||
|
export VISUAL=nvim
|
||||||
|
|
||||||
if test -f ~/.fish_profile
|
if test -f ~/.fish_profile
|
||||||
source ~/.fish_profile
|
source ~/.fish_profile
|
||||||
end
|
end
|
||||||
|
|
||||||
# Other env vars
|
|
||||||
export EDITOR=nvim
|
|
||||||
export VISUAL=nvim
|
|
||||||
|
|
||||||
# Add ~/.local/bin to PATH
|
# Add ~/.local/bin to PATH
|
||||||
if test -d ~/.local/bin
|
if test -d ~/.local/bin
|
||||||
if not contains -- ~/.local/bin $PATH
|
if not contains -- ~/.local/bin $PATH
|
||||||
@@ -21,7 +21,7 @@ if test -d ~/.local/bin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Plugin configuration
|
## Plugin configuration
|
||||||
# Set settings for https://github.com/franciscolourenco/done
|
# Set settings for https://github.com/franciscolourenco/done
|
||||||
set -U __done_min_cmd_duration 10000
|
set -U __done_min_cmd_duration 10000
|
||||||
set -U __done_notification_urgency_level low
|
set -U __done_notification_urgency_level low
|
||||||
@@ -31,6 +31,11 @@ if type -q starship && status --is-interactive
|
|||||||
starship init fish | source
|
starship init fish | source
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Zoxide
|
||||||
|
if type -q zoxide && status --is-interactive
|
||||||
|
zoxide init fish | source
|
||||||
|
end
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
# Fish command history
|
# Fish command history
|
||||||
function history
|
function history
|
||||||
@@ -113,7 +118,7 @@ function ya
|
|||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi $argv --cwd-file="$tmp"
|
yazi $argv --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
cd -- "$cwd"
|
cd "$cwd"
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
end
|
end
|
||||||
@@ -138,6 +143,11 @@ if type -q paru
|
|||||||
alias yay='paru'
|
alias yay='paru'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Replace cd with zoxide
|
||||||
|
if type -q zoxide
|
||||||
|
alias cd='z'
|
||||||
|
end
|
||||||
|
|
||||||
# Common use
|
# Common use
|
||||||
alias :q=exit
|
alias :q=exit
|
||||||
alias ipn='ip'
|
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 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"
|
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 status --is-interactive
|
||||||
if type -q fastfetch
|
if type -q fastfetch
|
||||||
fastfetch -l arch
|
fastfetch -l arch
|
||||||
else if type -q neofetch
|
|
||||||
neofetch --ascii_distro arch
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
- fish
|
- fish
|
||||||
- fish-done
|
- fish-done
|
||||||
- fastfetch
|
- fastfetch
|
||||||
|
- zoxide
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: "[Fish] Create config folder"
|
- name: "[Fish] Create config folder"
|
||||||
|
|||||||
Reference in New Issue
Block a user