dots-of-war/files/.config/fish/config.fish

74 lines
1.7 KiB
Fish
Raw Normal View History

2020-03-27 08:06:13 +00:00
fish_vi_key_bindings
# fish_default_key_bindings
2020-06-07 20:01:57 +00:00
#set -U FZF_TMUX 1
2020-05-13 18:29:14 +00:00
set -U FZF_DEFAULT_COMMANDS "--filepath-word --cycle"
2020-05-02 10:00:27 +00:00
set -U FZF_PREVIEW_FILE_CMD "head -n 10 | bat --color=always --decorations=never"
2020-05-13 08:47:11 +00:00
set -U fish_greeting
#function fish_greeting
#end
2020-05-02 10:00:27 +00:00
2020-03-27 08:06:13 +00:00
alias ls=lsd
2020-05-13 18:29:14 +00:00
alias tcolors="env TERM=xterm-256color tcolors"
2020-03-27 08:06:13 +00:00
abbr --add --global vim nvim
abbr --add --global tsh trash
2020-05-01 19:02:35 +00:00
#abbr --add --global clear "clear && ls"
2020-03-29 17:39:21 +00:00
abbr --add --global cxmonad "nvim /home/leon/.xmonad/lib/Config.hs"
2020-03-27 08:06:13 +00:00
2020-06-07 20:01:57 +00:00
#if status is-interactive
#and not set -q TMUX
#exec tmux
#end
2020-04-03 07:50:08 +00:00
abbr --add --global gaa "git add --all"
abbr --add --global gc "git commit -m "
abbr --add --global gp "git push"
2020-04-18 18:27:12 +00:00
abbr --add --global gs "git status"
2020-04-03 07:50:08 +00:00
2020-03-27 08:06:13 +00:00
[ (hostname) = "garnix" ] && alias rm='echo "rm is disabled. Please use trash instead."; false'
2020-04-18 18:27:12 +00:00
function run_stuff
set -l commandline (commandline -b)
pipr --out-file /tmp/pipr_out --default "$commandline"
set -l result (cat /tmp/pipr_out)
commandline -r $result
commandline -f repaint
end
2020-05-13 18:29:14 +00:00
function c
set -l result (/home/leon/scripts/conf)
commandline -r "$result"
commandline -f execute
end
2020-04-18 18:27:12 +00:00
bind \ca run_stuff
2020-05-31 17:36:54 +00:00
function replace_with_yay
set -l cmd (commandline -b)
switch $cmd
case "*pacman*"
set edited (echo $cmd | sed 's/sudo //g' | sed 's/pacman/yay/g')
case "yay*"
set edited (echo $cmd | sed 's/yay/sudo pacman/g')
end
commandline -r "$edited"
commandline -f repaint
end
bind \cy replace_with_yay
2020-05-01 19:02:35 +00:00
# fff file manager cd on exit
function f
fff $argv
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME $HOME/.cache
cd (cat $XDG_CACHE_HOME/fff/.fff_d)
end
set -x EDITOR "nvim"
set -x FFF_TRASH_CMD "trash" # make fff's trash function use trash-cli