-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
91 lines (77 loc) · 1.94 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
alias vim="nvim"
alias vi="nvim"
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
export BAT_THEME="OneHalfLight"
plugins=(
colored-man-pages
git
npm
rails
ruby
systemd
starship
)
if [ -z "$SPIN" ]; then
plugins+=(macos)
plugins+=(1password)
plugins+=(yarn)
fi
source $ZSH/oh-my-zsh.sh
source ~/dotfiles/wezterm-shell-integration.sh
base_paths=(
"/opt/homebrew/share"
"/usr/local/share"
"/usr/share"
"/usr/share/zsh/plugins"
)
command_paths=(
"zsh-autosuggestions/zsh-autosuggestions.zsh"
"zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
)
for base_path in $base_paths; do
for command_path in $command_paths; do
full_path="$base_path/$command_path"
if [[ -s $full_path ]]; then
source $full_path
fi
done
done
if command -v rbenv &> /dev/null; then
eval "$(rbenv init - zsh)"
fi
tt() {
local title="${1:-$(basename "$PWD")}"
if [[ -z "${TMUX-}" ]]; then
printf "\033]1337;SetUserVar=%s=%s\007" "tab_title" "$(echo -n "$title" | base64)"
else
tmux rename-session "$title"
printf "\033Ptmux;\033\033]1337;SetUserVar=%s=%s\007\033\\" "tab_title" "$(echo -n "$title" | base64)"
fi
}
clipboard() {
local data
data=$(cat)
printf "\033]52;c;$(printf '%s' "$data" | base64 | tr -d '\n')\a"
}
if command -v fzf >/dev/null 2>&1; then
source <(fzf --zsh)
fi
[[ -f /opt/dev/sh/chruby/chruby.sh ]] && { type chruby >/dev/null 2>&1 || chruby () { source /opt/dev/sh/chruby/chruby.sh; chruby "$@"; } }
[[ -x /opt/homebrew/bin/brew ]] && eval $(/opt/homebrew/bin/brew shellenv)
[ -f /opt/dev/dev.sh ] && source /opt/dev/dev.sh
if [ -n "$SPIN" ]; then
alias ls="exa --long --header --icons"
else
alias ls="eza --long --header --icons --git"
fi
export EDITOR=nvim
export MANPAGER='nvim +Man!'
if [[ -d "/opt/dev/bin" ]]; then
PATH="/opt/dev/bin:$PATH"
fi
if [[ -d "$HOME/.cargo/bin" ]]; then
PATH="$HOME/.cargo/bin:$PATH"
fi
export PATH="$HOME/.local/bin:$PATH"
eval $(thefuck --alias)