Reorganize files to use stow for installation #dotfiles
This commit is contained in:
6
fish/.config/fish/conf.d/__fasd_run.fish
Normal file
6
fish/.config/fish/conf.d/__fasd_run.fish
Normal file
@ -0,0 +1,6 @@
|
||||
function __fasd_run -e fish_postexec -d "fasd takes record of the directories changed into"
|
||||
set -lx RETVAL $status
|
||||
if test $RETVAL -eq 0 # if there was no error
|
||||
command fasd --proc (command fasd --sanitize (eval echo "$argv") | tr -s " " \n) > "/dev/null" 2>&1 &
|
||||
end
|
||||
end
|
||||
3
fish/.config/fish/conf.d/aliases.fish
Normal file
3
fish/.config/fish/conf.d/aliases.fish
Normal file
@ -0,0 +1,3 @@
|
||||
# support oldschool autojump user
|
||||
alias j z
|
||||
alias jj zz
|
||||
1
fish/.config/fish/conf.d/fish-gpg-tty_init.fish
Normal file
1
fish/.config/fish/conf.d/fish-gpg-tty_init.fish
Normal file
@ -0,0 +1 @@
|
||||
export GPG_TTY=(tty)
|
||||
1
fish/.config/fish/conf.d/fisher.fish
Normal file
1
fish/.config/fish/conf.d/fisher.fish
Normal file
@ -0,0 +1 @@
|
||||
fisher copy-user-key-bindings
|
||||
13
fish/.config/fish/conf.d/fzf.fish
Normal file
13
fish/.config/fish/conf.d/fzf.fish
Normal file
@ -0,0 +1,13 @@
|
||||
set -q FZF_TMUX_HEIGHT; or set -U FZF_TMUX_HEIGHT "40%"
|
||||
set -q FZF_DEFAULT_OPTS; or set -U FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT"
|
||||
set -q FZF_LEGACY_KEYBINDINGS; or set -U FZF_LEGACY_KEYBINDINGS 1
|
||||
set -q FZF_PREVIEW_FILE_CMD; or set -U FZF_PREVIEW_FILE_CMD "head -n 10"
|
||||
set -q FZF_PREVIEW_DIR_CMD; or set -U FZF_PREVIEW_DIR_CMD "ls"
|
||||
|
||||
function fzf_uninstall -e fzf_uninstall
|
||||
set -l _vars (set | command grep -E "^FZF.*\$" | command awk '{print $1;}')
|
||||
for var in $_vars
|
||||
echo $var
|
||||
eval (set -e $var)
|
||||
end
|
||||
end
|
||||
44
fish/.config/fish/conf.d/fzf_key_bindings.fish
Normal file
44
fish/.config/fish/conf.d/fzf_key_bindings.fish
Normal file
@ -0,0 +1,44 @@
|
||||
if test "$FZF_LEGACY_KEYBINDINGS" -eq 1
|
||||
bind \ct '__fzf_find_file'
|
||||
bind \cr '__fzf_reverse_isearch'
|
||||
bind \ec '__fzf_cd'
|
||||
bind \eC '__fzf_cd --hidden'
|
||||
bind \cg '__fzf_open'
|
||||
bind \co '__fzf_open --editor'
|
||||
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \ct '__fzf_find_file'
|
||||
bind -M insert \cr '__fzf_reverse_isearch'
|
||||
bind -M insert \ec '__fzf_cd'
|
||||
bind -M insert \eC '__fzf_cd --hidden'
|
||||
bind -M insert \cg '__fzf_open'
|
||||
bind -M insert \co '__fzf_open --editor'
|
||||
end
|
||||
else
|
||||
bind \cf '__fzf_find_file'
|
||||
bind \cr '__fzf_reverse_isearch'
|
||||
bind \eo '__fzf_cd'
|
||||
bind \eO '__fzf_cd --hidden'
|
||||
bind \cg '__fzf_open'
|
||||
bind \co '__fzf_open --editor'
|
||||
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \cf '__fzf_find_file'
|
||||
bind -M insert \cr '__fzf_reverse_isearch'
|
||||
bind -M insert \eo '__fzf_cd'
|
||||
bind -M insert \eO '__fzf_cd --hidden'
|
||||
bind -M insert \cg '__fzf_open'
|
||||
bind -M insert \co '__fzf_open --editor'
|
||||
end
|
||||
end
|
||||
|
||||
if set -q FZF_COMPLETE
|
||||
bind \t '__fzf_complete'
|
||||
end
|
||||
|
||||
function fzf_key_bindings_uninstall -e fzf_key_bindings_uninstall
|
||||
set -l _bindings (bind -a | sed -En "s/(')?__fzf.*\$//p" | sed 's/bind/bind -e/')
|
||||
for binding in $_bindings
|
||||
eval $binding
|
||||
end
|
||||
end
|
||||
8
fish/.config/fish/conf.d/plugin-direnv_init.fish
Normal file
8
fish/.config/fish/conf.d/plugin-direnv_init.fish
Normal file
@ -0,0 +1,8 @@
|
||||
if type -q direnv
|
||||
function __direnv_export_eval --on-variable PWD
|
||||
status --is-command-substitution; and return
|
||||
eval (direnv export fish)
|
||||
end
|
||||
else
|
||||
echo "Install direnv first! Check http://direnv.net" ^&1
|
||||
end
|
||||
44
fish/.config/fish/conf.d/z.fish
Normal file
44
fish/.config/fish/conf.d/z.fish
Normal file
@ -0,0 +1,44 @@
|
||||
if test -z "$Z_DATA"
|
||||
if test -z "$XDG_DATA_HOME"
|
||||
set -U Z_DATA_DIR "$HOME/.local/share/z"
|
||||
else
|
||||
set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
|
||||
end
|
||||
set -U Z_DATA "$Z_DATA_DIR/data"
|
||||
end
|
||||
|
||||
if test ! -e "$Z_DATA"
|
||||
if test ! -e "$Z_DATA_DIR"
|
||||
mkdir -p -m 700 "$Z_DATA_DIR"
|
||||
end
|
||||
touch "$Z_DATA"
|
||||
end
|
||||
|
||||
if test -z "$Z_CMD"
|
||||
set -U Z_CMD "z"
|
||||
end
|
||||
|
||||
set -U ZO_CMD "$Z_CMD"o
|
||||
|
||||
if test ! -z $Z_CMD
|
||||
function $Z_CMD -d "jump around"
|
||||
__z $argv
|
||||
end
|
||||
end
|
||||
|
||||
if test ! -z $ZO_CMD
|
||||
function $ZO_CMD -d "open target dir"
|
||||
__z -d $argv
|
||||
end
|
||||
end
|
||||
|
||||
if not set -q Z_EXCLUDE
|
||||
set -U Z_EXCLUDE $HOME
|
||||
end
|
||||
|
||||
# Setup completions once first
|
||||
__z_complete
|
||||
|
||||
function __z_on_variable_pwd --on-variable PWD
|
||||
__z_add
|
||||
end
|
||||
Reference in New Issue
Block a user