update: fish, yazi, nvim
This commit is contained in:
@@ -21,6 +21,13 @@ if test -d ~/.local/bin
|
||||
end
|
||||
end
|
||||
|
||||
# Add ~/go/bin to PATH
|
||||
if test -d ~/go/bin
|
||||
if not contains -- ~/go/bin $PATH
|
||||
set -p PATH ~/go/bin
|
||||
end
|
||||
end
|
||||
|
||||
## Plugin configuration
|
||||
# Set settings for https://github.com/franciscolourenco/done
|
||||
set -U __done_min_cmd_duration 10000
|
||||
@@ -39,7 +46,7 @@ end
|
||||
## Functions
|
||||
# Fish command history
|
||||
function history
|
||||
builtin history --show-time='%F %T '
|
||||
builtin history --reverse --show-time='%F %T '
|
||||
end
|
||||
|
||||
function ba --argument filename
|
||||
@@ -54,7 +61,7 @@ function cp_bar
|
||||
kill $cpid &> /dev/null
|
||||
end
|
||||
|
||||
function unzip -a input_file
|
||||
function unzipc -a input_file
|
||||
if test -z "$input_file"
|
||||
echo "Usage: unzip <filename.zip>"
|
||||
return 1
|
||||
@@ -70,7 +77,7 @@ function unzip -a input_file
|
||||
command unzip "$input_file" -d "$folder_name" && echo "File '$input_file' successfully extracted to '$folder_name/'"
|
||||
end
|
||||
|
||||
function untar -a input_file
|
||||
function untarc -a input_file
|
||||
if test -z "$input_file"
|
||||
echo "Usage: untar <filename.zip>"
|
||||
return 1
|
||||
@@ -114,13 +121,21 @@ function mvn-run -a mainClass -d "Run your current maven project"
|
||||
end
|
||||
|
||||
# Yazi wrapper
|
||||
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"
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
|
||||
# Convert webm to opus
|
||||
function w2o
|
||||
for f in *.webm
|
||||
ffmpeg -i "$f" -map 0:a:0 -c:a copy (path change-extension opus "$f")
|
||||
and rm "$f"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
|
||||
## Aliases
|
||||
@@ -155,7 +170,7 @@ alias nano=nvim
|
||||
alias cls='clear'
|
||||
alias please='sudo'
|
||||
alias ip='ip -color'
|
||||
alias wip=curl https://ipinfo.io/ip
|
||||
alias wip='curl https://ipinfo.io/ip'
|
||||
alias mkdirs='mkdir --parents'
|
||||
alias grubup="sudo update-grub"
|
||||
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
|
||||
@@ -178,8 +193,10 @@ alias bigpkg="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages ac
|
||||
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
|
||||
alias cleanup='sudo pacman -Rns (pacman -Qtdq)' # Cleanup orphaned packages
|
||||
alias jctl="journalctl -p 3 -xb" # Get the error messages from journalctl
|
||||
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" # Recent installed packages
|
||||
alias h="cliphist list | fzf | cliphist decode | wl-copy"
|
||||
alias ripp="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" # Recent installed packages
|
||||
alias ch="cliphist list | fzf | cliphist decode | wl-copy"
|
||||
alias dirsize="du -h --max-depth=1"
|
||||
|
||||
|
||||
# Get fastest mirrors
|
||||
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
|
||||
|
||||
Reference in New Issue
Block a user