1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-12-04 23:40:32 +00:00

Clean up Fish config

This commit is contained in:
Mo 2023-08-18 00:06:44 +02:00
parent 25185e7bc1
commit 6a69b28e1d

View file

@ -13,7 +13,7 @@ if status is-interactive
# Abbreviations
## Replacements
abbr -ag rm trash
abbr -ag rm "trash"
## Safety options
abbr -ag cp "cp -i"
@ -21,73 +21,25 @@ if status is-interactive
abbr -ag rmr "rm -r"
## Default options
set -g rsync "rsync -avhL --partial --zc=zstd --zl=8 --no-i-r --info=progress2"
abbr -ag rsync $rsync
set -g rsync "rsync -avhL --partial --info=progress2 --no-i-r --zc=zstd --zl=9"
abbr -ag rsync "$rsync"
## Podman
set -l sagemath_image docker.io/sagemath/sagemath:latest
abbr -ag sage "podman run --pull newer -it --rm $sagemath_image"
abbr -ag sage-jupyter "podman run --pull newer -it --rm -p8888:8888 $sagemath_image sage-jupyter"
abbr -ag sage "podman run --pull newer -it --rm docker.io/sagemath/sagemath:latest"
set -l fedora_image registry.fedoraproject.org/fedora:(rpm -E %fedora)
abbr -ag fedora "podman run --pull newer -it --rm $fedora_image"
abbr -ag pps "podman ps --format '{{.Names}}'"
# Functions
## Replacements
function cd -w z
z $argv
end
function ls -w exa
exa --icons --group-directories-first --time-style long-iso $argv
end
function ll -w exa
ls -l $argv
end
function cat -w bat
bat $argv
end
function lg -w lazygit
lazygit $argv
end
function gu -w gitui
gitui $argv
end
function zola
flatpak run org.getzola.zola $argv
end
function julia
JULIA_NUM_THREADS=16 ~/.julia/juliaup/bin/julia $argv
end
## Taskwarrior
function ta -w task -d "Add no priority task"
task add project:$argv[1] $argv[2..]
end
function tal -w task -d "Add low priority task"
ta $argv priority:L
end
function tam -w task -d "Add medium priority task"
ta $argv priority:M
end
function tah -w task -d "Add high priority task"
ta $argv priority:H
end
function vp -w task
vit project:$argv[1] $argv[2..]
end
# Aliases
alias cd "z"
alias ls "exa --icons --group-directories-first --time-style long-iso --no-filesize --git"
alias ll "ls -l"
alias cat "bat"
alias gu "gitui"
alias zola "flatpak run org.getzola.zola"
alias julia "JULIA_NUM_THREADS=16 ~/.juliaup/bin/julia"
# Private config
set -l private_config ~/.config/fish/private_config.fish