-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
executable file
·283 lines (226 loc) · 7.71 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
#if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
#
#fi
export ZSH="/home/pratham82/.oh-my-zsh"
#ZSH_THEME="spaceship"
#ZSH_THEME="fishy"
#ZSH_THEME="fino"
#ZSH_THEME="gentoo"
#ZSH_THEME="robbyrussell"
ZSH_THEME="gianu"
#ZSH_THEME="trapd00r"
#ZSH_THEME="passion"
#ZSH_THEME="agnoster"
#ZSH_THEME="oxide"
#ZSH_THEME="lambda-mod"
#ZSH_THEME="zeta"
#SH_THEME="jovial"
#ZSH_THEME="powerlevel10k/powerlevel10k"
#POWERLEVEL9K_MODE="nerdfont-complete"
plugins=(git zsh-autosuggestions vi-mode fzf)
source $ZSH/oh-my-zsh.sh
#BROWSER=/usr/bin/google-chrome-stable
BROWSER=/usr/bin/firefox-developer-edition
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
# Paths for firefox dev edition
#PATH=${PATH}:"${HOME}/.local/bin"
export PATH=/opt/firefox/firefox:$PATH
# Adding path for deno
export DENO_INSTALL="/home/pratham82/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
# Adding Go binary to the Path
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/usr/local/bin/nvim
#alias nvim=/usr/local/bin/nvim.appimage
# Aadding path for pure theme
fpath+=$HOME/.zsh/pure
# Export path for lsd
export PATH=/home/pratham82/.cargo/bin:$PATH
# Export Path for google-chrome-ubstable
# Lmabda mode theme
export LAMBDA_MOD_N_DIR_LEVELS=3
#load `lambda-mod` and `oh-my-zsh`
# Example aliases
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias zs="nvim ~/.zshrc"
alias sz="source ~/.zshrc"
alias vs="vim ~/.vimrc"
alias sv="source ~/.vimrc"
alias nvs="nvim ~/.config/nvim/init.vim"
alias nvp="nvim ~/.config/nvim/vim-plug/plugins.vim"
alias ac="nvim ~/.config/alacritty/alacritty.yml"
alias kc="nvim ~/.config/kitty/kitty.conf"
alias asd="cd ~/.config/alacritty/"
alias sht="cd ~/Dev/Shell-scripting"
alias cnv="cd ~/.config/nvim"
alias kas="tmux kill-server"
alias ts="nvim ~/.tmux.conf"
alias pico="nvim ~/.config/picom.conf"
alias robo='/usr/local/bin/robomongo/bin/robo3t'
alias space='sudo du -sh'
alias spaced='sudo du -h --max-depth=1'
# Project starters aliases
alias ns="npm start"
alias cra="npx create-react-app"
alias nap="ng new"
alias ras="ng serve --open"
# System aliases
alias dev="cd ~/Dev"
alias py="cd ~/Dev/Python-Programming"
alias c="clear"
alias cgs="clear && git status"
alias api="sudo apt install"
alias ap="sudo apt"
#alias pfetch='~/.zsh/pfetch/pfetch'
#alias dot="cp /home/pratham82/{.zshrc,.vimrc,.hyper.js,.tmux.conf} /home/pratham82/dotfiles; sudo cp -r ~/.config/nvim dotfiles/; sudo cp -r ~/.i3 dotfiles;
#sudo cp -r ~/.config/alacritty dotfiles/alacirtty";
alias dot="cp /home/pratham82/{.tmux.conf,.zshrc} /home/pratham82/dotfiles; sudo cp -r ~/.config/nvim dotfiles/.config; sudo cp -r ~/.config/i3 dotfiles/.config;
sudo cp -r ~/.config/alacritty dotfiles/.config;sudo cp -r ~/.config/kitty dotfiles/.config; sudo cp -r ~/.config/polybar dotfiles/.config; sudo cp -r ~/.config/Code/User/* dotfiles/.config/vscode; sudo cp ~/.config/picom.conf dotfiles/.config";
alias mk="mkdir"
alias sleep="shutdown now"
# tmux aliases
alias ide=~/ide
# Github automation
alias ghstart=~/start-project.sh
# Postgres
# Enable postgresql: sudo systemctl enable postgresql.service
alias pgs='sudo systemctl status postgresql'
alias pgu='sudo systemctl start postgresql'
alias pgd='sudo systemctl stop postgresql'
alias pgc='psql -d test'
# MongoDB aliases
alias startmo="sudo systemctl start mongodb"
alias stopmo="sudo systemctl stop mongodb"
alias statmo="sudo systemctl status mongodb"
# Docker
alias dockerup="sudo systemctl start docker"
alias dockerdown="sudo systemctl stop docker"
alias dockerstat="sudo systemctl status docker"
# Curl
alias get="curl cheat.sh/"
#Docker related
# Setting docker for normal user
#sudo gpasswd -a pratham82 docker
#newgrp docker
# Removing docker
# suod pacman -Rns docker
# sudo groupdel docker
# suod rm -rf /var/lib/docker
# TeamViewer
alias teamup="sudo systemctl start teamviewerd.service"
alias teamdown="sudo systemctl stop teamviewerd.service"
alias teamstat="sudo systemctl status teamviewerd.service"
# Colors
alias cols="nvim ~/dotfiles/terminal-bg-colors.conf"
# Git aliases
alias gs="git status"
alias ga="git add"
alias gaa="git add ."
alias gc="git commit -m"
alias gcl="git clone"
alias gp="git push"
alias gl="git log"
alias gr="git reset"
alias gre="git revert"
alias gpu="git pull"
alias k8000="sudo fuser -k 8000/tcp"
alias gcb="git chekout -b"
alias gco="git chekout"
# Development shortcuts
alias ecgen="npm i eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-node eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react -D"
# Fast node manager
# export PATH=/home/pratham82/.local/bin:$PATH
# eval "`fnm env`"
#alias startmo="sudo service mongod start"
#alias stopmo="sudo service mongod stop"
#alias statmo="sudo service mongod status"
# Shortcuts for lsd
alias ls='lsd'
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
## Projects structure
alias ltp='lt node_modules --depth 0&& lt --ignore-glob node_modules'
# Aliases for Arch
alias i3c='nvim ~/.config/i3/config'
alias pc='nvim ~/.config/polybar/config'
alias drc='nvim ~/.dmenurc'
alias pac='sudo pacman -S'
alias pacr='sudo pacman -R'
## Aliases for snap
alias startsnap='sudo systemctl enable --now snapd.socket'
alias stopsnap='sudo systemctl stop --now snapd.socket'
alias statsnap='sudo systemctl status --now snapd.socket'
alias snapi='sudo snap install'
alias snapun='sudo snap remove'
# Important shortcuts
alias c.="code ."
bindkey -v
function zle-keymap-select zle-line-init
{
# change cursor shape in iTerm2
case $KEYMAP in
vicmd) print -n -- "\E]50;CursorShape=0\C-G";; # block cursor
viins|main) print -n -- "\E]50;CursorShape=1\C-G";; # line cursor
esac
zle reset-prompt
zle -R
}
function zle-line-finish
{
print -n -- "\E]50;CursorShape=0\C-G" # block cursor
}
zle -N zle-line-init
zle -N zle-line-finish
zle -N zle-keymap-select
fzf-history-widget-accept() {
fzf-history-widget
zle accept-line
}
zle -N fzf-history-widget-accept
bindkey '^X^R' fzf-history-widget-accept
# Vi mode shortcut
# ctrl + shift + space
# Drive ss
# alias tuts="cd dev/sdb1/Downloads/Tutorials"
# Fetch tools
#neofetch
pfetch
#ufetch
#colorscript random
#nerdfetch
source /home/pratham82/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# fnm
export PATH=/home/pratham82/.local/bin:$PATH
eval "`fnm env`"
export PATH="/tmp/fnm_multishell_20949_1607351516223/bin":$PATH
export FNM_MULTISHELL_PATH="/tmp/fnm_multishell_20949_1607351516223"
export FNM_DIR="/home/pratham82/.fnm"
export FNM_LOGLEVEL="info"
export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist"
export FZF_BASE=/path/to/fzf/install/dir
#eval "$(starship init zsh)"
[ -f "/home/pratham82/.ghcup/env" ] && source "/home/pratham82/.ghcup/env" # ghcup-env