-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
139 lines (108 loc) · 3.35 KB
/
.zshrc
File metadata and controls
139 lines (108 loc) · 3.35 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# -----------------------------------------------------
#OH-MY-ZSH
# -----------------------------------------------------
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME=xiong-chiamiov-plus
plugins=(
git
sudo
web-search
archlinux
zsh-autosuggestions
zsh-syntax-highlighting
fast-syntax-highlighting
copyfile
copybuffer
zsh-autocomplete
# dirhistory
vscode
)
autoload -Uz add-zsh-hook
autoload -U colors && colors
source $ZSH/oh-my-zsh.sh
source <(fzf --zsh)
# _PROMPT_TRANSIENT_STATIC='%{%F{242}%}%~%{%f%} $ '
# _transient_preexec() {
# local command_line="${1}"
# print -n '\e[1A\e[2K\e[1A\e[2K\r'
# print -P -n "$_PROMPT_TRANSIENT_STATIC"
# print -n "${command_line}"
# print
# }
# add-zsh-hook preexec _transient_preexec
# zsh history
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
eval "$(oh-my-posh init zsh --config ~/.config/ohmyposh/EDM115-newline.omp.json)"
# Starship
zmodload zsh/parameter
# source ~/starship
# -----------------------------------------------------
# Exports
# -----------------------------------------------------
# Private exports
#source ~/.env
# SSH agent
#export SSH_AUTH_SOCK=~/.bitwarden-ssh-agent.sock
export EDITOR=nvim
export PATH="/usr/lib/ccache/bin/:$PATH"
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
[[ ":$PATH:" != *":$PNPM_HOME:"* ]] && export PATH="$PNPM_HOME:$PATH"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"
# Python user base
export PATH="$PATH:$HOME/.local/bin"
# pyenv
# export PYENV_ROOT="$HOME/.pyenv"
# if [ -d "$PYENV_ROOT/bin" ]; then
# export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init -)"
# fi
# Golang environment variables
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin
export LD_LIBRARY_PATH=/usr/local/lib
# Update PATH to include GOPATH and GOROOT binaries
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH
if command -v thefuck >/dev/null 2>&1; then
eval "$(thefuck --alias)"
fi
export PATH=$PATH:~/.spicetify
bindkey '^X' create_completion
# Zoxide
if command -v zoxide >/dev/null 2>&1; then
eval "$(zoxide init zsh)"
fi
zle -N accept-line _emptyenter
_emptyenter() {
if [[ -z "$BUFFER" ]]; then
zle redisplay
else
zle .accept-line
fi
}
# -----------------------------------------------------
#aliases
# -----------------------------------------------------
source ~/.config/zshrc/aliases.zsh
if [ -f "$HOME/custom-commands" ]; then
source "$HOME/custom-commands"
fi
for f in ~/.config/zshrc/functions/*.zsh; do
source "$f"
done
# -----------------------------------------------------
#AUTOSTART
# -----------------------------------------------------
# Don't run fastfetch in VSCode integrated terminal
if [[ -z $VSCODE_INJECTION ]]; then
fastfetch -c ~/.config/fastfetch/arch
fi
export SUDO_PROMPT=$(printf '\x1b[38;2;255;255;255m╭─\x1b[38;2;0;43;84m\x1b[48;2;0;43;84m\x1b[38;2;230;240;255m%s\x1b[0m\x1b[48;2;30;80;128m\x1b[38;2;0;43;84m\x1b[38;2;255;0;0m \x1b[0m\x1b[48;2;0;92;179m\x1b[38;2;30;80;128m\x1b[38;2;230;240;255m enter password for %s:\x1b[0m\x1b[38;2;0;92;179m\x1b[0m\n\x1b[38;2;255;255;255m╰─❯ \x1b[0m' "sudo" "$(whoami)")
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"