-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
95 lines (81 loc) · 2.8 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
# ____ _ _
#| _ \ __ _| | |___ ___
#| |_) / _` | | / __|/ _ \
#| _ < (_| | | \__ \ (_) |
#|_| \_\__,_|_|_|___/\___/
#
### Exports
export TERM="xterm-256color" # getting proper colors
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export BASH_SILENCE_DEPRECATION_WARNING=1 #
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="${PATH}:${HOME}/.krew/bin"
# Path to your oh-my-zsh installation.
export ZSH="${HOME}/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded
#if [[ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" ]]
#then
# echo "[i] Installing powerlevel10k theme..."
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
#fi
ZSH_THEME="powerlevel10k/powerlevel10k"
### Archive extraction
# usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar.zst) unzstd $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
#if [[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]]
#then
# echo "[i] Adding zsh-autosuggestions plugin..."
# git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
#fi
#if [[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]]
#then
# echo "[i] Adding zsh-syntax-highlighting plugin..."
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
#fi
plugins=(git zsh-autosuggestions zsh-syntax-highlighting kubectl)
source $ZSH/oh-my-zsh.sh
### ALIAS
# Colorize grep output
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# confirm before overwriting something
alias cp="cp -i"
alias mv='mv -i'
alias rm='rm -i'
# adding flags
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
# the terminal rickroll
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
alias ls="ls -FG --color=auto"
alias ll="ls -laFG --color=auto"
alias ..="cd .."
alias ttyc="tty-clock -s -x -c -C 4"
alias bpy="bpytop"
alias k="kubectl"