dotfiles/.config/fish/config.fish

84 lines
1.6 KiB
Fish
Raw Normal View History

2021-03-14 18:12:50 +01:00
# activate usable-mode
fish_vi_key_bindings
# ALIASES
alias ls="lsd"
alias ll="ls -l"
alias la="ll -a"
2021-04-13 01:06:56 +02:00
alias lt="ll --tree"
2021-09-12 17:24:03 +02:00
alias jo="TERM=xterm-256color joshuto"
2021-03-14 18:12:50 +01:00
alias clip="xclip -sel clip"
2021-04-13 01:06:56 +02:00
alias nv="nvim"
2021-09-02 11:00:47 +02:00
alias nvide="rbg neovide --multigrid --"
2021-08-20 19:10:23 +02:00
# colored man pages
set -gx LESS_TERMCAP_mb \e'[1;32m'
set -gx LESS_TERMCAP_md \e'[1;32m'
set -gx LESS_TERMCAP_me \e'[0m'
set -gx LESS_TERMCAP_se \e'[0m'
set -gx LESS_TERMCAP_so \e'[01;33m'
set -gx LESS_TERMCAP_ue \e'[0m'
set -gx LESS_TERMCAP_us \e'[1;4;31m'
2021-04-13 01:06:56 +02:00
2021-03-14 18:12:50 +01:00
function rbg
$argv &>/dev/null&
end
2021-03-27 18:56:46 +01:00
function rbgd
rbg $argv
disown
end
2021-04-13 01:06:56 +02:00
function foreachdir
for file in (find $argv[1] -type f -print)
f=$file eval $argv[2..-1]
end
end
2021-03-14 18:12:50 +01:00
function !!
eval $history[1]
end
function mkdircd
mkdir $argv[1]
cd $argv[1]
end
2021-04-13 01:06:56 +02:00
function ifpresent
if which $argv[1] &> /dev/null
eval $argv[2..-1]
end
end
function todos
rg -i -H todo
end
# install custom prompt to ~/.local/bin/prompt (or somewhere else in $PATH)
function fish_prompt
prompt $status
end
2021-03-14 18:12:50 +01:00
# ENV
export CXX=clang++
export EDITOR=nvim
2021-04-13 01:06:56 +02:00
export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/var/lib/snapd/snap/bin:$HOME/go/bin"
# initialization stuff
ifpresent zoxide 'zoxide init fish | source'
ifpresent cod 'cod init %self fish | source'
ifpresent opam 'eval (opam env)'
2021-04-16 01:44:39 +02:00
ifpresent navi 'navi widget fish | source'
2021-03-14 18:12:50 +01:00
2021-06-22 21:04:42 +02:00
# fw init
if which fw &> /dev/null
if test -x (command -v fw)
if test -x (command -v fzf)
fw print-fish-setup -f | source
else
fw print-fish-setup | source
end
end
2021-06-22 21:04:42 +02:00
end