mirror of
https://codeberg.org/Mo8it/dotfiles.git
synced 2024-12-27 01:01:05 +00:00
parent
25a37d2666
commit
dc23cca9ec
1 changed files with 94 additions and 0 deletions
94
.config/fish/config.fish
Normal file
94
.config/fish/config.fish
Normal file
|
@ -0,0 +1,94 @@
|
|||
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"
|
||||
abbr -a -g onefetch "onefetch --no-palette"
|
||||
|
||||
## 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
|
||||
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
|
||||
|
||||
## 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
|
Loading…
Reference in a new issue