-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
95 lines (75 loc) · 2.47 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
export EDITOR=nvim
# Plugins
autoload -U compinit
compinit
source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
source $HOME/.zsh/omz-git/git.plugin.zsh
source $HOME/.zsh/you-should-use/you-should-use.plugin.zsh
# History
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=1000
setopt SHARE_HISTORY
setopt HIST_SAVE_NO_DUPS
# Path variables
export PATH="$PATH:/opt/nvim-linux64/bin"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"
# Function to create a directory and cd into the newly created directory
function mkcd {
if [ ! -n "$1" ]; then
echo "Enter a directory name"
elif [ -d $1 ]; then
echo "\`$1' already exists"
else
mkdir $1 && cd $1
fi
}
# Replace ls with exa
alias ls="exa --icons"
alias ll="exa --icons -lh"
alias la="exa --icons -lAh"
alias l="exa --icons -lah"
alias tree="exa --icons -T"
# Directory aliases
alias -g ..='cd ..'
alias -g ...='cd ../..'
alias -g ....='cd ../../..'
alias -g .....='cd ../../../..'
# Keybindings
bindkey "^N" down-line-or-history
bindkey "^P" up-line-or-history
# Enable remote desktop
alias remotedesktop="sudo /etc/init.d/xrdp"
# Removing zone identifier files generated by Windows
alias rmzone="find . -name '*Zone.Identifier' -delete"
# Django manage alias
alias manage="python3 manage.py"
# Python environment alias
alias activate="source env/bin/activate"
# Script to extract and clean up zip file downloaded from SCeLe
alias extract_scele="python ~/.config/bin/extract_scele_zip.py"
# Smart man pages
alias fman="compgen -c | fzf | xargs tldr"
# Neovim
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
# Go version manager
[[ -s "/home/oka/.gvm/scripts/gvm" ]] && source "/home/oka/.gvm/scripts/gvm"
# Python version manager
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Fuzzy finder
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
--color=fg:#c0caf5,bg:#1a1b26,hl:#bb9af7
--color=fg+:#c0caf5,bg+:#1a1b26,hl+:#7dcfff
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a'
# Zoxide
eval "$(zoxide init zsh)"
# Oh My Posh
eval "$(oh-my-posh init zsh --config $HOME/.config/oh-my-posh/pure.omp.json)"