-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
119 lines (98 loc) · 3.43 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
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
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi
ZSH=/usr/share/oh-my-zsh/
plugins=(
git
zsh-autosuggestions
poetry
)
source ~/clones/zsh-autocomplete/
cat $HOME/.cache/wal/sequences
source $ZSH/oh-my-zsh.sh
fpath+=~/.zfunc
autoload -Uz compinit && compinit
# function command_not_found_handler {
# local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
# printf 'zsh: command not found: %s\n' "$1"
# local entries=( ${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"} )
# if (( ${#entries[@]} )) ; then
# printf "${bright}$1${reset} may be found in the following packages:\n"
# local pkg
# for entry in "${entries[@]}" ; do
# local fields=( ${(0)entry} )
# if [[ "$pkg" != "${fields[2]}" ]] ; then
# printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
# fi
# printf ' /%s\n' "${fields[4]}"
# pkg="${fields[2]}"
# done
# fi
# return 127
# }
# Detect the AUR wrapper
if pacman -Qi yay &>/dev/null ; then
aurhelper="yay"
elif pacman -Qi paru &>/dev/null ; then
aurhelper="paru"
fi
function in {
local -a inPkg=("$@")
local -a arch=()
local -a aur=()
for pkg in "${inPkg[@]}"; do
if pacman -Si "${pkg}" &>/dev/null ; then
arch+=("${pkg}")
else
aur+=("${pkg}")
fi
done
if [[ ${#arch[@]} -gt 0 ]]; then
sudo pacman -S "${arch[@]}"
fi
if [[ ${#aur[@]} -gt 0 ]]; then
${aurhelper} -S "${aur[@]}"
fi
}
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"
eval "$(zoxide init --cmd cd zsh)"
[[ -r "/usr/share/z/z.sh" ]] && source /usr/share/z/z.sh
# Helpful aliases
alias c='clear' # clear terminal
alias l='eza -lh --icons=auto' # long list
alias ls='lsd'
# alias ls="eza --tree --level=1 --icons=always --no-time --no-user --no-permissions"
alias ll='eza -lha --icons=auto --sort=name --group-directories-first' # long list all
alias ld='eza -lhD --icons=auto' # long list dirs
alias lt='eza --icons=auto --tree' # list folder as tree
alias cat='bat'
alias v='nvim'
alias ..='cd ..'
alias ...='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias mkdir='mkdir -p'
alias fetch='fastfetch --config examples/13'
alias gc='git clone'
alias pipi='pip install'
alias za='zathura'
export PATH=$PATH:$HOME/.spicetify
export PATH="$PATH:$HOME/.local/bin/"
export EDITOR='nvim'
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
clear
[[ -f /home/jake/.dart-cli-completion/zsh-config.zsh ]] && . /home/jake/.dart-cli-completion/zsh-config.zsh || true
export PATH="$HOME/.local/bin:$PATH"
export PATH=$PATH:$HOME/.spicetify