Useful Aliases and Functions

alias cpuWatch="watch \"grep 'cpu MHz' /proc/cpuinfo\""
alias cdw="cd ~/projects"
alias disableMouseWhileTyping='gsettings set org.gnome.desktop.peripherals.touchpad "disable-while-typing" true'
alias enableMouseWhileTyping='gsettings set org.gnome.desktop.peripherals.touchpad "disable-while-typing" false'


function gpgSsh(){
  export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
  gpgconf --launch gpg-agent
}

function ramUsageWatch(){
  lines=$1
  if [ -z "lines" ]; then
    lines=10
  fi
  watch "ps aux  | awk '{print \$6/1024 \" MB\t\t\" \$11}' | sort -n | tail -$lines"
}

function runInBackground(){
  nohup $1 >& /dev/null &
}