view .zshalias @ 439:9a55a538e43b

Updated aliases
author unexist
date Mon, 21 Jan 2013 19:16:28 +0100
parents 18c8621907b3
children de36a213b89f
line wrap: on
line source
#
# @file Zsh alias file
#
# @copyright (c) 2006-2012, Christoph Kappel <unexist@dorfelite.net>
# @version $Id: .zshalias,v 439 1358792188.0-3600 unexist $
#

# ls
alias ls='ls --color -phFX --group-directories-first'
alias la='ls -a'
alias ll='ls -l'
alias l='ls -l'

# Miscellaneous
alias q='clear && logout'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias grep='grep -nI --color'

# Security
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Bookmarks
alias ssh_debian="ssh -X unexist@80.244.246.114 -p 10152"

# Sudo
if [ -e /usr/bin/sudo ] ; then
  alias halt="sudo /sbin/halt"
  alias reboot="sudo /sbin/reboot"
  alias ntpd="sudo ntpdate -b pool.ntp.org"
  alias ncfg="sudo netcfg-menu"
  alias killjobs="sudo lprm -"
  alias s="sudo"

  # Based on dist
  if [ -e /usr/bin/pacman ] ; then
    alias p="packer --noedit"
    alias S="sudo pacman -S"
    alias R="sudo pacman -R"
  elif [ -e /usr/bin/apt-get ] ; then
    alias p="sudo apt-get"
    alias S="sudo apt-get install"
    alias R="sudo apt-get remove"
  fi
fi

# Valgrind
if [ -e /usr/bin/valgrind ] ; then
  alias memcheck="valgrind --tool=memcheck --leak-check=full --suppressions=$HOME/.suppressions"
  alias addrcheck="valgrind --tool=addrcheck --leak-check=full --suppressions=$HOME/.suppressions"
fi

# Calc
if [ -e /usr/bin/calc ] ; then
  alias calc='noglob calc'
fi

# Mercurial
if [ -e /usr/bin/hg ] ; then
  alias hgs="hg status|grep -v '^?'"
fi

# Subversion
if [ -e /usr/bin/svn ] ; then
  alias svns="svn status|grep -v '^?'"
fi

# Mpd
if [ -e /usr/bin/mpc ] ; then
  alias mpc="nocorrect mpc"
fi

# Firefox
if [ -e /usr/bin/firefox ] ; then
  alias ff="firefox -no-remote -ProfileManager &>/dev/null &!"
fi

# Chrome/chromium
if [ -e /usr/bin/chrome ] ; then
  alias chrome="chrome &>/dev/null &!"
elif [ -e /usr/bin/chromium ] ; then
  alias chrome="chromium &>/dev/null &!"
elif [ -e /usr/bin/google-chrome ] ; then
  alias chrome="google-chrome &>/dev/null &!"
elif [ -e /usr/bin/chromium-browser ] ; then
  alias chrome="chromium-browser &>/dev/null &!"
fi

# Xephyr
if [ -e /usr/bin/Xephyr ] ; then
  XEPHYR_OPTS="-ac -noreset -nodri +extension RANDR +xinerama"
    #-keybd ephyr,,,xkbmodel=evdev,xkblayout=de"
  alias xeph1024="Xephyr $XEPHYR_OPTS -name xeph1024 -screen 1024x600 :2 &>/dev/null &!"
  alias xeph800="Xephyr $XEPHYR_OPTS -name xeph800 -screen 800x800 :2 &!"
  alias xeph640="Xephyr $XEPHYR_OPTS -name xeph640 -screen 640x480 :2 &!"
fi

# GVim
if [ -e /usr/bin/gvim ] ; then
  alias gvim="gvim &>/dev/null &!"
fi

# Keychain
if [ -f /usr/bin/keychain ] ; then
  alias kc="keychain -q --nocolor id_rsa && source $HOME/.keychain/$HOST-sh"
fi

# Uzbl
if [ -f /usr/bin/uzbl ] ; then
  alias uzbl="uzbl &>/dev/null &!"
fi

# Mplayer
if [ -f /usr/bin/mplayer ] ; then
  alias dts="mplayer -ac hwdts,hwac3, -ao alsa:device=spdif"
  alias mp="mplayer -vo x11 -nosound -zoom -fs"
fi

# xrandr
if [ -f /usr/bin/xrandr ] ; then
  alias xrtv='xrandr --output DFP1 --mode 1680x1050 --pos 0x0 --primary --output DFP4 --mode 1920x1080 --pos 1680x0 --right-of DFP1'
  alias xrnm='xrandr --output DFP1 --mode 1680x1050 --pos 0x0 --output DFP4 --mode 1680x1050 --pos 1680x0 --right-of DFP1'
fi

# subtle
if [ -f /usr/bin/subtle ] ; then
  alias sirb='ripl -r"subtle/subtlext"'
fi

if [ -f $HOME/projects/subtle-contrib/ruby/vitag.rb ] ; then
  alias vitag="ruby $HOME/projects/subtle-contrib/ruby/vitag.rb"
fi

# Ruby
if [ -d $HOME/projects/shreds ] ; then
  alias tv="ruby $HOME/projects/shreds/ruby/tv.rb"
fi

# ImageMagick
if [ -f /usr/bin/import ] ; then
  alias import="import +repage"
fi

# Rsync
if [ -f /usr/bin/rsync ]; then
  alias rcp="rsync -avh --progress"
fi