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

113 lines
2.6 KiB
Fish
Raw Normal View History

if status is-interactive
# Disable greeting
set -g fish_greeting
# Vi mode
fish_vi_key_bindings
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block blink
# Abbreviations
## Replacements
abbr -a -g rm trash
## Safety options
abbr -a -g cp "cp -i"
abbr -a -g mv "mv -i"
abbr -a -g rmi "rm -i"
## Default options
abbr -a -g rsync "rsync -avh --partial --zc=zstd --zl=22 --info=PROGRESS2 --no-i-r --stats"
## Podman
set -l sagemath_image docker.io/sagemath/sagemath:latest
abbr -a -g sage "podman pull $sagemath_image; podman run -it --rm $sagemath_image"
abbr -a -g sage-jupyter "podman pull $sagemath_image; podman run -it --rm -p8888:8888 $sagemath_image sage-jupyter"
set -l fedora_image registry.fedoraproject.org/fedora:latest
abbr -a -g fedora "podman pull $fedora_image; podman run -it --rm $fedora_image"
set -l asciidoctor_image docker.io/asciidoctor/docker-asciidoctor:latest
abbr -a -g adoc "podman pull $asciidoctor_image; podman run -it --rm -v (pwd):/documents/:Z $asciidoctor_image"
# ENV variables
set -x EDITOR /usr/bin/nvim
set -x JULIA_NUM_THREADS 16
# Setup
## Zoxide
zoxide init fish | source
## starship
starship init fish | source
# Functions
## Replacements
function cd -w z
z $argv
end
function ssh -w ssh
2022-05-06 12:28:35 +00:00
echo "SSH with Kitty"
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
function onefetch -w onefetch
onefetch --no-palette $argv
end
2022-05-06 22:11:41 +00:00
# TODO: Remove temporal nvim path
function nvim -w nvim
/home/mo/bin/nvim/bin/nvim $argv
end
function gn
# TODO: Remove temporal nvim path
/home/mo/bin/goneovim/goneovim --maximized --nvim /home/mo/bin/nvim/bin/nvim $argv &>/dev/null &
disown
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 v -w task
vit $argv
end
function vp -w task
vit project:$argv[1] $argv[2..]
end
end