Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #zshrc
- #zshrc
- # Lines configured by zsh-newuser-install
- HISTFILE=~/.histfile
- HISTSIZE=1000
- SAVEHIST=1000
- source ~/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- setopt appendhistory autocd nomatch notify
- unsetopt beep extendedglob
- # create a zkbd compatible hash;
- # to add other keys to this hash, see: man 5 terminfo
- typeset -A key
- key[Home]=${terminfo[khome]}
- key[End]=${terminfo[kend]}
- key[Insert]=${terminfo[kich1]}
- key[Delete]=${terminfo[kdch1]}
- key[Up]=${terminfo[kcuu1]}
- key[Down]=${terminfo[kcud1]}
- key[Left]=${terminfo[kcub1]}
- key[Right]=${terminfo[kcuf1]}
- key[PageUp]=${terminfo[kpp]}
- key[PageDown]=${terminfo[knp]}
- # setup key accordingly
- [[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
- [[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
- [[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
- [[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
- [[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
- [[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
- [[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
- [[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
- [[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
- [[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
- # Finally, make sure the terminal is in application mode, when zle is
- # active. Only then are the values from $terminfo valid.
- if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
- function zle-line-init () {
- printf '%s' "${terminfo[smkx]}"
- }
- function zle-line-finish () {
- printf '%s' "${terminfo[rmkx]}"
- }
- zle -N zle-line-init
- zle -N zle-line-finish
- fi
- case $TERM in
- xterm*|rxvt*|screen*)
- precmd() { print -Pn "\e]0;%m : %~\a" }
- preexec () { print -Pn "\e]0;$1\a" }
- ;;
- esac
- PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib/ccache/bin/:/usr/lib/colorgcc/bin:/opt/android-sdk/platform-tools:/opt/java/bin:/opt/java/db/bin:/opt/java/jre/bin:/opt/kde"
- export PATH
- export SAL_USE_VCLPLUGIN=gtk
- autoload -Uz compinit
- compinit
- autoload -U promptinit
- promptinit
- autoload -U colors && colors
- PROMPT="%{$fg[yellow]%}%B%n%b %B%{$fg[white]%}%#%b %{$fg[yellow]%}%B%~%b%{$fg[red]%}%B > %b"
- #PROMPT="%{$fg[black]%}%B%n%b %B%{$fg[black]%}%#%b %{$fg[black]%}%B%U%~%u%b%{$fg[black]%}%B > %b"
- #------------------------------------------////
- # Proxy:
- #------------------------------------------////
- #http_proxy=http://127.0.0.1:8118/
- #HTTP_PROXY=$http_proxy
- #export http_proxy HTTP_PROXY
- #------------------------------------------////
- # Aliases:
- #------------------------------------------////
- ## make ls list by size
- ##alias ls='du -s */* | sort -n'
- alias findbig='find . -type f -exec ls -s {} \; | sort -n -r | head -5'
- alias ls='ls -aF --color=always'
- alias la='ls -Al'
- alias lx='ls -lXB'
- alias lk='ls -lSr'
- alias lc='ls -lcr'
- alias lu='ls -lur'
- alias lr='ls -lR'
- alias lt='ls -ltr'
- alias lm='ls -al |more'
- alias sch='cat /sys/block/sda/queue/scheduler'
- alias rm='rm -i'
- alias startservice='sudo systemctl start'
- alias stopservice='sudo systemctl stop'
- alias restartservice='sudo systemctl restart'
- alias reloadservice='sudo systemctl --daemon-reload'
- alias enableservice='sudo systemctl enable'
- alias disableservice='sudo systemctl disable'
- alias installpkg='sudo pacman -S'
- alias removepkg='sudo pacman -Rscnd'
- alias syncpkg='sudo pacman -Sy'
- alias uppkg='sudo pacman -Su'
- #alias bp='sudo chmod a+rw /sys/class/backlight/intel_backlight/brightness'
- alias pubkey='sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys'
- alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
- alias clean='find ./Musik -type d -empty -delete'
- alias wget='wget --proxy-user bolu13ip45 --proxy-password abc'
- alias curl='curl -x http://10.3.3.126:6666/ -U bolu13ip45:abc'
- alias ttytter='ttytter -ansi -notifytype=libnotify -notifies=dm,reply'
- alias grep='grep --color=auto'
- alias cleanconfig='sudo dpkg --purge $(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)'
- #------------------------------------------////
- # Functions and Scripts:
- #------------------------------------------////
- localnet ()
- {
- /sbin/ifconfig | awk /'inet addr/ {print $2}'
- echo ""
- /sbin/ifconfig | awk /'Bcast/ {print $3}'
- echo ""
- }
- upinfo ()
- {
- echo -ne "$fg[white]uptime is $fg[yellow] \t\t ";uptime | awk /'up/ {print $3,$4,$5,$6,$7,$8,$9,$10}'
- }
- cd()
- {
- if [ -n "$1" ]; then
- builtin cd "$@" && ls
- else
- builtin cd ~ && ls
- fi
- }
- extract()
- {
- if [ -f "$1" ] ; then
- case "$1" in
- *.tar.bz2) tar xjf "$1" ;;
- *.tar.gz) tar xzf "$1" ;;
- *.tar.Z) tar xzf "$1" ;;
- *.bz2) bunzip2 "$1" ;;
- *.rar) unrar x "$1" ;;
- *.gz) gunzip "$1" ;;
- *.jar) unzip "$1" ;;
- *.tar) tar xf "$1" ;;
- *.tbz2) tar xjf "$1" ;;
- *.tgz) tar xzf "$1" ;;
- *.zip) unzip "$1" ;;
- *.Z) uncompress "$1" ;;
- *) echo "'$1' cannot be extracted." ;;
- esac
- else
- echo "'$1' is not a file."
- fi
- }
- setopt AUTO_LIST
- setopt AUTO_MENU
- setopt MENU_COMPLETE
- #export LC_ALL=id_ID.UTF-8
- #export LANG=id_ID.UTF-8
- #export http_proxy="http://bolu13ip45:abc@10.3.3.126:6666/"
- #export https_proxy=$http_proxy
- #export ftp_proxy=$http_proxy
- #export rsync_proxy=$http_proxy
- export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
- autoload -U compinit
- compinit
- # Completion caching
- zstyle ':completion::complete:*' use-cache on
- zstyle ':completion::complete:*' cache-path .zcache
- zstyle ':completion:*:cd:*' ignore-parents parent pwd
- #Completion Options
- zstyle ':completion:*:match:*' original only
- zstyle ':completion::prefix-1:*' completer _complete
- zstyle ':completion:predict:*' completer _complete
- zstyle ':completion:incremental:*' completer _complete _correct
- zstyle ':completion:*' completer _complete _prefix _correct _prefix _match _approximate
- # Path Expansion
- zstyle ':completion:*' expand 'yes'
- zstyle ':completion:*' squeeze-shlashes 'yes'
- zstyle ':completion::complete:*' '\\'
- zstyle ':completion:*:*:*:default' menu yes select
- zstyle ':completion:*:*:default' force-list always
- # GNU Colors ??/etc/DIR_COLORS?? ?????????????????????
- [ -f /etc/DIR_COLORS ] && eval $(dircolors -b /etc/DIR_COLORS)
- export ZLSCOLORS="${LS_COLORS}"
- zmodload zsh/complist
- zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
- zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
- zstyle ':completion:*' completer _complete _match _approximate
- zstyle ':completion:*:match:*' original only
- zstyle ':completion:*:approximate:*' max-errors 1 numeric
- compdef pkill=kill
- compdef pkill=killall
- zstyle ':completion:*:*:kill:*' menu yes select
- zstyle ':completion:*:processes' command 'ps -au$USER'
- # Group matches and Describe
- zstyle ':completion:*:matches' group 'yes'
- zstyle ':completion:*:options' description 'yes'
- zstyle ':completion:*:options' auto-description '%d'
- zstyle ':completion:*:descriptions' format $'\e[01;33m -- %d --\e[0m'
- zstyle ':completion:*:messages' format $'\e[01;35m -- %d --\e[0m'
- zstyle ':completion:*:warnings' format $'\e[01;31m -- No Matches Found --\e[0m'
- #print -Pc '%B`figlet "Debian 7.1"%b`'
- #echo -e "$bold_color $fg[yellow]";figlet "Debian 7.1";
- #echo -n "$fg[white]Today is:\t\t$fg[yellow]" `date`; echo ""
- #echo -e "$fg[white]Kernel Information: \t$fg[yellow]" `uname -smr`
- #echo -ne "$fg[white]";upinfo;echo " "
- #echo -e "$fg[white]"; cal -3
- # End of lines added by compinstall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement