2022-05-06 12:12:01 +00:00
|
|
|
if status is-interactive
|
2022-07-26 01:03:01 +00:00
|
|
|
# Disable greeting
|
|
|
|
set -g fish_greeting
|
|
|
|
|
|
|
|
# Interactive environment variables
|
2022-11-19 18:03:32 +00:00
|
|
|
set -gx EDITOR ~/.cargo/bin/hx
|
2022-06-14 15:45:37 +00:00
|
|
|
|
|
|
|
# Setup
|
|
|
|
## Zoxide
|
|
|
|
zoxide init fish | source
|
|
|
|
## Starship
|
|
|
|
starship init fish | source
|
|
|
|
|
2022-05-06 12:12:01 +00:00
|
|
|
# Abbreviations
|
|
|
|
## Replacements
|
2024-04-25 22:36:24 +00:00
|
|
|
abbr -ag rm trash
|
2022-05-06 12:12:01 +00:00
|
|
|
|
|
|
|
## Safety options
|
2022-08-14 00:57:34 +00:00
|
|
|
abbr -ag cp "cp -i"
|
|
|
|
abbr -ag mv "mv -i"
|
2022-08-24 21:48:52 +00:00
|
|
|
abbr -ag rmr "rm -r"
|
2022-05-06 12:12:01 +00:00
|
|
|
|
|
|
|
## Default options
|
2023-08-17 22:06:44 +00:00
|
|
|
set -g rsync "rsync -avhL --partial --info=progress2 --no-i-r --zc=zstd --zl=9"
|
|
|
|
abbr -ag rsync "$rsync"
|
2022-05-06 12:12:01 +00:00
|
|
|
|
|
|
|
## Podman
|
2024-01-28 17:29:55 +00:00
|
|
|
abbr -ag sage "podman run -it --rm --pull newer --name sage docker.io/sagemath/sagemath:latest"
|
|
|
|
|
|
|
|
abbr -ag typst "podman run -it --rm --pull newer --name typst -v (pwd):/volumes/src:Z ghcr.io/typst/typst:latest typst w /volumes/src/src.typ /volumes/src/output.pdf"
|
2022-05-06 12:12:01 +00:00
|
|
|
|
2022-05-14 00:14:13 +00:00
|
|
|
set -l fedora_image registry.fedoraproject.org/fedora:(rpm -E %fedora)
|
2024-01-28 17:29:55 +00:00
|
|
|
abbr -ag fedora "podman run -it --rm --pull newer --name fedora $fedora_image"
|
2022-05-06 12:12:01 +00:00
|
|
|
|
2022-08-14 00:57:34 +00:00
|
|
|
abbr -ag pps "podman ps --format '{{.Names}}'"
|
2022-05-06 12:12:01 +00:00
|
|
|
|
2023-08-17 22:06:44 +00:00
|
|
|
# Aliases
|
2024-04-25 22:36:24 +00:00
|
|
|
alias cd z
|
|
|
|
alias ls lsd
|
2023-08-17 22:06:44 +00:00
|
|
|
alias ll "ls -l"
|
2024-04-25 22:36:24 +00:00
|
|
|
alias cat bat
|
|
|
|
alias gu gitui
|
2023-08-17 22:06:44 +00:00
|
|
|
alias julia "JULIA_NUM_THREADS=16 ~/.juliaup/bin/julia"
|
2024-04-25 22:36:24 +00:00
|
|
|
alias tb "toolbox run fish"
|
2022-05-10 16:23:15 +00:00
|
|
|
|
|
|
|
# Private config
|
|
|
|
set -l private_config ~/.config/fish/private_config.fish
|
|
|
|
if test -f $private_config
|
|
|
|
source $private_config
|
|
|
|
end
|
2022-05-06 12:12:01 +00:00
|
|
|
end
|