-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
executable file
·97 lines (77 loc) · 4.16 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
# ╭──────────────────────────────────────────────────────────╮
# │ Oh My Zsh │
# ╰──────────────────────────────────────────────────────────╯
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME=""
# this has to be set before loading plugins
export NVM_COMPLETION=true
export NVM_LAZY_LOAD=true
plugins=(
git
fzf
zsh-nvm
zsh-interactive-cd
# Completions - Start
# bun
zsh-better-npm-completion
# Completions - End
zsh-autosuggestions
zsh-syntax-highlighting
history-substring-search
)
source $ZSH/oh-my-zsh.sh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# ╭──────────────────────────────────────────────────────────╮
# │ Variables │
# ╰──────────────────────────────────────────────────────────╯
export PATH=$PATH:~/.cargo/bin
export PATH=$PATH:~/.local/bin
export EDITOR="nvim"
export QT_QPA_PLATFORMTHEME=qt5ct
# Reading dotenv
if [ -f "$HOME/dotfiles/.env" ]; then
while IFS= read -r line; do
if [[ ! $line =~ ^# ]]; then
export "$line"
fi
done < "$HOME/dotfiles/.env"
fi
# ╭──────────────────────────────────────────────────────────╮
# │ Aliases │
# ╰──────────────────────────────────────────────────────────╯
alias v="nvim"
alias safev='NVIM_APPNAME=nvchadvim nvim'
alias rgf="rg --files --hidden | rg"
alias rn=". ranger"
alias gvim="nvim --listen ~/.cache/nvim/godot.pipe ."
alias pac-installed="pacman -Qqe | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'"
alias pac-installed-all="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'"
alias pac-list-unused="pacman -Qdt"
alias pac-remove-unused="pacman -Rsn $(pacman -Qdtq)"
# alias dot="cd ~/dotfiles && nvim"
alias doti="~/dotfiles/install.sh"
alias archwiki="firefox /usr/share/doc/arch-wiki/html/en/Table_of_contents.html"
# alias rvim="XDG_CONFIG_HOME=~/.config/nvim.rust XDG_DATA_HOME=~/.local/share/nvim.rust nvim -u .config/nvim.rust/init.lua"
# ╭──────────────────────────────────────────────────────────╮
# │ Starship │
# ╰──────────────────────────────────────────────────────────╯
eval "$(starship init zsh)"
# SSH-Agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
# ╭──────────────────────────────────────────────────────────╮
# │ Dependencies │
# ╰──────────────────────────────────────────────────────────╯
source /usr/share/nvm/init-nvm.sh
source /usr/share/doc/find-the-command/ftc.zsh noprompt quiet
eval "$(zoxide init zsh)"
LFCD="$HOME/dotfiles/lf/lfcd.sh"
if [ -f "$LFCD" ]; then
source "$LFCD"
alias lf="lfcd"
fi