Commits

Tanel Liiv committed b1bef75

Initial adding of all files

Comments (0)

Files changed (13)

+! ----------------------------------------------------------------------------
+! file:     ~/.Xresources
+! author:  Tanel Liiv
+! modified: Februaru 2012
+! vim: set fenc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=xdefaults:
+! ----------------------------------------------------------------------------
+
+
+! xmonad
+Xft.dpi: 96
+Xft.lcdfilter: lcddefault
+Xft.antialias: true
+Xft.hinting:true
+Xft.hintstyle: hintfull
+Xft.rgba: rgb
+*customization: -color
+! / xmonad
+
+Xcursor.theme: Vanilla-DMZ-AA
+Xcursor.size: 22
+
+*font            : -*-gohufont-medium-*-*-*-*-*-*-*-*-*-*-*
+*boldFont        : -*-gohufont-bold-*-*-*-*-*-*-*-*-*-*-*
+*title           : terminal
+*buffered        : true
+*geometry        : 200x45
+*transparent     : false
+*scrollBar       : false
+*secondaryScroll : true
+*pointerBlank    : true
+*urgentOnBell    : true
+*modifier        : alt
+*shading         : 5
+*saveLines       : 10000
+*cursorBlink     : True
+*dynamicColors   : on
+*jumpScroll      : true
+
+*perl-ext-common : default,matcher
+*urlLauncher     : chromium
+*matcher.button  : 1
+
+*cursorColor     : #80724e
+*cursorColor2    : #ffffff
+*colorUL         : khaki
+
+
+! jellybeans colors
+! 8 8 8
+*background: #080808
+! 128 128 128
+*foreground: #808080
+! black
+! 26 26 26
+*color0:  #1a1a1a
+! 64 64 64
+*color8:  #404040
+! red
+! 215 95 95
+*color1:  #d75f5f
+! 234 132 132
+*color9:  #EA8484
+! green
+! 135 175 95
+*color2:  #87af5f
+! 199 240 159
+*color10: #C7F09F
+! yellow
+! 255 175 95
+*color3:  #ffaf5f
+! 255 204 154
+*color11: #FFCC9A
+! blue
+! 135 175 215
+*color4:  #87afd7
+! 165 202 239
+*color12: #a5caef
+! magenta
+! 135 135 175
+*color5:  #8787af
+! 166 166 222
+*color13: #A6A6DE
+! cyan
+! 95 135 135
+*color6:  #5f8787
+! 105 178 178
+*color14: #69b2b2
+! white
+! 128 128 128
+*color7:  #808080
+! 215 215 215
+*color15: #d7d7d7
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
+# ... or force ignoredups and ignorespace
+export HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+PROMPT_COMMAND='history -a'
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=4000
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+# set a fancy prompt (non-color, unless we know we "want" color)
+case "$TERM" in
+    xterm-color) color_prompt=yes;;
+esac
+
+# uncomment for a colored prompt, if the terminal has the capability; turned
+# off by default to not distract the user: the focus in a terminal window
+# should be on the output of commands, not on the prompt
+#force_color_prompt=yes
+
+if [ -n "$force_color_prompt" ]; then
+    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
+	# We have color support; assume it's compliant with Ecma-48
+	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
+	# a case would tend to support setf rather than setaf.)
+	color_prompt=yes
+    else
+	color_prompt=
+    fi
+fi
+
+unset color_prompt force_color_prompt
+
+# If this is an xterm set the title to user@host:dir
+#case "$TERM" in
+#xterm*|rxvt*)
+#    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
+#    ;;
+#*)
+#    ;;
+#esac
+
+if [ "$TERM" = "linux" ]
+then
+	#we're on the system console or maybe telnetting in
+	export PS1="\[\e[36;1m\]\u@\H(\w) ->> \[\e[0m\]"
+else
+	#we're not on the console, assume an xterm
+	#export PS1="\[\e]2;\u@\h \a\e[36;1m\].-(\w)\n'--> \[\e[0m\]"
+	PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
+	PS1="\n╔═[\[\033[01;36m\]\A\[\033[01;00m\]]═[\[\033[01;32m\]\u\[\033[01;33m\]@\[\033[01;31m\]\h\[\033[01;00m\]]\n\[\033[01;00m\]╚═══\[\033[00;32m\]=\[\033[00;33m\]=\[\033[00;31m\]=\[\033[01;00m\]═══[\[\033[01;36m\]\$CurDir\[\033[01;00m\]]\[\033[01;32m\]>>\[\033[00m\] "
+fi
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+if [ -f ~/.aliases ]; then
+    . ~/.aliases
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+    . /etc/bash_completion
+fi
+export TERM="screen"
+shopt -s cdspell
+export HISTTIMEFORMAT="%F %T "
+PATH=$PATH:/usr/local/bin
+if [ "$TERM" = "linux" ]; then
+    echo -en "\e]P0222222" #black
+    echo -en "\e]P8222222" #darkgrey
+    echo -en "\e]P1803232" #darkred
+    echo -en "\e]P9982b2b" #red
+    echo -en "\e]P25b762f" #darkgreen
+    echo -en "\e]PA89b83f" #green
+    echo -en "\e]P3aa9943" #brown
+    echo -en "\e]PBefef60" #yellow
+    echo -en "\e]P4324c80" #darkblue
+    echo -en "\e]PC2b4f98" #blue
+    echo -en "\e]P5706c9a" #darkmagenta
+    echo -en "\e]PD826ab1" #magenta
+    echo -en "\e]P692b19e" #darkcyan
+    echo -en "\e]PEa1cdcd" #cyan
+    echo -en "\e]P7ffffff" #lightgrey
+    echo -en "\e]PFdedede" #white
+    clear #for background artifacting
+fi
+
+extract () {
+    if [ -f $1 ]; then
+            case $1 in
+            *.tar.bz2)  tar -jxvf $1        ;;
+            *.tar.gz)   tar -zxvf $1        ;;
+            *.bz2)      bzip2 -d $1         ;;
+            *.gz)       gunzip -d $1        ;;
+            *.tar)      tar -xvf $1         ;;
+            *.tgz)      tar -zxvf $1        ;;
+            *.zip)      unzip $1            ;;
+            *.Z)        uncompress $1       ;;
+            *.rar)      unrar x $1            ;;
+            *)          echo "'$1' Error. Please go away" ;;
+            esac
+            else
+            echo "'$1' is not a valid file"
+  fi
+  }
+
+[Midnight-Commander]
+show_backups=0
+show_dot_files=0
+verbose=1
+mark_moves_down=1
+pause_after_run=0
+shell_patterns=1
+auto_save_setup=0
+auto_menu=0
+use_internal_view=1
+use_internal_edit=0
+clear_before_exec=1
+mix_all_files=0
+fast_reload=0
+fast_reload_msg_shown=1
+confirm_delete=1
+confirm_overwrite=1
+confirm_execute=1
+confirm_exit=0
+safe_delete=0
+mouse_repeat_rate=100
+double_click_speed=250
+use_8th_bit_as_meta=0
+confirm_view_dir=0
+mouse_move_pages=1
+mouse_move_pages_viewer=1
+fast_refresh=0
+navigate_with_arrows=1
+drop_menus=1
+wrap_mode=1
+old_esc_mode=1
+cd_symlinks=1
+show_all_if_ambiguous=1
+have_fast_cpu=1
+max_dirt_limit=10
+torben_fj_mode=1
+use_file_to_guess_type=1
+alternate_plus_minus=0
+only_leading_plus_minus=1
+show_output_starts_shell=0
+panel_scroll_pages=1
+xtree_mode=0
+num_history_items_recorded=60
+file_op_compute_totals=1
+vfs_timeout=180
+ftpfs_directory_timeout=900
+use_netrc=1
+ftpfs_retry_seconds=30
+ftpfs_always_use_proxy=0
+ftpfs_use_passive_connections=1
+ftpfs_use_unix_list_options=1
+ftpfs_first_cd_then_ls=0
+editor_word_wrap_line_length=72
+editor_key_emulation=0
+editor_tab_spacing=8
+editor_fill_tabs_with_spaces=0
+editor_return_does_auto_indent=1
+editor_backspace_through_tabs=0
+editor_fake_half_tabs=1
+editor_option_save_mode=0
+editor_option_save_position=1
+editor_option_backup_ext_int=-1
+editor_option_auto_para_formatting=0
+editor_option_typewriter_wrap=0
+editor_edit_confirm_save=1
+editor_syntax_highlighting=1
+nice_rotating_dash=0
+horizontal_split=0
+
+kilobyte_si=0
+confirm_directory_hotlist_delete=1
+mouse_close_dialog=0
+ftpfs_use_passive_connections_over_proxy=0
+fish_directory_timeout=900
+editor_persistent_selections=1
+editor_cursor_beyond_eol=0
+editor_visible_tabs=1
+editor_visible_spaces=1
+editor_line_state=0
+editor_simple_statusbar=0
+editor_check_new_line=0
+mcview_remember_file_position=0
+auto_fill_mkdir_name=0
+reverse_files_only=1
+copymove_persistent_attr=1
+select_flags=6
+editor_backup_extension=~
+skin=vik
+keymap=mc.keymap
+auto_save_setup_panels=0
+
+confirm_history_cleanup=1
+editor_show_right_margin=0
+mcview_eof=
+
+quick_search_case_sensitive=2
+
+old_esc_mode_timeout=1000000
+classic_progressbar=1
+scroll_pages=1
+filetype_mode=1
+permission_mode=0
+ignore_ftp_chattr_errors=true
+
+[Layout]
+equal_split=1
+first_panel_size=47
+message_visible=0
+keybar_visible=1
+xterm_title=0
+output_lines=0
+command_prompt=0
+menubar_visible=0
+show_mini_info=1
+permission_mode=1
+filetype_mode=1
+
+free_space=1
+
+[Misc]
+ftpfs_password=anonymous@
+ftp_proxy_host=gate
+display_codepage=UTF-8
+
+find_ignore_dirs=
+source_codepage=UTF-8
+
+timeformat_recent=%b %e %H:%M
+timeformat_old=%b %e  %Y
+autodetect_codeset=
+
+clipboard_store=
+clipboard_paste=
+
+[Colors]
+base_color=
+screen=
+color_terminals=
+
+rxvt-256color=
+
+screen-256color=
+
+[HotlistConfig]
+expanded_view_of_groups=0
+
+[Panelize]
+Find *.orig after patching=find . -name \\*.orig -print
+Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print
+Find rejects after patching=find . -name \\*.rej -print

.config/mc/panels.ini

+
+#
+# tmux.conf
+#
+
+set -g prefix ^a
+
+unbind %
+bind | split-window -h
+bind - split-window -v
+
+# THEME
+
+set -g pane-active-border-bg default
+set -g pane-active-border-fg blue
+set -g pane-border-bg default
+set -g pane-border-fg default
+
+#set -g status-bg black
+set -g status-fg white
+
+setw -g window-status-format " #F#I:#W#F "
+setw -g window-status-current-format " #F#I:#W#F "
+
+setw -g window-status-current-bg magenta
+setw -g window-status-current-fg black
+
+setw -g window-status-bg default
+setw -g window-status-fg black
+
+setw -g clock-mode-style 24
+
+set -g status-interval 5
+set -g status-right-length 59
+set -g status-left-length 30
+
+set -g status-right "#[bg=green]#[fg=black] #(cat /proc/loadavg | awk '{print $1,$2,$3}') #[default] #[bg=cyan]#[fg=black](#(acpi -t | awk {'print $4'})C)#[default] #[bg=yellow]#[fg=black] #(whoami)@#H #[default] #[bg=red]#[fg=black] %H:%M #[default]"
+set -g status-left ''
+
+#URXVT 256 Colors
+set -g default-terminal "screen-256color"
+" THE NEXT 3 LINES MUST BE FIRST
+filetype off
+"call pathogen#runtime_append_all_bundles()
+filetype plugin indent on
+syntax on
+
+kala
+set rtp+=~/.vim/bundle/vundle/
+call vundle#rc()
+
+" Vundle plugins {{{
+" REQUIRED: let Vundle manage Vundle
+Bundle 'gmarik/vundle'
+" ,f and ,b file and buffer finder
+Bundle 'FuzzyFinder'
+" #xxxxxx and #xxx get highlighted ,tc
+Bundle 'colorizer'
+" Readwrite files over web
+Bundle 'netrw.vim'
+" Some kind of 'epic' completion
+Bundle 'neocomplcache'
+" Visualized undo tree F12
+Bundle 'Gundo'
+" Script library used by some other modules
+Bundle 'L9'
+" Nice filesystem explorer. ,lf ,lb ,lg ,lr
+Bundle 'LustyExplorer'
+" Allows to ack current dir. Ack
+Bundle 'ack.vim'
+" Python PEP8 checker F5, Syntastic replaced this
+"Bundle 'pep8'
+" Good file explorer F11
+Bundle 'The-NERD-tree'
+" TaskList for finding NOTE, FIXME, etc
+Bundle 'TaskList.vim'
+" Python support
+Bundle 'python.vim'
+" Matches html tags with %
+Bundle 'MatchTag'
+" On the fly checking for python errors
+Bundle 'pyflakes.vim'
+" Epic looking statusbar
+Bundle 'Lokaltog/vim-powerline.git'
+" QuickTask - task syntax tool
+Bundle 'aaronbieber/quicktask.git'
+" Better tagbar w/ F10
+Bundle 'majutsushi/tagbar.git'
+" Zoom windows with <c-w>+o
+Bundle 'vim-scripts/ZoomWin.git'
+" Syntastic epic syntax checker on save(?)
+Bundle 'scrooloose/syntastic.git'
+
+" Colorscheme
+Bundle 'xterm16.vim'
+" Colorscheme
+Bundle 'vibrantink'
+" Colorscheme
+Bundle 'desert256.vim'
+" Colorscheme
+Bundle '256-grayvim'
+" Colorscheme
+Bundle 'BusyBee'
+" Badwolf colorscheme
+Bundle 'sjl/badwolf.git'
+" Hemisu colorscheme
+Bundle 'noahfrederick/Hemisu.git'
+" Some kind of epic colorscheme
+Bundle 'altercation/vim-colors-solarized.git'
+" PySMELL completer
+Bundle 'Pydiction'
+
+" }}}
+
+"
+" ~/.vimrc
+"
+
+" Main options {{{
+if $TERM =~ "256"
+  set list listchars=tab:\➜\ ,trail:·,nbsp:-
+  set t_Co=256
+  "colorscheme fruit
+  "colorscheme molokai
+  "colorscheme inkpot
+  "colorscheme mustang
+  colorscheme badwolf
+else
+  set t_Co=16
+  colorscheme inkpot
+endif
+
+let g:pydiction_location = "/home/tanel/Projects/GateMe/gateme/gateme/complete-dict"
+source /usr/ropevim.vim
+autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
+autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
+autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
+autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
+" Use neocomplcache.
+let g:neocomplcache_enable_at_startup = 1
+" Use smartcase.
+let g:neocomplcache_enable_smart_case = 1
+" Use camel case completion.
+let g:neocomplcache_enable_camel_case_completion = 1
+" Use underbar completion.
+let g:neocomplcache_enable_underbar_completion = 1
+" Set minimum syntax keyword length.
+let g:neocomplcache_min_syntax_length = 3
+let g:neocomplcache_auto_completion_start_length = 4
+let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
+
+" Syntastic checks syntax with flake8/pyflakes/pylint
+let g:syntastic_python_checker = 'flake8'
+" Warn when complexity over 12 in flakes, gnore longline warnings on PEP8
+let g:syntastic_python_checker_args = "--max-complexity 12 --ignore=E501"
+" Check files on open and save
+let g:syntastic_check_on_open=1
+" Save quicktask on buffer unfocus
+let g:quicktask_autosave = 1
+
+
+set directory=~/.vim/swap
+set colorcolumn=80                " Mark column 80 with red
+set nocompatible                  " Use VIM improvements over more VI-compatible mode
+set autoindent                    " Autoindent new lines
+set expandtab                     " Use spaces instead of <TAB>
+set incsearch                     " Show search matches while typing
+set ignorecase                    " Ignore case in search
+set smartcase                     " Override ignorecase if search contains Upper case characters
+set nobackup                      " No backup of file before overwrite
+set hlsearch                      " highlight search matches
+set nowrap                        " Don't wrap lines
+set number                        " Linenumbers???
+set confirm                       " Confirm some actions
+set ruler                         " Show cursor coordinates in bottom right
+set showmode                      " Show current mode
+set showcmd                       " Show command characters
+set smartindent                   " Inserts newlines in C-like languages
+set smarttab                      " Inserts some amount of tabs
+set linebreak                     " Smart linebreaking, but we have 'nowrap', so it doesn't do anything
+set title                         " Set window title
+set vb t_vb=                      " Turn off all visualbells (and consequencely beeps)
+set shiftwidth=2                  " Number of spaces used for each step of *autoindent*
+set showtabline=1                 " Something about showing TAB pages... :S ???
+set laststatus=2                  " Last window has status line *always*
+set shortmess=a                   " Uses short status messages, etc. [Modified] -> [+]
+set history=50                    " History of Cmd mode commands
+set updatetime=5000               " If nothing is typed for <x> milliseconds, write to swap file.
+set mouse=nvcr                    " Enable mouse in Normal, Visual, Command, Prompts
+set clipboard=unnamed             " Enable using system clipboard
+"set foldmethod=indent             " *Syntax highlighting* items specify folds.  *indent* could be useful for Python
+set formatoptions=tcroqn1         " Some autowrapping, insert auto current_comment_leader on 'O' or 'o', more mumbojumbo
+set backspace=indent,eol,start    " Allow backspacing over indents, linebreaks, start of insert
+set wildmode=list:longest,full    " Mode to match strings with consequtive wildcards.
+set undodir=~/.vim/undodir        " Storing undo info
+set undofile
+set undolevels=1000               " How many undos can I do
+set undoreload=1000               " Something weird about buffers ???
+set listchars=tab:»·,trail:·      " Characters to show instead of line trailers
+set list                          " Show unprintable characters as ^ (previous command)
+set hidden                        " Some kind of hidden mode, lustyexplorer wanted it
+
+
+
+" }}}
+" Folding stuffs {{{
+if has ('folding')
+  set foldenable
+  set foldmethod=indent
+  set foldcolumn=1
+  set foldnestmax=1
+endif
+" }}}
+" Keymaps {{{
+" unmap annoying keys
+nnoremap q: <Nop>
+nnoremap q/ <Nop>
+nnoremap q? <Nop>
+
+" leader key
+:let mapleader = ","
+
+" FuzzyFinder
+map <Leader>f :FufFile<cr>
+map <Leader>b :FufBuffer<cr>
+
+" diff
+nnoremap <Leader>u :diffupdate<cr>
+nnoremap <Leader>g :diffget<cr>
+nnoremap <Leader>p :diffput<cr>
+
+" comment/uncomment a visual block
+vmap <Leader>c :call CommentLines()<CR>
+
+" macro key
+:nnoremap <F2> @q
+
+map ; :
+" code fold
+map <space> za
+
+" Tab indents code in visual mode
+vmap <Tab> >gv
+vmap <S-Tab> <gv
+
+" Write file with sudo
+cmap w!! %!sudo tee > /dev/null %
+
+" Tab controls
+map <Leader><Tab> :tabnew<CR>
+map <Leader>o     :tabnext<CR>
+map <Leader>a     :tabprevious<CR>
+
+" RopeGoto controls
+map <leader>j :RopeGotoDefinition<CR>
+map <leader>r :RopeRename<CR>
+
+" Set pastetoggle to F3
+set pastetoggle=<F3>
+
+" Open tablist
+nnoremap <F10> :TagbarToggle<CR>
+
+"Open NERDTree
+nnoremap <F11> :NERDTreeToggle<CR>
+
+"Open Gundo tree view
+nnoremap <F12> :GundoToggle<CR>
+
+" Toggle linenumber mode
+nnoremap <C-n> :call NumberToggle()<cr>
+
+" Remap window resize to Alt+hjkl
+" NOTE: These do not work :(
+" map <silent> <A-h> <C-w><
+" map <silent> <A-j> <C-W>-
+" map <silent> <A-k> <C-W>+
+" map <silent> <A-l> <C-w>>
+
+" }}}
+" Autocommands {{{
+if has('autocmd')
+  let python_highlight_all = 1
+  let python_highlight_space_errors = 1
+  let python_fold = 1
+  let lua_fold = 1
+  let lua_version = 5
+  let lua_subversion = 1
+
+  " html
+  au Filetype html,xml,xsl set spell
+
+  " Enter relativenumber on Insert exit and Vice-versa
+  autocmd InsertEnter * :set number
+  autocmd InsertLeave * :set relativenumber
+
+  " Remove trailing whitespace
+  au BufWritePre * :call setline(1, map(getline(1, "$"), 'substitute(v:val, "\\s\\+$", "","")'))
+
+  " set the title string
+  au BufEnter * let &titlestring = "vim: " . substitute(expand("%:p"), $HOME, "~", '')
+  au BufEnter * let &titleold    = substitute(getcwd(), $HOME, "~", '')
+
+  " set a better status line
+  au BufRead * call SetStatusLine()
+
+  " restore cursor position
+  au BufReadPost * call RestoreCursorPos()
+  " Opens the fold where the cursor was restored to(?)
+  au BufWinEnter * call OpenFoldOnRestore()
+
+  " file types for nonstandard/additional config files
+  au BufNewFile,BufRead *conkyrc*          set ft=conkyrc
+  au BufNewFile,BufRead *muttrc*           set ft=muttrc
+  au BufNewFile,BufRead *.rem              set ft=remind
+  au BufNewFile,BufRead $SCREEN_CONF_DIR/* set ft=screen
+  au BufNewFile,BufRead *.xcolors          set ft=xdefaults
+  au BufNewFile,BufRead *.rss              set ft=xml
+
+  " change how vim behaves when composing emails
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* set ft=mail | set textwidth=72 | set spell | set nohls
+
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* nmap  <F1>  gqap
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* nmap  <F2>  gqqj
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* nmap  <F3>  kgqj
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* map!  <F1>  <ESC>gqapi
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* map!  <F2>  <ESC>gqqji
+  au BufNewFile,BufRead ~/.mutt/temp/mutt* map!  <F3>  <ESC>kgqji
+
+  " set comment characters for common languages
+  au FileType python,sh,bash,zsh,ruby,perl     let StartComment="#"  | let EndComment=""
+  au FileType cpp,php,c,javascript             let StartComment="//" | let EndComment=""
+
+  au FileType html    let StartComment="<!--" | let EndComment="-->"
+  au FileType haskell let StartComment="--"   | let EndComment=""
+  au FileType lua     let StartComment="--"   | let EndComment=""
+  au FileType vim     let StartComment="\""   | let EndComment=""
+
+  au FileType xdefaults    let StartComment="!"  | let EndComment=""
+
+  " file type specific commands
+  au FileType c      set formatoptions+=ro
+  au FileType make   set noexpandtab shiftwidth=8
+  au FileType python set expandtab shiftwidth=4 tabstop=4
+  au FileType c      syn match matchName /\(#define\)\@<= .*/
+  au FileType cpp    syn match matchName /\(#define\)\@<= .*/
+  au FileType text   setlocal textwidth=72
+  au FileType vim    set foldmethod=marker  " Fold .vimrc on markers
+endif
+ " }}}
+" Functions {{{
+
+function! SetStatusLine()
+    let l:s1="%-3.3n\\ %f\\ %h%m%r%w"
+    let l:s2="[%{strlen(&filetype)?&filetype:'?'},\\ %{&encoding},\\ %{&fileformat}]"
+    let l:s3="%=\\ 0x%-8B\\ \\ %-14.(%l,%c%V%)\\ %<%P"
+    execute "set statusline=" . l:s1 . l:s2 . l:s3
+endfunction
+
+function! RestoreCursorPos()
+  if expand("<afile>:p:h") !=? $TEMP
+    if line("'\"") > 1 && line("'\"") <= line("$")
+      let line_num = line("'\"")
+      let b:doopenfold = 1
+      if (foldlevel(line_num) > foldlevel(line_num - 1))
+        let line_num = line_num - 1
+        let b:doopenfold = 2
+      endif
+      execute line_num
+    endif
+  endif
+endfunction
+
+function! OpenFoldOnRestore()
+  if exists("b:doopenfold")
+    execute "normal zv"
+    if(b:doopenfold > 1)
+      execute "+".1
+    endif
+    unlet b:doopenfold
+  endif
+endfunction
+
+function CommentLines()
+  try
+    execute ":s@^".g:StartComment." @\@g"
+    execute ":s@ ".g:EndComment."$@@g"
+  catch
+    execute ":s@^@".g:StartComment." @g"
+    execute ":s@$@ ".g:EndComment."@g"
+  endtry
+endfunction
+
+function! s:DiffWithSaved()
+  let filetype=&ft
+  diffthis
+  vnew | r # | normal! 1Gdd
+  diffthis
+  exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
+endfunction
+com! DiffSaved call s:DiffWithSaved()
+
+" Makes mappings toggleable
+function MapToggle(key, opt)
+  let cmd = ':set '.a:opt.'! \| set '.a:opt."?\<CR>"
+  exec 'nnoremap '.a:key.' '.cmd
+  exec 'inoremap '.a:key." \<C-O>".cmd
+endfunction
+
+command -nargs=+ MapToggle call MapToggle(<f-args>)
+
+MapToggle <F4> foldenable
+MapToggle <F5> number
+MapToggle <F6> spell
+MapToggle <F7> paste
+MapToggle <F8> hlsearch
+MapToggle <F9> wrap
+
+" <C-n> toggles numbers
+function! NumberToggle()
+  if(&relativenumber == 1)
+    set number
+  else
+    set relativenumber
+  endif
+endfunc
+
+" }}}
+#!/bin/bash
+setxkbmap -option terminate:ctrl_alt_bksp
+setxkbmap ee
+xbindkeys
+if [ $(disper -l | grep -c "Samsung SyncMaster") == 1 ]
+    then disper -S && disper -e -d DFP-0,CRT-0
+fi
+eval `cat ${HOME}/.fehbg`
+# Starts XMONAD
+# system tray
+trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 7 --height 12 --transparent true --tint 0x000000 &
+# screensaver
+#xscreensaver -no-splash &
+# set the cursoe as pointer, otherwise X will appear as cursor
+xsetroot -cursor_name left_ptr
+# start clipboard manager without icon
+parcellite &
+# let me go ahead with pre starting some of the apps
+xset fp+ /usr/share/fonts/local
+xset fp rehash
+urxvt &
+# time to start, the master - the window manager xmonad
+xsetroot -cursor_name left_ptr
+exec ck-launch-session xmonad
+-- Config { font = "-*-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
+--
+--  , bgColor = "black"
+--  , fgColor = "grey"
+--  , position = TopW L 95
+--  , commands = [ Run Weather "EETN" ["-t"," C","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"] 36000
+--    , Run MultiCpu ["-t","CPU: % %", "-L", "40", "-H", "60", "-l", "lightblue", "-n", "white", "-h", "red"] 10
+--    , Run CpuFreq ["-t", " ", "-L", "0", "-H", "2", "-l", "lightblue", "-n","white", "-h", "red"] 50
+--    , Run Com "/home/tanel/Scripts/getcoretemp.sh" [] "coreTemp" 10
+--    --, Run CoreTemp ["-t", "C C", "-L", "40", "-H", "60", "-l", "lightblue", "-n", "white", "-h", "red"] 50
+--    , Run Memory ["-t","Mem: %"] 10
+--    , Run Swap [] 10
+--    , Run Wireless "wlan0" ["-t","wlan0: %","-L","0","-H","32","--normal","green","--high","red"] 10
+--    , Run Battery ["-t","Batt: %","-L","25","-H","75","--low","#FF0000","--normal","#F9FF00","--high","#00FF00"] 600
+--    , Run Com "/home/tanel/Scripts/getvolume.sh" [] "myVolume" 10
+--    , Run Date "%a %b %_d %I:%M %p" "date" 10
+--    , Run StdinReader
+--  ]
+--  , sepChar = "%"
+--  , alignSep = "}{"
+--  , template = "%StdinReader% }{ %multicpu% %cpufreq% %coreTemp% %memory% %swap% %wlan0wi% %battery% Vol: %myVolume% Weather: %EETN% %date%"
+-- }
+
+Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+       , bgColor = "black"
+       , fgColor = "grey"
+       , position = TopW L 93
+       , lowerOnStart = True
+       , commands = [ Run Weather "EETN" ["-t","<skyCondition> : <tempC>C","-L","5","-H","20","--normal","green","--high","red","--low","lightblue"] 3000
+                    , Run Network "eth0" ["-t","<rx>/<tx>", "-L","0","-H","32","--normal","green","--high","red"] 10
+                    , Run Network "wlan0" ["-t","<rx>/<tx>", "-L","0","-H","32","--normal","green","--high","red"] 10
+                    , Run Cpu ["-L","10","-H","50","--normal","green","--high","red", "--low", "lightblue"] 10
+                    , Run Memory ["-t","Mem: <usedratio>%"] 10
+                    --, Run Swap [] 10
+                    -- , Run Com "uname" ["-s","-r"] "" 36000
+                    , Run StdinReader
+                    , Run Date "%a %_d %H:%M:%S" "date" 10
+                    , Run Battery ["-t","Batt: <left>","-L","25","-H","75","--low","#FF0000","--normal","#F9FF00","--high","#00FF00"] 60
+                    , Run MPD ["-t", "<artist> - <title>"] 10
+                    ]
+       , sepChar = "%"
+       , alignSep = "}{"
+       , template = " %StdinReader% }{ %mpd% | %cpu% | %memory% | %battery% | %EETN% | <fc=#ee9a00>%date%</fc> | "
+       }

.xmonad/xmonad.hs

+import XMonad
+
+import XMonad.Hooks.DynamicLog
+
+import XMonad.Hooks.ManageDocks
+
+import XMonad.Util.Run(spawnPipe)
+
+import XMonad.Util.EZConfig(additionalKeys)
+
+import XMonad.Layout.NoBorders
+
+import System.IO
+
+myManageHook = composeAll
+
+  [ resource =? "vlc" --> doShift "4"
+
+    , resource =? "thg" --> doShift "3"
+
+    , resource =? "firefox" --> doShift "2"
+
+    , resource =? "urxvt" --> doShift "1"
+  ]
+
+main = do
+
+xmproc <- spawnPipe "/usr/bin/xmobar /home/tanel/.xmobarrc"
+
+xmonad $ defaultConfig
+
+  { manageHook = manageDocks <+> myManageHook <+> doFloat -- make sure to include myManageHook definition from above
+
+  <+> manageHook defaultConfig
+
+  , layoutHook = smartBorders $ avoidStruts $ layoutHook defaultConfig --avoidStruts
+
+  , borderWidth = 2
+
+  , focusedBorderColor = "#1793d0"
+
+  , normalBorderColor = "fcccf8"
+
+  , logHook = dynamicLogWithPP xmobarPP
+
+  { ppOutput = hPutStrLn xmproc
+
+  , ppTitle = xmobarColor "grey" "" . shorten 50 -- make xmobar colro gray and leave the right end free
+
+  }
+
+  , modMask = mod4Mask -- Rebind Mod to the Windows key
+
+} `additionalKeys`
+
+  [ ((mod4Mask .|. shiftMask, xK_z), spawn "i3lock -c ccffbb") --shift+win+z
+
+  , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
+
+  , ((0, xK_Print), spawn "scrot")
+
+  ]
+alias lock='i3lock -c ff4500'
+alias !='sudo'
+alias ls='ls --color=always -hv --indicator-style=file-type --group-directories-first --time-style=long-iso'
+alias ll='ls -lo'
+alias la='ls -A'
+alias grep='grep -i --color=always'
+alias fgrep='fgrep --color=always'
+alias egrep='egrep --color=always'
+alias mkdir='mkdir -p'
+alias df='df -h'
+alias du='du -sh'
+alias fm='ranger'
+alias m='ncmpcpp'
+alias cp='nocorrect cp -viru'
+alias mv='nocorrect mv -viu'
+alias rm='nocorrect rm -vr'
+alias wget='wget -c'
+alias atmux='tmux attach'
+alias rs='rsync -hhru --progress'
+alias px='chmod +x'
+alias lst='find -maxdepth 1 -type f -mtime -1 -printf "%T@-%Tk:%TM - %f\n" | sort -rn | cut -d- -f2-'
+alias ping='ping -c5'
+alias mcd='sudo mount /dev/sr0 /media/cd'
+alias ucd='sudo umount /media/cd'
+alias sprunge='curl -F "sprunge=<-" http://sprunge.us'
+alias svim='sudoedit'
+alias ss='source ~/.zshrc'
+
+#package mgmt
+alias install='sudo pacman -S'
+alias uninstall='sudo pacman -Rsn'
+alias search='yaourt -Ss'
+alias pacls='pacman -Ql'
+alias update='yaourt -Syu'
+
+# filetypes
+alias -s pdf=okular
+alias -s svg=inkview
+alias -s {mov,avi,wmv,mkv,mp4,mp3,mpg,mpeg,flac}=mplayer
+alias -s {gif,jpg,jpeg,png}=feh
+alias -s {html,htm,org,com,net,no,uk,us.se}=firefox
+autoload -U colors && colors
+
+export GREP_COLORS="38;5;230:sl=38;5;240:cs=38;5;100:mt=38;5;161:fn=38;5;197:ln=38;5;212:bn=38;5;44:se=38;5;166"
+export LS_COLORS="st=38;5;202:di=38;5;28:*.h=38;5;81:*.rb=38;5;192:*.c=38;5;110:*.diff=42;38:*.yml=38;5;208:*.PL=38;5;178:*.csv=38;5;136:tw=38;5;003:*.chm=38;5;144:*.bin=38;5;249:*.sms=38;5;33:*.pdf=38;5;203:*.cbz=38;5;140:*.cbr=38;5;140:*.nes=38;5;160:*.mpg=38;5;38:*.ts=38;5;39:*.sfv=38;5;191:*.m3u=38;5;172:*.txt=38;5;192:*.log=38;5;190:*.bash=38;5;173:*.swp=38;5;238:*.swo=38;5;109:*.theme=38;5;109:*.zsh=38;5;173:*.nfo=38;5;113:mi=38;5;124::or=38;5;160:ex=38;5;197:ln=target:pi=38;5;126:ow=38;5;208:*.pm=38;5;197:*.pl=38;5;107:*.sh=38;5;245:*.patch=40;33:*.tar=38;5;118:*.tar.gz=38;5;118:*.zip=38;5;11::*.rar=38;5;11:*.tgz=38;5;11:*.7z=38;5;11:*.mp3=38;5;173:*.mp4=38;5;174:*.flac=38;5;166:*.mkv=38;5;115:*.avi=38;5;114:*.wmv=38;5;113:*.jpg=38;5;66:*.jpeg=38;5;66:*.png=38;5;68:*.pacnew=38;5;33:*.torrent=38;5;94:*.srt=38;5;242:*.sub=38;5;242:*.aria2=38;5;242"
+#!/bin/zsh
+
+compare_files() {
+  hash=`ssdeep -b $1`
+  echo $hash | tr " " "\n" | ssdeep -bm /proc/self/fd/0 $2
+}
+
+cd() {
+  builtin cd "$@"; ll; builtin echo;
+}
+
+#cpio archive this folder
+cpiopack() {
+    find ./ | cpio -H newc -o > ../cpio_packed
+}
+
+chroot_LFS() {
+    sudo setarch linux32 chroot "/home/lfs/lfs/LFS" /tools/bin/env -i HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
+
+}
+
+# make a thumb %20 the size of a pic
+thumbit() {
+  for pic in "$@"; do
+    case "$pic" in
+      *.jpg)  thumb="$(echo "$pic" | sed s/.jpg/-thumb.jpg/g)"              ;;
+      *.jpeg) thumb="$(echo "$pic" | sed s/.jpeg/-thumb.jpeg/g)"            ;;
+      *.png)  thumb="$(echo "$pic" | sed s/.png/-thumb.png/g)"              ;;
+      *)      echo "usage: thumbit [file{.jpg,.jpeg,.png}]" && return 1     ;;
+    esac
+    cp "$pic" "$thumb"
+    mogrify -resize 20% "$thumb"
+  done
+}
+
+# grep by paragraph
+grepp() {
+  if [ $# -ne 2 ]; then
+    echo "usage: grepp [term] [file]"
+  else
+    perl -00ne "print if /$1/i" < $2
+  fi
+}
+
+# recursively fix dir/file permissions on a given directory
+fix() {
+  if [ -d "$1" ]; then
+    find "$1" -type d -exec chmod 755 {} \;
+    find "$1" -type f -exec chmod 644 {} \;
+  else
+    echo "usage: fix [directory]"
+  fi
+}
+
+# open a GUI app from CLI
+open() {
+  if [ -z $1 ]; then
+    echo "usage: open [application]"
+  else
+    $1 &>/dev/null &
+  fi
+}
+
+# auto send an attachment from CLI
+send() {
+  if [ $# -ne 2 ]; then
+    echo "usage: send [file] [recipient]"
+  else
+    echo "Auto-sent from linux. Please see attached." | mutt -s "File Attached" -a $1 -- $2
+  fi
+}
+
+# find simplified
+seek()  {
+  if [ $# -eq 0 ]; then
+    echo 'Usage: '
+    echo '   seek <*d,f> <pattern> <*location>'
+    echo '   Search directory for file of folder match (*optional)'
+  else
+    case $1 in
+      d ) if [ -z "$3" ]; then
+            find . -type d -iname "*$2*"
+          else
+            find "$3" -type d -iname "*$2*"
+          fi
+          ;;
+      f ) if [ -z "$3" ]; then
+            find . -type f -iname "*$2*"
+          else
+            find "$3" -type f -iname "*$2*"
+          fi
+          ;;
+      * ) if [ -z "$2" ]; then
+            find . -iname "*$1*"
+          else
+            find "$2" -iname "*$1*"
+          fi
+          ;;
+    esac
+  fi
+}
+
+# daemon statuses
+daemon_status() {
+  C_STOPPED="\033[0;31m" # red
+  C_RUNNING="\033[0;32m" # green
+  C_RESET="\033[m"
+
+  daemons=( /etc/rc.d/* )
+  if [ -z "$1" ]; then
+    for d in ${daemons[@]##*/}; do
+      if [ -f "/var/run/daemons/$d" ]; then
+        printf "%-30b%-10b\n" $d ${C_RUNNING}RUNNING${C_RESET}
+      else
+        printf "%-30b%-10b\n" $d ${C_STOPPED}STOPPED${C_RESET}
+      fi
+    done
+  else
+    [ ! -f /etc/rc.d/$1 ] && echo "err! ${C_STOPPED}$1${C_RESET} is no daemon" && return 1
+    if [ -f "/var/run/daemons/$1" ]; then
+      printf "%-30b%-10b\n" $1 ${C_RUNNING}RUNNING${C_RESET}
+    else
+      printf "%-30b%-10b\n" $1 ${C_STOPPED}STOPPED${C_RESET}
+    fi
+  fi
+}
+
+# mail stats
+fmail() {
+  local -A counts; local i
+
+  for i in "${MAILDIR:-${HOME}/mail}"/**/new/*
+    { (( counts[${i:h:h:t}]++ )) }
+  for i in ${(k)counts}
+  { print -n ${i//\[Gmail\]./}: $counts[$i]' ' }
+}
+
+# go to google for anything
+google() {
+  local term="$@"
+
+  local URL="http://www.google.com/search?q=${term// /+}"
+
+  $BROWSER "$URL" &> /dev/null
+}
+
+# push git repo
+pushrepo() {
+  pushd ${HOME}/docs/myconfs &> /dev/null
+  if [[ $(git status | wc -l) -ne 2 ]]; then
+    git status
+    git commit -a -m "last commit"
+    git push
+  else
+    echo "==> repo up-to-date"
+  fi
+  popd &> /dev/null
+}
+
+# find binary provided by a package
+pacexe() {
+  for ARG in $(pacman -Qql $1); do
+    [[ ! -d $ARG ]] && [[ -x $ARG ]] && echo $ARG;
+  done
+}
+
+zsh_stats() { history | awk '{print $2}' | sort | uniq -c | sort -rn | head }
+
+mk() { mkdir -p "$1"; cd "$1" }
+
+# get ip of an interface
+getip() { /sbin/ifconfig ${1:-ppp0} | awk '/inet addr/ {print $2}' | awk -F: '{print $2}' }
+
+# get file & directory count
+files() { set "${1:-$PWD}"; echo "==> $(tree "$1" | tail -1) [$(du "$1" | cut -f1)]"; }
+
+# fold functions in vim
+# vim:foldmarker={,}
+# ---[ Completion ] {{{
+# :completion:<func>:<completer>:<command>:<argument>:<tag>
+# Expansion options
+zstyle ':completion:*' completer _complete _prefix
+zstyle ':completion::prefix-1:*' completer _complete
+zstyle ':completion:incremental:*' completer _complete _correct
+zstyle ':completion:predict:*' completer _complete
+zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
+
+# Expand partial paths
+zstyle ':completion:*' expand 'yes'
+zstyle ':completion:*' squeeze-slashes 'yes'
+
+# Separate matches into groups
+zstyle ':completion:*:matches' group 'yes'
+
+# Describe each match group.
+zstyle ':completion:*:descriptions' format "==[ %d%b ]"
+
+# Messages/warnings format
+zstyle ':completion:*:messages' format '==[ %d%u%b ]'
+zstyle ':completion:*:warnings' format '==[ no match for: %d%u%b ]'
+
+# Describe options in full
+zstyle ':completion:*:options' description 'yes'
+zstyle ':completion:*:options' auto-description '%d'
+# }}}
+
+# ---[ misc options ] {{{
+# General
+setopt   ALWAYS_TO_END NO_BEEP CLOBBER
+setopt   AUTO_CD CD_ABLE_VARS MULTIOS CORRECT_ALL
+
+# Job Control
+setopt   CHECK_JOBS NO_HUP
+
+# History
+setopt   INC_APPEND_HISTORY EXTENDED_HISTORY HIST_IGNORE_ALL_DUPS HIST_FIND_NO_DUPS
+setopt   HIST_REDUCE_BLANKS HIST_SAVE_NO_DUPS HIST_IGNORE_SPACE
+setopt   HIST_EXPIRE_DUPS_FIRST
+
+# Stay compatible to sh and IFS
+setopt   SH_WORD_SPLIT
+
+setopt   notify globdots pushdtohome
+setopt   longlistjobs
+setopt   autoresume pushdsilent
+setopt   autopushd pushdminus extendedglob rcquotes mailwarning
+unsetopt BG_NICE HUP autoparamslash
+
+autoload -Uz compinit complist zutil
+compinit
+# }}}
+
+# ---[ exports ] {{{
+export HISTFILE=~/.zsh_history
+export BROWSER="chromium"
+export EDITOR="vim"
+export PAGER="less -winm"
+export HISTSIZE=5000
+export SAVEHIST=5000
+export VISUAL=$EDITOR
+export PATH=/home/tanel/bin:/home/tanel/Scripts/:$PATH
+export STARDICT_DATA_DIR=${HOME}/.stardict
+
+# for colored man pages
+export LESS_TERMCAP_mb=$'\E[1;31m'
+export LESS_TERMCAP_md=$'\E[1;31m'
+export LESS_TERMCAP_me=$'\E[1;37m'
+export LESS_TERMCAP_se=$'\E[0m'
+export LESS_TERMCAP_so=$'\E[1;34m'
+export LESS_TERMCAP_ue=$'\E[0m'
+export LESS_TERMCAP_us=$'\E[1;32m'
+# }}}
+
+# ---[ sourced files ]  {{{
+source ~/.zsh/aliases
+source ~/.zsh/colors
+source ~/.zsh/functions
+
+# z dir jumper
+. /home/tanel/Scripts/Z/z/z.sh
+
+# }}}
+
+# ---[ keybindings ] {{{
+bindkey -v
+bindkey '^[Oc'   forward-word                   #for normal shell
+bindkey '^[Od'   backward-word
+bindkey '^[OC'   forward-word                   #for tmux
+bindkey '^[OD'   backward-word
+bindkey '^[[1~'  beginning-of-line              #for screen
+bindkey '^[[4~'  end-of-line
+bindkey '^[[7~'  beginning-of-line              #for rxvt
+bindkey '^[[8~'  end-of-line
+bindkey '^[[3~'  delete-char
+bindkey '^[[2~'  overwrite-mode
+bindkey '^r'     .history-incremental-pattern-search-backward
+bindkey '^?'     backward-delete-char
+bindkey '^['     vi-cmd-mode
+bindkey '^b'     clear-screen
+bindkey '^k'     kill-whole-line
+bindkey '^y'     .vi-yank-whole-line
+bindkey '^[[5~'  .undefined-key
+bindkey '^[[6~'  .undefined-key
+#  }}}
+
+#---[ PROMPT ] {{{
+bindkey "^R" history-incremental-pattern-search-backward
+bindkey "^T" history-incremental-pattern-search-forward
+
+precmd () {
+  [[ $? -eq 0 ]] && color="%{%}" || color="%{%}"
+
+  export PROMPT=" %{%}%~${color} $%{%} "
+
+  [[ -n "$RANGER" ]] && export RPROMPT="(in ranger)"
+
+  # Add the dir to the frecency list for 'z'
+  z --add "$(pwd -P)"
+
+}
+#  }}}
+
+ # ---[  login manager ] {{{
+if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]] { exec startx &> /dev/null }
+# }}}