Merge branch 'master' of git.epichack.com:barak/dotfiles

This commit is contained in:
Barak Michener 2013-09-03 12:26:05 -04:00
commit b74e05b11c
17 changed files with 182 additions and 6066 deletions

View file

@ -93,6 +93,25 @@ spacer = widget({type = "textbox"})
separator = widget({type = "textbox"})
spacer.text = " "
separator.text = "|"
-- Execute command and return its output. You probably won't only execute commands with one
-- line of output
function execute_command(command)
local fh = io.popen(command)
local str = ""
for i in fh:lines() do
str = str .. i
end
io.close(fh)
return str
end
pom = widget({type = "textbox"})
pom.text = " " .. execute_command("~/src/tpom/tpom") .. " "
pomtimer = timer({ timeout = 1})
pomtimer:add_signal("timeout", function()
pom.text = " " .. execute_command("~/src/tpom/tpom") .. " "
end)
pomtimer:start()
-- {{{ Menu
-- Create a laucher widget and a main menu
@ -275,6 +294,7 @@ for s = 1, screen.count() do
spacer,
separator,
spacer,
pom,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}

3
.gitmodules vendored
View file

@ -76,3 +76,6 @@
[submodule ".vim/bundle/vim-bufferline"]
path = .vim/bundle/vim-bufferline
url = https://github.com/bling/vim-bufferline
[submodule ".vim/bundle/tagbar"]
path = .vim/bundle/tagbar
url = git://github.com/majutsushi/tagbar

View file

@ -11,6 +11,12 @@ exec {
exec {
"get_gocov":
command => "go get -u github.com/axw/gocov",
command => "go get -u github.com/axw/gocov/gocov",
path => "/usr/bin",
}
exec {
"get_gotags":
command => "go get -u github.com/jstemmer/gotags",
path => "/usr/bin",
}

View file

@ -32,7 +32,7 @@ set -g status-fg white
set -g status-interval 1
set -g status-left '#[fg=green]#H#[default]'
set -g status-left-length 20
set -g status-right '#[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'
set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'
# Notifying if other windows has activities
setw -g monitor-activity on

View file

@ -2,9 +2,9 @@
" (https://github.com/Donearm/Ubaryd)
" Normal mode
let s:N1 = [ '#141413' , '#c7b386' , 232 , 252 ] " blackestgravel & bleaksand
let s:N2 = [ '#c7b386' , '#45413b' , 252, 238 ] " bleaksand & deepgravel
let s:N3 = [ '#b88853' , '#363946' , 137, 237 ] " toffee & darkgravel
let s:N1 = [ '#141413' , '#b3b3b3' , 232 , 252 ] " blackestgravel & bleaksand
let s:N2 = [ '#b3b3b3' , '#414141' , 252, 238 ] " bleaksand & deepgravel
let s:N3 = [ '#e0e0e0' , '#363636' , 254, 237 ] " toffee & darkgravel
let s:N4 = [ '#363946' , 237 ] " gravel
" Insert mode

@ -1 +1 @@
Subproject commit 7cc399a017a0f20c230a50a4f05d58ab7ef9dca4
Subproject commit df0be9fb2c78716dc82d86b11a27710d53567624

1
.vim/bundle/tagbar Submodule

@ -0,0 +1 @@
Subproject commit 97d7b04bdd10cae424f8cb6be50ae7893b106ff4

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

@ -1 +1 @@
Subproject commit ccb00be717d36276514ed660f6f6b6d3413b1fad
Subproject commit 08f87f2103a26ac3c0fdd8021eb51c0a7966e8dd

@ -1 +1 @@
Subproject commit f501353aeafdfd9137b5f7847d598b86065be133
Subproject commit 526e4e2c58d317f88ae84298922c2915bd0b1ecb

@ -1 +1 @@
Subproject commit 83c06f7a351b9140988bfe6d3e651a63d3c504c0
Subproject commit 8f6be8704f13bbf4dbf1f08bdd52a710889e1181

@ -1 +1 @@
Subproject commit 7b07ccdc64afb8a4eced064901b63dbfca1e4a64
Subproject commit 881857067e3da7baa5c819257cef3cfe419eb974

@ -1 +1 @@
Subproject commit 71cdd2d9a212be6367d8f716a19bf5caf11bd0ec
Subproject commit 5a4cf9ab26b14a1cdb625f4dc957f620e6f3f4f2

92
.vim/indent/cpp.vim Normal file
View file

@ -0,0 +1,92 @@
" Vim indent file
" Language: C++
" Maintainer: Konstantin Lepa <konstantin.lepa@gmail.com>
" Last Change: 2010 May 20
" License: MIT
" Version: 1.1.0
"
" Changes {{{
" 1.1.0 2011-01-17
" Refactored source code.
" Some fixes.
"
" 1.0.1 2010-05-20
" Added some changes. Thanks to Eric Rannaud <eric.rannaud@gmail.com>
"
"}}}
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
function! GoogleCppIndent()
let l:cline_num = line('.')
let l:orig_indent = cindent(l:cline_num)
if l:orig_indent == 0 | return 0 | endif
let l:pline_num = prevnonblank(l:cline_num - 1)
let l:pline = getline(l:pline_num)
if l:pline =~# '^\s*template' | return l:pline_indent | endif
" TODO: I don't know to correct it:
" namespace test {
" void
" ....<-- invalid cindent pos
"
" void test() {
" }
"
" void
" <-- cindent pos
if l:orig_indent != &shiftwidth | return l:orig_indent | endif
let l:in_comment = 0
let l:pline_num = prevnonblank(l:cline_num - 1)
while l:pline_num > -1
let l:pline = getline(l:pline_num)
let l:pline_indent = indent(l:pline_num)
if l:in_comment == 0 && l:pline =~ '^.\{-}\(/\*.\{-}\)\@<!\*/'
let l:in_comment = 1
elseif l:in_comment == 1
if l:pline =~ '/\*\(.\{-}\*/\)\@!'
let l:in_comment = 0
endif
elseif l:pline_indent == 0
if l:pline !~# '\(#define\)\|\(^\s*//\)\|\(^\s*{\)'
if l:pline =~# '^\s*namespace.*'
return 0
else
return l:orig_indent
endif
elseif l:pline =~# '\\$'
return l:orig_indent
endif
else
return l:orig_indent
endif
let l:pline_num = prevnonblank(l:pline_num - 1)
endwhile
return l:orig_indent
endfunction
setlocal shiftwidth=2
setlocal tabstop=2
setlocal softtabstop=2
setlocal expandtab
setlocal textwidth=80
setlocal wrap
setlocal cindent
setlocal cinoptions=h1,l1,g1,t0,i4,+4,(0,w1,W4
setlocal indentexpr=GoogleCppIndent()
let b:undo_indent = "setl sw< ts< sts< et< tw< wrap< cin< cino< inde<"

27
.vim/plugin/gotags.vim Normal file
View file

@ -0,0 +1,27 @@
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }

26
.vimrc
View file

@ -155,6 +155,8 @@ let g:NERDTreeDirArrows=0
" * Tagbar plugin settings
let g:tagbar_width = 40
let g:tagbar_autofocus = 1
let g:tagbar_autoclose = 1
let g:tagbar_compact = 1
" * Taglist plugin settings (deprecated)
let Tlist_GainFocus_On_ToggleOpen = 1
@ -206,11 +208,26 @@ let g:airline_right_sep = ''
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#hunks#non_zero_only = 1
let g:airline#extensions#whitespace#enabled = 0
let g:airline_mode_map = {
\ '__' : '-',
\ 'n' : 'N',
\ 'i' : 'I',
\ 'R' : 'R',
\ 'c' : 'C',
\ 'v' : 'V',
\ 'V' : 'V',
\ '' : 'V',
\ 's' : 'S',
\ 'S' : 'S',
\ '' : 'S',
\ }
" * CtrlP
let g:ctrlp_map = ',t'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_match_window = 'bottom,order:ttb,min:1,max:15'
" ** STATUSLINE **
@ -368,7 +385,8 @@ endfunction
" I don't know how I came up with gt for opening the tree, but it stuck.
nmap gt :NERDTreeToggle<CR>
" The same for the TagList, useful for large C files.
nmap gb :TlistToggle<CR>
"nmap gb :TlistToggle<CR>
nmap gb :TagbarToggle<CR>
"nnoremap gx :Kwbd<CR>
" :Kwbd (defined below) really kills a buffer dead, and closes the window.
" gK is similar.
@ -445,10 +463,10 @@ nnoremap <Leader>ac :Ack
nnoremap <Leader>hh :A<CR>
" CommandT is useful, but if I'm juggling lots of buffers, limit it to another
" one I have open (instead of standard <Leader>t).
nnoremap <silent> <Leader>o :CommandTBuffer<CR>
nnoremap <silent> <Leader>o :CtrlPBuffer<CR>
nnoremap <Leader>j <C-^>
nnoremap <Leader>p :PTW
nnoremap <Leader>lp :LustyJugglePrevious<CR>
"nnoremap <Leader>p :PTW
nnoremap <Leader>p :LustyJugglePrevious<CR>
" ** EXTRA INCLUDES **
"