-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_bashrc.tmpl
34 lines (29 loc) · 1.4 KB
/
dot_bashrc.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[ -z "$PS1" ] && return
{{ if .gpgagent }}export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
{{ end }}
{{- if eq .chezmoi.osRelease.id "arch" }}
[[ -f /usr/share/fzf/key-bindings.bash ]] && source /usr/share/fzf/key-bindings.bash || echo "[$0] cannot find key-bindings.bash of fzf"
{{- else if eq .chezmoi.osRelease.id "tencentos" }}
[[ -f $HOME/.config/fzf/key-bindings.bash ]] && source $HOME/.config/fzf/key-bindings.bash || echo "[$0] cannot find key-bindings.bash of fzf"
{{- else if eq .chezmoi.osRelease.id "Ubuntu" }}
[[ -f /usr/share/doc/fzf/examples/key-bindings.bash ]] && source /usr/share/doc/fzf/examples/key-bindings.bash || echo "[$0] cannot find key-bindings.bash of fzf"
{{ end }}
# https://github.com/folke/tokyonight.nvim/blob/main/extras/fzf/tokyonight_night.zsh
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
--color=fg:#c0caf5,bg:#1a1b26,hl:#ff9e64 \
--color=fg+:#c0caf5,bg+:#292e42,hl+:#ff9e64 \
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a"
# https://yazi-rs.github.io/docs/quick-start#shell-wrapper
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
eval "$(navi widget bash)"
eval "$(zoxide init bash)"
eval "$(starship init bash)"