-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
146 lines (129 loc) · 3.45 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
#+----+
#|Vars|
#+----+
export home=home/purplesmarts
export TERM="xterm-256color"
export ZSH=root/.oh-my-zsh
export EDITOR=vim
#MSF_DATABASE_CONFIG=/usr/share/metasploit-framework/config/database.yml
#+--------+
#|HistSize|
#+--------+
HISTFILE=~/.histfile
HISTSIZE=25
SAVEHIST=25
#+----------+
#|Aesthetics|
#+----------+
#Theme
ZSH_THEME="powerlevel9k/powerlevel9k"
#PowerLevel9k Config
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_IP_BACKGROUND='black'
POWERLEVEL9K_IP_FOREGROUND='white'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time)
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='white'
#Colored Manuals
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;40;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
#Dircolors
LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:';
export LS_COLORS
#+-------+
#|Aliases|
#+-------+
alias ls='ls --color -F'
alias grep='grep --color=auto'
alias more='less'
alias hist='history | less'
alias openports='ss --all --numeric --processes --ipv4 --ipv6'
alias 4cdl='$HOME/scripts/4cdl'
alias 4trips='$HOME/scripts/4trips'
alias music='mpd && ncmpcpp'
alias mute='killall mpd'
alias unmute='mpd'
alias mux='tmuxinator'
alias urlforen='$HOME/MiscPrograms/urlforensics.sh'
alias teamspeak='/home/purplesmarts/MiscPrograms/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh'
alias Teamspeak='/home/purplesmarts/MiscPrograms/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh'
#PackageManagement
alias pacman='sudo pacman'
alias aur='yaourt'
alias AUR='yaourt'
alias install='sudo pacman -S'
alias uninstall='sudo pacman -R'
alias remove='sudo pacman -R'
#Common Errors
alias :q=' exit'
alias :Q=' exit'
alias :x=' exit'
alias quit=' exit'
alias cd..='cd ..'
alias vi='vim'
alias vmi='vim'
alias gedit='vim'
alias nano='vim'
alias intsal='install'
alias celar='clear'
alias clea='clear'
#Sudoing
#alias gufw='sudo gufw'
alias wicd='sudo wicd'
alias udo='sudo'
alias ssudo='sudo'
#+--------+
#|Commands|
#+--------+
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo Dont know how to extract $1 ;;
esac
else
echo $1 is not a valid file!
fi
}
#+------------+
#|ZSH Defaults|
#+------------+
#Plugins Example format: plugins=(git git-extras tmux dirhistory python pip)
plugins=(git git-extras tmux dirhistory python pip wd sudo sublime catimg colored-man-pages nmap)
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
setopt interactivecomments
setopt ignoreeof
setopt correctall
setopt globdots
#source $HOME/.bash_aliases
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
export EDITOR='vim'