Advertisement
cirrus

Archlinux Alias | .zshrc

Apr 7th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.33 KB | None | 0 0
  1. [[ $- = *i* ]] || return
  2.  
  3. export \
  4.   BROWSER=w3m \
  5.   PATH="$HOME/.cabal/bin:$HOME/.perl5/bin:$HOME/.bin:$PATH"
  6. export MOZ_DISABLE_PANGO=1
  7.  
  8. case $TTY in
  9.   (/dev/tty1) exec xinit openbox -- vt$(fgconsole) ;;
  10.   (/dev/tty6) exec xinit xmonad  -- vt$(fgconsole) ;;
  11. esac
  12.  
  13. fpath=($HOME/etc/zsh/functions $fpath)
  14. #autoload -U compinit promptinit
  15. autoload -U promptinit &&
  16. #compinit; promptinit; prompt tiny
  17. setopt -06DEJNORTghkw
  18. /usr/bin/alsi -l
  19. command cowsay -f tux $(fortune all)
  20. [[ $HOST = "Arch" ]] && dHost=devel || dHost=Arch
  21. [[ $UID -eq 0 ]] && TMOUT=180
  22. PROMPT=$'%{\e[0;31m%}[%{\e[1;32m%}%*%{\e[0;31m%}][%{\e[0;32m%}%n@%m%{\e[0;31m%}]%{\e[1;31m%}%#%{\e[0m%} '
  23. RPROMPT=$'%{\e[0;31m%}[%{\e[1;32m%}%~%{\e[0;33m%}]%{\e[0m%}'
  24.  
  25. alias \
  26.   cp='cp -av' \
  27.   df='df -Th --total' \
  28.   g='git' \
  29.   gcm='git commit -m' \
  30.   gco='git checkout' \
  31.   gd='git diff' \
  32.   gdh='git diff HEAD' \
  33.   gg='git pull' \
  34.   gp='git push' \
  35.   gst='git status --short --untracked-files' \
  36.   la='ls -l' \
  37.   ls='ls -AFNh --tabsize=0 --color=auto --show-control-chars --group-directories-first' \
  38.   sd="ssh $dHost" sn='ssh root@n900' \
  39.   svim='sudo vim' \
  40.   ta='tmux attach' \
  41.   tl='tmux ls'
  42.        
  43.  
  44. export \
  45.   ABSROOT="$HOME/build/abs" \
  46.   BROWSER="${${DISPLAY+firefox}:-w3m}" \
  47.   EDITOR="nano" \
  48.   EDITOR=nano \
  49.   GREP_COLOR="4;1;31" \
  50.   GREP_OPTIONS="--color=auto" \
  51.   HISTFILE=$HOME/.logs/zhistory \
  52.   HISTSIZE=10000 SAVEHIST=10000 \
  53.   LESS_TERMCAP_mb=$'\e[01;31m' \
  54.   LESS_TERMCAP_md=$'\e[01;31m' \
  55.   LESS_TERMCAP_me=$'\e[0m' \
  56.   LESS_TERMCAP_se=$'\e[0m' \
  57.   LESS_TERMCAP_so=$'\e[01;36m' \
  58.   LESS_TERMCAP_ue=$'\e[0m' \
  59.   LESS_TERMCAP_us=$'\e[00;34m' \
  60.   PAGER="less" \
  61.   PERL5LIB="$HOME/.perl5/lib/perl5/x86_64-linux-thread-multi:$HOME/.perl5/lib/perl5:$PERL5LIB" \
  62.   PERL_LOCAL_LIB_ROOT="$HOME/.perl5" \
  63.   PERL_MB_OPT="--install_base $HOME/.perl5" \
  64.   PERL_MM_OPT="INSTALL_BASE=$HOME/.perl5" \
  65.   SUDO_PROMPT="Password: " \
  66.   VISUAL="vim"
  67.  
  68. hash -d dotfiles=$HOME/etc
  69.  
  70. source <(dircolors ~dotfiles/zsh/dircolors)
  71. for s (~dotfiles/zsh/*.zsh(N)) source $s
  72.  
  73. man() {
  74.     env \
  75.         LESS_TERMCAP_mb=$(printf "\e[1;31m") \
  76.         LESS_TERMCAP_md=$(printf "\e[1;31m") \
  77.         LESS_TERMCAP_me=$(printf "\e[0m") \
  78.         LESS_TERMCAP_se=$(printf "\e[0m") \
  79.         LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
  80.         LESS_TERMCAP_ue=$(printf "\e[0m") \
  81.         LESS_TERMCAP_us=$(printf "\e[1;32m") \
  82.         man "$@"
  83. }
  84. # alias
  85. alias pacsyy="sudo pacman -Syy"  #update mirrors
  86. alias pacsu="sudo pacman -Su"    #upgrade all packages
  87. alias pacinfo="sudo pacman -Si"     #show information about a package
  88. alias pacq="pacman -Q"              # query
  89. alias pacs="sudo pacman -S"         #install package/s
  90. alias paclist="sudo pacman -Ql"     #list all files installed by package
  91. alias paclistall="pacman -Qqm"        #list all packages locally installed
  92. alias pacr="sudo pacman -R"          #uninstall one or more package/s
  93. alias pacrns="sudo pacman -Rns"     #uninstall package and deps
  94. alias pacorph="sudo pacman -Qdt"    #list all packages which are orphaned
  95. alias pacown="pacman -Qo"           #determine which package owns a given file
  96. alias pacsearch="sudo pacman -Ss"     #search for a package (not AUR)
  97. alias pacachec="pacman -Sc"         #delete all package files from cache
  98. alias ysearch="yaourt -Ss"          #search for a package AUR
  99. alias pacmanlog='less /var/log/pacman.log'  #view pacman log
  100. alias errorlog='less /var/log/errors.log'   #view error log
  101. alias size='sudo du -hsx * | sort -rh | head -10'  #list 10 dir/files by size
  102. alias sizeall='sudo du -a /var | sort -n -r | head -n 10' #list 10 dir by size
  103. alias uuid="ls /dev/disk/by-uuid/ -alh"
  104. alias du="du -h"
  105. alias cdd="cd .."
  106. alias toprun="ps axo %cpu,%mem,comm |sort -unr| head -n 9"
  107. alias hist="history 24"
  108. alias psusage="ps aux  --sort=-%cpu | grep -m 11 -v `whoami`"
  109. alias lbig="ls -lSrh"
  110.  
  111. alias yinstall="yaourt -S"          #yaourt install package
  112. alias reboot="systemctl reboot"       #reboot
  113. alias poweroff="systemctl poweroff"  #reboot
  114. alias shutdown="systemctl poweroff"   #poweroff
  115. alias supy="supybot Neo.conf"       #execute supybot
  116. alias wee="weechat-curses"          #execute weechat
  117. alias ncm="ncmpcpp"                 #execute ncmpcpp
  118. alias news="newsbeuter"              #execute newsbeuter
  119. alias twit="pieppiep"                 #execure pieppiep
  120. alias twitr="pieppiep fetch 20"       #fetch 20 twitter posts
  121. alias unetbootin="sudo unetbootin"       #launch unetbootin
  122. alias gparted="sudo gparted"                #launch gparted
  123. alias netlisten='lsof -i -P | grep LISTEN'    #network monitor
  124. alias nstat="netstat -p TCP -eWc"             #network monitor
  125. alias pizza="sleep 10m && echo ⚠⚠⚠ pizza is done ⚠⚠⚠ "
  126. alias userlist='cat /etc/passwd |grep "/bin/bash" |grep "[5-9][0-9][0-9]" |cut -d: -f1'  #users
  127. alias age="sudo dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'"   #age
  128. alias teamvstart="sudo systemctl start teamviewerd"    #start teamviewer
  129. alias teamvstop="sudo systemctl stop teamviewerd"     #stop teamviewer
  130. alias youtube="youtube-viewer -C"                    #youtube-viewer w/ colour
  131. alias youtubedl="youtube-viewer -d"                  #youtube-viewer download -[URL]
  132. alias subs="youtube-viewer -C -S"                   #youtube-viewer w/ colour/subscriptions
  133. alias sshon="sudo systemctl start sshd.service"     #startssh
  134. alias sshoff="sudo systemctl stop sshd.service"   #stop ssh
  135. alias starwars="telnet towel.blinkenlights.nl"   #starwars ascii
  136. alias coweru="cower -u"             #Check foreign packages for updates in the AUR.
  137. alias cowers="cower -s"             #search repo
  138. alias coweri="cower -i"             #info
  139. #alias cowerd="cower -d <nameofpkg>"  #cower --download
  140. alias makepkgi="makepkg -ci"        #build,install
  141. alias makepkgsci="makepkg -sci"     #build,getdeps,clean,install
  142. alias pacmanlog='less /var/log/pacman.log'  #view pacman log
  143. alias errorlog='less /var/log/errors.log'   #view error log
  144. alias size='sudo du -hsx * | sort -rh | head -10'  #list 10 dir/files by size
  145. alias sizeall='sudo du -a /var | sort -n -r | head -n 10' #list 10 dir by size
  146. alias uuid="ls /dev/disk/by-uuid/ -alh"
  147. alias du="du -h"
  148. alias cdd="cd .."
  149. alias toprun="ps axo %cpu,%mem,comm |sort -unr| head -n 9"
  150. alias hist="history 24"
  151. alias psusage="ps aux  --sort=-%cpu | grep -m 11 -v `whoami`"
  152. alias lbig="ls -lSrh"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement