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"
|
2023-05-14 19:02:35 +02:00
|
|
|
#alias nvide="rbg neovide --nofork --multigrid --"
|
|
|
|
alias nvide="rbg neovide --nofork --"
|
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
|
2022-05-08 21:19:06 +02:00
|
|
|
$argv &>/dev/null &
|
2021-03-14 18:12:50 +01:00
|
|
|
end
|
|
|
|
|
2021-03-27 18:56:46 +01:00
|
|
|
function rbgd
|
|
|
|
rbg $argv
|
|
|
|
disown
|
|
|
|
end
|
|
|
|
|
2022-05-08 21:19:06 +02:00
|
|
|
function !!
|
2021-03-14 18:12:50 +01:00
|
|
|
eval $history[1]
|
|
|
|
end
|
|
|
|
|
|
|
|
function mkdircd
|
|
|
|
mkdir $argv[1]
|
|
|
|
cd $argv[1]
|
|
|
|
end
|
|
|
|
|
2021-04-13 01:06:56 +02:00
|
|
|
function ifpresent
|
2022-05-08 21:19:06 +02:00
|
|
|
if which $argv[1] &>/dev/null
|
2021-04-13 01:06:56 +02:00
|
|
|
eval $argv[2..-1]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function todos
|
|
|
|
rg -i -H todo
|
|
|
|
end
|
|
|
|
|
2021-12-27 17:15:42 +01:00
|
|
|
# custom title
|
|
|
|
functions -e fish_title
|
|
|
|
function fish_title
|
|
|
|
echo (prompt_pwd) '|' (set -q argv[1] && echo $argv[1] || status current-command)
|
|
|
|
end
|
|
|
|
|
2021-04-13 01:06:56 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|