-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
executable file
·69 lines (55 loc) · 1.58 KB
/
.zshrc
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#test
export zenv="zshrc"
# iterm2 integration
# export ITERM2_SQUELCH_MARK=1
test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh
# SSH via gpg-agent
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
#use python3 as default
alias python='python3'
alias pip='pip3'
# neovim
alias vim="nvim"
alias vi="nvim"
# exa
alias ls='exa --icons'
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
alias tree='ls --tree'
# bat
alias cat='bat'
# nnn
n ()
{
# Block nesting of nnn in subshells
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn -Fc "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
[ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1"
# manage dotfiles
alias dotfiles='git --git-dir=/$HOME/.dotfiles/ --work-tree=/$HOME'
compdef dotfiles='git'
# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source /Users/bastian/.config/broot/launcher/bash/br