1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-10-17 20:52:40 +00:00
dotfiles/.config/fish/config.fish

103 lines
2.2 KiB
Fish
Raw Normal View History

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
# Abbreviations
## Replacements
2022-08-14 00:57:34 +00:00
abbr -ag rm trash
## 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"
## Default options
2022-08-24 21:48:52 +00:00
set -g rsync "rsync -avhL --partial --zc=zstd --zl=8 --no-i-r --info=progress2"
2022-08-14 00:57:34 +00:00
abbr -ag rsync $rsync
2022-11-02 15:15:58 +00:00
abbr -ag onefetch "onefetch --no-color-palette"
## Podman
set -l sagemath_image docker.io/sagemath/sagemath:latest
2022-10-29 09:24:09 +00:00
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"
2022-05-14 00:14:13 +00:00
set -l fedora_image registry.fedoraproject.org/fedora:(rpm -E %fedora)
2022-10-29 09:24:09 +00:00
abbr -ag fedora "podman run --pull newer -it --rm $fedora_image"
2022-08-14 00:57:34 +00:00
abbr -ag pps "podman ps --format '{{.Names}}'"
# Functions
## Replacements
function cd -w z
z $argv
end
2022-05-10 16:23:15 +00:00
function kssh -w ssh
kitty +kitten ssh $argv
end
function ls -w lsd
lsd $argv
end
function ll -w lsd
lsd -l $argv
end
function cat -w bat
bat $argv
end
2022-05-06 12:28:35 +00:00
function lg -w lazygit
lazygit $argv
end
2022-11-19 18:03:32 +00:00
function gu -w gitui
gitui $argv
end
2022-08-16 15:45:58 +00:00
function zola
flatpak run org.getzola.zola $argv
end
2022-09-26 14:21:10 +00:00
function julia
2022-11-02 15:15:58 +00:00
JULIA_NUM_THREADS=16 LD_PRELOAD=/usr/lib64/libstdc++.so.6 ~/.julia/juliaup/bin/julia $argv
2022-09-26 14:21:10 +00:00
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
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
end