added some explanations to zshrc
This commit is contained in:
parent
01fba0e979
commit
0d9dec905f
95
.zshrc
95
.zshrc
@ -1,62 +1,84 @@
|
||||
# Path to your oh-my-zsh configuration.
|
||||
# Path to your oh-my-zsh configuration.
|
||||
ZSH=$HOME/.oh-my-zsh
|
||||
|
||||
# Set name of the theme to load.
|
||||
# Look in ~/.oh-my-zsh/themes/
|
||||
# Optionally, if you set this to "random", it'll load a random theme each
|
||||
# time that oh-my-zsh is loaded.
|
||||
# Set name of the theme to load.
|
||||
# Look in ~/.oh-my-zsh/themes/
|
||||
# Optionally, if you set this to "random", it'll load a random theme each
|
||||
# time that oh-my-zsh is loaded.
|
||||
ZSH_THEME="af-magic"
|
||||
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
# alias vi="vim"
|
||||
|
||||
# Set to this to use case-sensitive completion
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Comment this out to disable bi-weekly auto-update checks
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment following line if you want to disable colors in ls
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment following line if you want to disable autosetting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment following line if you want red dots to be displayed while waiting for completion
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
#ALIASES
|
||||
# vi starts vim
|
||||
alias vi="vim"
|
||||
|
||||
# Set to this to use case-sensitive completion
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Comment this out to disable bi-weekly auto-update checks
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment following line if you want to disable colors in ls
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment following line if you want to disable autosetting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment following line if you want red dots to be displayed while waiting for completion
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
#ALIASES
|
||||
# update for archlinux
|
||||
# in debian like oses you should change it to sudo apt update && sudo apt upgrade
|
||||
# for nixos sudo nix-channel --update && sudo nixos rebuild-switch
|
||||
alias update="yaourt -Syua --noconfirm"
|
||||
#check directory sizes
|
||||
alias ducks="du -cksh * | sort -rn | head"
|
||||
# for backup in git
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||
bindkey "\033[1~" beginning-of-line
|
||||
bindkey "\033[4~" end-of-line
|
||||
|
||||
|
||||
# bind page up and page down? can't remember but think this must be. :)
|
||||
bindkey "\033[1~" beginning-of-line
|
||||
bindkey "\033[4~" end-of-line
|
||||
|
||||
#Add Plugins to oh my zsh
|
||||
plugins=(git archlinux)
|
||||
|
||||
|
||||
#include the oh my zsh config
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Customize to your needs...
|
||||
# Customize to your needs...
|
||||
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin
|
||||
export PYTHONPATH=/usr/lib/python3.4/site-packages
|
||||
# Aktuelle LS Colors fällt auf die fresse?
|
||||
|
||||
# if colors of ls don't work as expected the following line delete all colors from ls
|
||||
# export LS_COLORS="rs=0:di=01;96:ln=04;01;35:mh=00: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:ca=30;41:tw=30;42:$"
|
||||
|
||||
# Add dircolors plugin from:
|
||||
# add it with: yaourt -S zsh-dircolors-solarized-git
|
||||
# alternatively you can add it with: git clone --recursive git://github.com/joel-porquet/zsh-dircolors-solarized $ZSH_CUSTOM/plugins/zsh-dircolors-solarized
|
||||
# and than add it to plugins line above (line 40)
|
||||
# enable it with: setupsolarized
|
||||
source /usr/share/zsh/plugins/zsh-dircolors-solarized/zsh-dircolors-solarized.zsh
|
||||
|
||||
# function to detect ddos attacks
|
||||
function detect-ddos { $
|
||||
sudo netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort - n $
|
||||
}
|
||||
|
||||
|
||||
# function to simple block suspicious IPs
|
||||
# simply type ipt-block ipadress
|
||||
function ipt-block {
|
||||
sudo iptables -A INPUT -s $1 -j DROP
|
||||
echo "permblocked $1"
|
||||
}
|
||||
|
||||
|
||||
#function to load actual IP Blocklist from openbl and ban them out
|
||||
function update-blacklist {
|
||||
CHAINLIST=$(sudo /sbin/iptables -nL | grep 'Chain block-traffic-from-openbl' | cut -d\ -f 2)
|
||||
|
||||
@ -82,6 +104,7 @@ source /usr/share/zsh/plugins/zsh-dircolors-solarized/zsh-dircolors-solarized.zs
|
||||
done
|
||||
}
|
||||
|
||||
# add some PERL Path variables
|
||||
PATH="$HOME/perl5/bin${PATH+:}${PATH}"; export PATH;
|
||||
PERL5LIB="$HOME/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
|
||||
PERL_LOCAL_LIB_ROOT="$HOME/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT;
|
||||
|
Loading…
Reference in New Issue
Block a user