Permalink
Browse files

add xmonad config

  • Loading branch information...
1 parent 6b0c4ab commit a983271443aa3480fcc0a614df42eb40e43bb010 @nouh committed Sep 2, 2013
Showing with 467 additions and 20 deletions.
  1. +9 −20 vimrc
  2. +73 −0 xmonad/xmobar.hs
  3. +385 −0 xmonad/xmonad.hs
View
29 vimrc
@@ -16,6 +16,7 @@ Bundle 'gmarik/vundle'
Bundle 'jnwhiteh/vim-golang'
Bundle 'Blackrush/vim-gocode'
"Bundle 'groenewege/vim-less'
+Bundle 'mattn/emmet-vim'
Bundle 'terryma/vim-multiple-cursors'
"Bundle 'rodjek/vim-puppet'
"Bundle 'slim-template/vim-slim'
@@ -62,7 +63,7 @@ Bundle 'tpope/vim-bundler'
Bundle 'tpope/vim-abolish'
Bundle 'tpope/vim-ragtag'
Bundle 'vim-ruby/vim-ruby'
-Bundle 'tpope/vim-rsi'
+"Bundle 'tpope/vim-rsi'
Bundle 'tpope/vim-git'
Bundle 'tpope/vim-unimpaired'
Bundle 'tpope/vim-endwise'
@@ -311,8 +312,6 @@ cno $q <C-\>eDeleteTillSlash()<cr>
cnoremap <C-A> <Home>
cnoremap <C-E> <End>
cnoremap <C-K> <C-U>
-map <C-E> <nop>
-imap <C-E> <nop>
cnoremap <C-P> <Up>
cnoremap <C-N> <Down>
@@ -359,9 +358,7 @@ map <silent> <leader> :noh<cr>
"Quick Escaping
inoremap jk <ESC>
-inoremap jj <ESC>
cnoremap jk <ESC>
-cnoremap jj <ESC>
"Operator mapping
omap t it
@@ -451,9 +448,9 @@ au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null"
let NERDTreeShowBookmarks = 1
let NERDChristmasTree = 1
let NERDTreeWinPos = "left"
-map <leader>n :NERDTreeToggle <cr>
+nmap <leader>n :NERDTreeToggle <cr>
+nmap <leader>f :NERDTreeFind<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
-"nmap <leader>p :NERDTreeFind<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => NERDComment
@@ -485,12 +482,12 @@ nnoremap <leader>m :CtrlPMRU<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <leader>a :Ack!<space>
"set grepprg=ack\ -a
-"if executable('ag')
- "let g:ackprg = 'ag --nogroup --nocolor --column'
-"endif
if executable('ack-grep')
let g:ackprg="ack-grep -H --nocolor --nogroup --column"
endif
+if executable('ag')
+ let g:ackprg = 'ag --nogroup --nocolor --column'
+endif
nmap <leader>cn :cn<cr>
nmap <leader>cp :cp<cr>
nmap <leader>cw :cw 10<cr>
@@ -607,14 +604,6 @@ let g:undotree_SplitLocation = 'botright'
nnoremap <leader>u :UndotreeToggle<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Vimim
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-"let g:vimim_map = 'tab'
-"let g:vimim_cloud = 'baidu,qq'
-"let g:vimim_cloud = -1
-"let g:vimim_toggle = 'pinyin'
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => ultisnip
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:UltiSnipsExpandTrigger="<c-j>"
@@ -623,9 +612,9 @@ let g:UltiSnipsJumpBackwordTrigger="<c-k>"
let g:UltiSnipsListSnippets="<c-l>"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Youcompleteme
+" => emmet.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-"let g:ycm_key_list_select_completion= ['<c-n>']
+let g:user_emmet_expandabbr_key = '<c-e>'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => dbext
View
@@ -0,0 +1,73 @@
+-- xmobar configuration file
+--
+-- Mess with this file to change the appearance of the contents of the
+-- status bar which are not directly controlled by xmonad. You can see your
+-- changes immediately by recompiling xmonad using "super-q".
+--
+-- There's a lot you can do here. Refer to "man xmobar".
+--
+-- Author: David Brewer
+-- Repository: https://github.com/davidbrewer/xmonad-ubuntu-conf
+
+
+Config {
+ -- Set font and default foreground/background colors. Note that
+ -- the height of xmobar is controlled by the font you use.
+ font = "xft:WenQuanYi\ Micro\ Hei-11",
+ bgColor = "black",
+ fgColor = "grey",
+
+ -- Position is top left, taking up 95% of screen.
+ -- You are likely to have to tweak the width here based on the width
+ -- of your screen to make it play nicely with stalonetray, which we
+ -- want to be taking up the remainer of the space on the right side
+ -- of your screen.
+ position = TopW L 100,
+
+ -- list of commands which gather information about your system for
+ -- presentation in the bar.
+ commands = [
+ -- Gather and format CPU usage information.
+ -- If it's above 50%, we consider it high usage and make it red.
+ Run Cpu [
+ "-H","50",
+ "--high","red"
+ ] 10,
+
+ -- Gather and format memory usage information
+ Run Memory [
+ "-t","Mem: <usedratio>%"
+ ] 10,
+
+ Run Network "eth0" ["-t","Net: <rx>, <tx>","-H","200","-L","10","-h","#FFB6B0","-l","#CEFFAC","-n","#FFFFCC"] 10,
+
+ -- Date formatting
+ Run Date "%a %b %_d %l:%M" "date" 10,
+
+
+
+ -- Battery information. This is likely to require some customization
+ -- based upon your specific hardware. Or, for a desktop you may want
+ -- to just remove this section entirely.
+
+ -- To get volume information, we run a custom bash script.
+ -- This is because the built-in volume support in xmobar is disabled
+ -- in Debian and derivatives like Ubuntu.
+ -- Run Com "~/.xmonad/get-volume" [] "myvolume" 10,
+
+ -- This line tells xmobar to read input from stdin. That's how we
+ -- get the information that xmonad is sending it for display.
+ Run StdinReader
+ ],
+
+ -- Separator character used to wrape variables in the xmobar template
+ sepChar = "%",
+
+ -- Alignment separater characer used in the xmobar template. Everything
+ -- before this will be aligned left, everything after aligned right.
+ alignSep = "}{",
+
+ -- Overall template for the layout of the xmobar contents. Note that
+ -- space is significant and can be used to add padding.
+ template = "%StdinReader% }{ %cpu% | %memory% | %eth0% | <fc=#e6744c>%date%</fc>"
+}
Oops, something went wrong.

0 comments on commit a983271

Please sign in to comment.