-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc_desktop
87 lines (66 loc) · 2.06 KB
/
zshrc_desktop
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ulimit -n 16384
DISABLE_AUTO_UPDATE=true
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="secwall"
HIST_IGNORE_SPACE=1
plugins=(git python brew golang ripgrep)
source $ZSH/oh-my-zsh.sh
setopt hist_ignore_space
setopt hist_ignore_all_dups
fpath=(/opt/homebrew/share/zsh-completions $fpath)
bindkey '^[[A' up-line-or-search
bindkey '^[[B' down-line-or-search
export HOMEBREW_NO_ENV_HINTS=1
export EDITOR=/opt/homebrew/bin/nvim
# Customize to your needs...
export PATH=$HOME/Documents/dev/utils:/opt/homebrew/bin:$HOME/.cargo/bin:$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/sbin
# Pyenv setup
export PYTHON_CONFIGURE_OPTS="--enable-framework"
export PYENV_ROOT="$HOME/.pyenv"
if [ -d "$PYENV_ROOT" ]
then
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
PYTHON_FULL_VERSION=$(python --version | awk '{print $NF};')
PYTHON_SHORT_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d\. -f1,2)
export PATH=$PATH:$HOME/.pyenv/versions/$PYTHON_FULL_VERSION/Python.framework/Versions/$PYTHON_SHORT_VERSION/bin
fi
export CGO_CFLAGS_ALLOW='-objcmt-migrate-all'
export GOPATH=$HOME/.go
export PATH=$GOPATH/bin:$PATH
export PATH=$HOME/.rustup/toolchains/nightly-aarch64-apple-darwin/bin:$PATH
export PATH=$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH
# Start/attach to tmux on remote host
ssht () {
if [[ "$2" == "" ]]
then
ssh -A "$1" -t 'tmux attach -t secwall || tmux new -s secwall || /bin/bash'
else
ssh $*
fi
}
compdef ssht=ssh
alias ssh='ssht'
# Install my dotfiles on remote host
dotf-install () {
for H
do
echo "Installing to $H"
rsync -rzvp --chmod=og-rwx --copy-links --copy-dirlinks ~/.dotf-dist/ $H:
done
}
compdef dotf-install=ssh
ssh-copy-id () {
for H
do
cat ~/.ssh/id_rsa.pub | ssh $H "mkdir -p .ssh; chmod 700 .ssh; cat >> .ssh/authorized_keys; chmod 600 .ssh/authorized_keys"
done
}
compdef ssh-copy-id=ssh
brew-up () {
brew update && brew upgrade && brew upgrade --cask --greedy && brew cleanup -s
}
alias 'vim'='nvim'
# enable fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
compinit