export TERM=xterm-256color
[ -n "$TMUX" ] && export TERM=screen-256color

[[ $TERM != screen* ]] && (tmux -q has-session && exec tmux attach-session || exec tmux new-session)

# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
export ZSH_THEME="cinan"

# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"

# Comment this out to disable weekly auto-update checks

# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"

# Uncomment following line if you want to disable autosetting terminal title.
# export DISABLE_AUTO_TITLE="true"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git git-flow cap gem zsh-syntax-highlighting)

source /etc/profile
source $ZSH/oh-my-zsh.sh
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

setopt extended_glob
unsetopt nomatch
unsetopt correctall

# Customize to your needs...
export LS_COLORS;
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
  default                       'none'
  unknown-token                 'fg=red,bold'
  reserved-word                 'fg=yellow'
  alias                         'fg=none,bold'
  builtin                       'fg=none,bold'
  function                      'fg=none,bold'
  command                       'fg=none,bold'
  hashed-command                'fg=none,bold'
  path                          'fg=cyan'
  globbing                      'fg=cyan'
  history-expansion             'fg=blue'
  single-hyphen-option          'fg=magenta'
  double-hyphen-option          'fg=magenta'
  back-quoted-argument          'fg=magenta,bold'
  single-quoted-argument        'fg=green'
  double-quoted-argument        'fg=green'
  dollar-double-quoted-argument 'fg=cyan'
  back-double-quoted-argument   'fg=cyan'
  assign                        'none'

bindkey "" beginning-of-line
bindkey "" end-of-line
bindkey "^[OD" backward-word
bindkey "^[OC" forward-word
bindkey "" gosmacs-transpose-chars 

alias noh="unsetopt sharehistory"

alias nogit="disable_git_prompt_info; compdef -d git"
alias cal="cal -m"
alias du="du -hs"
alias df="df -h"
alias grep="grep --colour -i"
alias vi="vim -u ~/.vimrc"
alias rtorrent="rtorrent -o http_capath=/etc/ssl/certs"
alias m="cd /media/data/"
alias toclip="xclip -selection clipboard"
alias fromclip="xclip -selection clipboard -o"
alias cpuspeed="watch grep \\\"cpu MHz\\\" /proc/cpuinfo"
alias rm="rm -v"
alias mv="mv -v"
alias cp="cp -v"
alias y="yaourt -Syu --aur"
alias n="ncmpcpp"
alias chromium="chromium --disk-cache-dir=/home/cinan/.config/chromium/Cache"

export EDITOR="vim"
#export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd'
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dawt.RenderingHint=lcd'
#--laf javax.swing.plaf.metal.MetalLookAndFeel
#--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

export HISTFILE=~/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000

export PATH=$PATH:$HOME/.rvm/bin:$HOME/system/bin