-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
103 lines (83 loc) · 2.85 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
# Lines configured by zsh-newuser-install
HISTFILE=~/.zsh/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/conor/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Enable plugins
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
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
# CUSTOM SETTINGS
## Aliases
alias ls="exa -lh"
alias sudo="sudo "
alias dotfiles="/usr/bin/env git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"
alias pacdiff="DIFFPROG=delta pacdiff"
alias arch-rankmirrors="sudo reflector --protocol https --verbose --latest 25 --sort rate --save /etc/pacman.d/mirrorlist"
alias eos-rankmirrors="eos-rankmirrors --sort rate"
### pip
alias pir='pip install -r requirements.txt'
### Django
alias dj="python manage.py"
alias djrs="python manage.py runserver"
alias djsh="python manage.py shell"
alias djm="python manage.py migrate"
alias djmm="python manage.py makemigrations"
alias djmmm="python manage.py makemigrations & python manage.py migrate"
alias djcd="python manage.py check --deploy"
### systemctl
alias sc="systemctl"
alias scsr="systemctl start"
alias scsp="systemctl stop"
alias scr="systemctl restart"
alias sce="systemctl enable"
alias scen="systemctl enable --now"
alias scd="systemctl disable"
alias scs="systemctl status"
### npm/pnpm
alias nrd="npm run dev"
alias nrb="npm run build"
alias nrs="npm run start"
alias nrl="npm run lint"
alias prd="pnpm run dev"
alias prb="pnpm run build"
alias prs="pnpm run start"
alias prl="pnpm run lint"
## Environment Variables
export BAT_THEME=OneHalfLight
# Preview file content using bat (https://github.com/sharkdp/bat)
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always {}' --bind 'ctrl-/:change-preview-window(down|hidden|)'"
# Print tree structure in the preview window
export FZF_ALT_C_OPTS="--preview 'tree -C {}'"
## Arrow-driven autocompletion
zstyle ':completion:*' menu select
## Keybinds
bindkey ';5D' backward-word
bindkey ';5C' forward-word
bindkey ';6D' beginning-of-line
bindkey ';6C' end-of-line
# Kitty
bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word
bindkey '^[[1;7C' end-of-line
bindkey '^[[1;7D' beginning-of-line
## Load Starship prompt
eval "$(starship init zsh)"
## Load FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# pnpm
export PNPM_HOME="/home/conor/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end