dotfiles-ansible/roles/config/templates/fish/config.j2

41 lines
1.1 KiB
Django/Jinja

status is-login; and replay "source /etc/profile"
{# 0022 is the default, so don't do anything in that case #}
{% if not umask in ['0022', '022'] %}
status is-login; and umask {{ umask }}
{% endif %}
# PATH
set -e fish_user_paths
for path in $XDG_CONFIG_HOME/emacs/bin $XDG_BIN_HOME $CARGO_HOME/bin $GOPATH/bin $NPM_CONFIG_PREFIX/bin $KREW_ROOT/bin $CABAL_DIR/bin
test -d $path && set -ga fish_user_paths $path
end
# Starship prompt
if command -v starship > /dev/null
starship init fish --print-full-init | source
end
# zoxide
if command -v zoxide >/dev/null
zoxide init fish | source
end
# vi key bindings
fish_vi_key_bindings
# fzf key bindings
status is-interactive; and fzf_key_bindings
# gpg-agent
set -gx GPG_TTY (tty)
{% if ssh_client == 'openssh' %}
# gpg-agent normally starts on demand but ssh command doesn't trigger it
# As such manually start it on login
status is-login; and gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye >/dev/null
if test -z "$SSH_AUTH_SOCK"
set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
end
{% endif %}