# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 setopt appendhistory autocd extendedglob notify bindkey -e # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/home/jas/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall ## FILE MGMT ALIASES ## alias la="ls -a" # show hidden files alias ls="ls --color=auto" # colors for filetype alias ll="ls -l --group-directories-first" # group dirs first alias lx="ls -lxB" # sort by extension alias lk="ls -lSr" # sort by size, biggest last alias lc="ls -ltcr" # sort by change time, most re$ alias lu="ls -ltur" # sort by and show access time$ alias lt="ls -ltr" # sort by date, most recent la$ alias lm="ls -al | more" # pipe through more alias lR="ls -lR" # recursive ls alias lsr="tree -Csu" # alt. recursive ls ## APP ALIASES ## alias im="finch" alias irc="weechat-curses" alias rss="newsbeuter" alias exit="clear; exit" alias ugrub="sudo update-grub" alias pal3="pal -r 3" alias pal5="pal -r 5" alias pal7="pal -r 7" alias conkyconf="nano -w /home/jas/.conkyrc" ## SYSTEM ALIASES ## alias reboot="sudo reboot" alias shutdown="sudo shutdown -h now" alias clamroot="sudo clamscan -r -l /home/jas/admin/clamscan.log /" alias clamhome="sudo clamscan -r -l /home/jas/admin/clamhome.log /home/jas" ## NETWORKING ALIASES ## alias pong="ping -c 3 www.google.com" alias ifup="sudo ifconfig wlan0 up" alias associate="sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf" alias connect="sudo dhcpcd wlan0" ## GENTOO-SPECIFIC ALIASES ## alias esync="sudo emerge --sync" # Sync with remote rep$ alias esearch="sudo emerge --search" # Search repos alias einfo="sudo emerge --info" # Pkg info alias eclean="sudo emerge --clean" # Cleans system alias edepclean="sudo emerge --depclean" alias unmerge="sudo emerge --unmerge" # Removes installed pkg alias listsets="sudo emerge --list-sets" # Lists all pkg sets alias eprune="sudo emerge --prune" # Removes all but high$ alias eregen="sudo emerge --regen" # Updates dependency c$ alias eresume="sudo emerge --resume" # Resumes prior emerge$ alias esearchdesc="sudo emerge --searchdesc" # Search pkg descripti$ alias newsall="sudo eselect news read all" alias newslist="sudo eselect news list" alias newspurge="sudo eselect news purge" ## DICTIONARY FUNCTIONS ## dwordnet () { curl dict://dict.org/d:${1}:wn; } dacron () { curl dict://dict.org/d:${1}:vera; } djargon () { curl dict://dict.org/d:${1}:jargon; } dfoldoc () { curl dict://dict.org/d:${1}:foldoc; } dthesaurus () { curl dict://dict.org/d:${1}:moby-thes; } ## WIKIPEDIA SEARCH FUNCTION ## wikipediaSearch() { echo -n -e "\n============================================\n\tWelcome to WikiPedia Search"; echo ""; i=1 ; for line in $(lynx --dump "http://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=$1&fulltext=Search" | grep http://en.wikipedia.org/wiki | cut -c7-); do echo $i $line; lines[$i]=$line ; i=$(($i+1)); done ; echo -n -e "\n============================================\n\tPlease select the link to open - "; read answer; w3m ${lines[$answer]} } ## SEP SEARCH FUNCTION ## sepSearch() { echo -n -e "\n============================================\n\tWelcome to WikiPedia Search"; echo ""; i=1 ; for line in $(lynx --dump "http://plato.stanford.edu/search/searcher.py?query=$1" | grep http://plato.stanford.edu | cut -c7-); do echo $i $line; lines[$i]=$line ; i=$(($i+1)); done ; echo -n -e "\n============================================\n\tPlease select the link to open - "; read answer; w3m ${lines[$answer]} } ## EXTRACT FUNCTION ## extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) rar 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 "don't know how to extract '$1'..." ;; esac else echo "'$1' is not a valid file!" fi } ## ENABLE PRECONFIGURED PROMPTS ## #autoload -U promptinit #promptinit # prompt adam2 ## ENABLE COLORS ## autoload colors zsh/terminfo if [[ "$terminfo[colors]" -ge 8 ]]; then colors fi ## PROMPT ## PROMPT="%{${fg[cyan]}%}[%{${fg[magenta]}%}%n%{${fg[cyan]}%}] %{${fg[yellow]}%}%~ %{${fg[cyan]}%}%#%{${fg[default]}%} " RPROMPT="%{${fg[cyan]}%}[%{${fg[default]}%}%*%{${fg[cyan]}%}] %{${fg[default]}%} "