Browse code
Routine updates
fiddlerwoaroof authored on 28/04/2015 23:59:46
Showing 8 changed files
Showing 8 changed files
- .gitmodules
- .vimrc
- .xmonad/xmonad.hs
- .zshrc
- external/deer
- external/smart-change-directory
- scripts/pslist
- zsh_plugins/.gitignore
... | ... |
@@ -1,13 +1,13 @@ |
1 | 1 |
let counter = 0 |
2 |
+let g:syntastic_auto_loc_list=1 |
|
2 | 3 |
let g:sql_type_default = 'pgsql' |
3 | 4 |
let g:airline_theme="murmur" |
4 |
-let g:ghc="/usr/bin/ghc" |
|
5 | 5 |
let g:haddock_browser_callformat = "%s %s" |
6 | 6 |
let g:haddock_browser = "open" |
7 | 7 |
let g:lisp_rainbow=1 |
8 | 8 |
let g:pandoc_no_empty_implicits=1 |
9 | 9 |
let g:pandoc_use_hard_wraps = 1 |
10 |
-let g:pandoc#modules#enabled = ["formatting", "folding", "completion", "externals", "metadata","menu", "executors", "motions"] |
|
10 |
+let g:pandoc#modules#enabled = ["formatting", "folding", "completion", "metadata","menu"] |
|
11 | 11 |
let g:pandoc#modules#disabled = ["command", "bibliographies"] |
12 | 12 |
let g:pandoc_formatting_settings = "h" |
13 | 13 |
let g:pandoc#filetypes#handled = ["markdown", "rst", "textile"] |
... | ... |
@@ -17,6 +17,7 @@ let g:solarized_termtrans=1 |
17 | 17 |
let g:syntastic_python_checkers = ['python'] |
18 | 18 |
let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*' |
19 | 19 |
let g:tex_flavor='xelatex' |
20 |
+let g:unite_force_overwrite_statusline = 0 |
|
20 | 21 |
let g:vimclojure#HighlightBuiltins = 1 |
21 | 22 |
let g:vimclojure#HighlightBuiltins = 1 |
22 | 23 |
let g:vimclojure#ParenRainbow = 1 |
... | ... |
@@ -29,6 +30,8 @@ let python_no_tab_space_error=1 |
29 | 30 |
let python_space_errors=1 |
30 | 31 |
let vimclojure#WantNailgun = 1 |
31 | 32 |
|
33 |
+" This goes here in case a filetype overrides it |
|
34 |
+ |
|
32 | 35 |
"NeoBundle Scripts----------------------------- |
33 | 36 |
if has('vim_starting') |
34 | 37 |
set nocompatible " Be iMproved |
... | ... |
@@ -45,46 +48,53 @@ call neobundle#begin(expand("$HOME/.vim/bundle")) |
45 | 48 |
NeoBundleFetch 'Shougo/neobundle.vim' |
46 | 49 |
|
47 | 50 |
" My Bundles here: |
48 |
-NeoBundle 'Shougo/vimfiler.vim' |
|
49 |
-NeoBundle 'vim-voom/VOoM' |
|
50 |
-NeoBundle 'vim-scripts/VimClojure' |
|
51 |
-NeoBundle 'scrooloose/nerdcommenter' |
|
51 |
+NeoBundle 'altercation/vim-colors-solarized' |
|
52 |
+NeoBundle 'bitc/vim-hdevtools' |
|
53 |
+NeoBundle 'Blackrush/vim-gocode' |
|
54 |
+NeoBundle 'bling/vim-airline' |
|
55 |
+NeoBundle 'burnettk/vim-angular' |
|
56 |
+NeoBundle 'christoomey/vim-tmux-navigator' |
|
57 |
+NeoBundle 'curist/vim-angular-template' |
|
58 |
+NeoBundle 'eagletmt/ghcmod-vim' |
|
59 |
+NeoBundle 'eagletmt/neco-ghc' |
|
60 |
+"NeoBundle 'enomsg/vim-haskellConcealPlus' |
|
61 |
+NeoBundle 'exu/pgsql.vim' |
|
62 |
+NeoBundle 'godlygeek/tabular' |
|
63 |
+NeoBundle 'groenewege/vim-less' |
|
64 |
+NeoBundle 'guns/vim-clojure-static' |
|
65 |
+NeoBundle 'ivanov/vim-ipython' |
|
66 |
+NeoBundle 'jmcantrell/vim-virtualenv' |
|
52 | 67 |
NeoBundle 'kien/rainbow_parentheses.vim' |
53 | 68 |
NeoBundle 'kovisoft/slimv' |
69 |
+"NeoBundle 'lukerandall/haskellmode-vim' |
|
70 |
+NeoBundle 'matthewsimo/angular-vim-snippets' |
|
71 |
+NeoBundle 'msanders/snipmate.vim' |
|
72 |
+NeoBundle 'othree/javascript-libraries-syntax.vim' |
|
73 |
+NeoBundle 'pangloss/vim-javascript' |
|
74 |
+NeoBundle 'raichoo/haskell-vim' |
|
75 |
+NeoBundle 'scrooloose/nerdcommenter' |
|
54 | 76 |
NeoBundle 'scrooloose/syntastic' |
55 |
-NeoBundle 'godlygeek/tabular' |
|
56 |
-NeoBundle 'ytsunetsune/unite-outline-euslisp' |
|
57 | 77 |
NeoBundle 'Shougo/unite-outline' |
58 | 78 |
NeoBundle 'Shougo/unite.vim' |
59 |
-NeoBundle 'Shougo/vimshell.vim' |
|
79 |
+NeoBundle 'Shougo/vimfiler.vim' |
|
60 | 80 |
NeoBundle 'Shougo/vimproc' |
61 |
-NeoBundle 'bling/vim-airline' |
|
62 |
-NeoBundle 'guns/vim-clojure-static' |
|
63 |
-NeoBundle 'altercation/vim-colors-solarized' |
|
81 |
+NeoBundle 'Shougo/vimshell.vim' |
|
82 |
+NeoBundle 'sjl/gundo.vim' |
|
83 |
+NeoBundle 'sjl/vitality.vim' |
|
84 |
+NeoBundle 'sophacles/vim-bundle-mako' |
|
85 |
+NeoBundle 'terryma/vim-multiple-cursors' |
|
64 | 86 |
NeoBundle 'tpope/vim-fireplace' |
65 | 87 |
NeoBundle 'tpope/vim-fugitive' |
66 |
-NeoBundle 'Blackrush/vim-gocode' |
|
67 |
-NeoBundle 'Twinside/vim-haskellFold' |
|
68 |
-NeoBundle 'ivanov/vim-ipython' |
|
69 |
-NeoBundle 'groenewege/vim-less' |
|
70 |
-NeoBundle 'terryma/vim-multiple-cursors' |
|
71 |
-NeoBundle 'vim-pandoc/vim-pandoc' |
|
72 | 88 |
NeoBundle 'tpope/vim-repeat' |
73 | 89 |
NeoBundle 'tpope/vim-surround' |
74 |
-NeoBundle 'christoomey/vim-tmux-navigator' |
|
75 |
-NeoBundle 'sjl/gundo.vim' |
|
76 |
-NeoBundle 'jmcantrell/vim-virtualenv' |
|
77 |
-NeoBundle 'vim-scripts/pydoc.vim' |
|
78 |
-NeoBundle 'msanders/snipmate.vim' |
|
79 |
-NeoBundle 'burnettk/vim-angular' |
|
80 |
-NeoBundle 'pangloss/vim-javascript' |
|
81 |
-NeoBundle 'othree/javascript-libraries-syntax.vim' |
|
82 |
-NeoBundle 'matthewsimo/angular-vim-snippets' |
|
83 |
-NeoBundle 'curist/vim-angular-template' |
|
84 |
-NeoBundle 'sophacles/vim-bundle-mako' |
|
85 |
-NeoBundle 'lukerandall/haskellmode-vim' |
|
90 |
+"NeoBundle 'Twinside/vim-haskellFold' |
|
91 |
+NeoBundle 'Twinside/vim-hoogle' |
|
92 |
+NeoBundle 'vim-pandoc/vim-pandoc' |
|
86 | 93 |
NeoBundle 'vim-scripts/dbext.vim' |
87 |
-NeoBundle 'exu/pgsql.vim' |
|
94 |
+NeoBundle 'vim-scripts/pydoc.vim' |
|
95 |
+NeoBundle 'vim-scripts/VimClojure' |
|
96 |
+NeoBundle 'vim-voom/VOoM' |
|
97 |
+NeoBundle 'ytsunetsune/unite-outline-euslisp' |
|
88 | 98 |
|
89 | 99 |
" Required: |
90 | 100 |
call neobundle#end() |
... | ... |
@@ -107,8 +117,7 @@ filetype indent on |
107 | 117 |
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to |
108 | 118 |
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded. |
109 | 119 |
" The following changes the default filetype back to 'tex': |
110 |
- |
|
111 |
- |
|
120 |
+let g:tex_flavor='latex' |
|
112 | 121 |
|
113 | 122 |
" Configuration file for vim |
114 | 123 |
|
... | ... |
@@ -120,7 +129,6 @@ au BufWrite /private/tmp/crontab.* set nowritebackup |
120 | 129 |
" Don't write backup file if vim is being called by "chpass" |
121 | 130 |
au BufWrite /private/etc/pw.* set nowritebackup |
122 | 131 |
|
123 |
- |
|
124 | 132 |
"Enable support for Color xterm |
125 | 133 |
:if has("terminfo") |
126 | 134 |
: set t_Co=8 |
... | ... |
@@ -132,8 +140,7 @@ au BufWrite /private/etc/pw.* set nowritebackup |
132 | 140 |
: set t_Sb=[4%dm |
133 | 141 |
:endif |
134 | 142 |
|
135 |
- |
|
136 |
- |
|
143 |
+set omnifunc=syntaxcomplete#Complete |
|
137 | 144 |
set ignorecase |
138 | 145 |
set smartcase |
139 | 146 |
set autoindent |
... | ... |
@@ -147,7 +154,6 @@ set scrolloff=4 |
147 | 154 |
set wildmode=longest,list |
148 | 155 |
set autoread |
149 | 156 |
set background=dark |
150 |
-set omnifunc=syntaxcomplete#Complete |
|
151 | 157 |
set pastetoggle=<F12> |
152 | 158 |
set undodir=~/.vim/undodir |
153 | 159 |
set undofile |
... | ... |
@@ -165,7 +171,6 @@ set backspace=2 " more powerful backspacing |
165 | 171 |
syntax enable |
166 | 172 |
colorscheme solarized |
167 | 173 |
|
168 |
- |
|
169 | 174 |
if &term =~ "xterm\\|rxvt" |
170 | 175 |
" use an orange cursor in insert mode |
171 | 176 |
let &t_SI = "\<Esc>]12;blue\x7" |
... | ... |
@@ -177,10 +182,10 @@ if &term =~ "xterm\\|rxvt" |
177 | 182 |
" use \003]12;gray\007 for gnome-terminal |
178 | 183 |
endif |
179 | 184 |
|
180 |
- |
|
181 |
- |
|
182 | 185 |
"SmartIndent for Python |
183 |
-autocmd BufEnter *.hs compiler ghc |
|
186 |
+"autocmd BufEnter *.hs compiler ghc |
|
187 |
+au FocusLost * :wa |
|
188 |
+ |
|
184 | 189 |
autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e |
185 | 190 |
autocmd BufRead *.mako set ft=mako |
186 | 191 |
autocmd BufRead *.md set dictionary+=/usr/share/dict/words |
... | ... |
@@ -193,14 +198,16 @@ autocmd FileType pandoc set linebreak tw=110 noexpandtab nosmartindent autoinden |
193 | 198 |
autocmd FileType pantondoc set linebreak tw=110 noexpandtab nosmartindent autoindent |
194 | 199 |
"autocmd FileType python map K \pW |
195 | 200 |
autocmd FileType python set complete+=k~/.vim/syntax/python.vim "isk+=.,( |
201 |
+autocmd FileType haskell set omnifunc=necoghc#omnifunc |
|
202 |
+autocmd FileType lisp set omnifunc=SlimvOmniComplete |
|
196 | 203 |
" when we reload, tell vim to restore the cursor to the saved position |
197 | 204 |
|
198 | 205 |
"Diable the anti-python smart indent of # |
199 | 206 |
inoremap # X# |
200 | 207 |
|
201 | 208 |
"Turn Syntax Highlighting on by default, and assume the xterm background is black |
202 |
-imap <C-g> :Unite outline i |
|
203 |
-imap <F7> :Unite outline i |
|
209 |
+imap <C-g> :Unite outline -start-insert |
|
210 |
+imap <F7> :Unite outline -start-insert |
|
204 | 211 |
imap <F8> o :,!pbpaste |
205 | 212 |
imap <F9> o :,!pbpaste |
206 | 213 |
inoremap <expr> <C-L> ListItem() |
... | ... |
@@ -214,13 +221,13 @@ inoremap <Space> <Space><C-g>u |
214 | 221 |
inoremap <Tab> <Tab><C-g>u |
215 | 222 |
|
216 | 223 |
map <BS> dh |
217 |
-map <C-g> :Unite outline i |
|
224 |
+map <C-g> :Unite outline -start-insert -auto-preview |
|
218 | 225 |
map CS :sil! :%s/\s\+$//g<CR>``:%s/^\(\t\+\)\( \+\(\t*\)\)\+/\1\3/gc<CR>`` |
219 |
-map <F7> :Unite outline i |
|
226 |
+map <F7> :Unite outline -start-insert |
|
220 | 227 |
map <F8> o :,!pbpaste |
221 | 228 |
map <F9> o :,!pbpaste |
222 |
-map <leader>f :Unite file<CR>i |
|
223 |
-map <leader>q :Unite buffer<CR>i |
|
229 |
+map <leader>f :Unite file_rec/async -start-insert |
|
230 |
+map <leader>q :Unite buffer -start-insert |
|
224 | 231 |
map W wb"_dwP |
225 | 232 |
map ZX :wq<cr> |
226 | 233 |
map ZZ :w<CR> |
... | ... |
@@ -231,9 +238,6 @@ nnoremap <C-J> <C-W><C-J> |
231 | 238 |
nnoremap <C-K> <C-W><C-K> |
232 | 239 |
nnoremap <C-L> <C-W><C-L> |
233 | 240 |
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR> |
234 |
-noremap <F3> :!spot_control pr<CR> |
|
235 |
-noremap <F4> :!spot_control p<CR><CR> |
|
236 |
-noremap <F5> :!spot_control n<CR> |
|
237 | 241 |
|
238 | 242 |
python << EOF |
239 | 243 |
import os |
... | ... |
@@ -257,40 +261,73 @@ endfunc |
257 | 261 |
|
258 | 262 |
set diffopt=vertical,filler,iwhite,foldcolumn:0 |
259 | 263 |
|
260 |
- |
|
261 |
-"command! -range FmtTable python FmtTable(<f-line1>,<f-line2>) |
|
262 |
- |
|
263 |
-"python << EOS |
|
264 |
-"def FmtTable(line1,line2): |
|
265 |
-" import vim, string |
|
266 |
-" inputSeparator='|' |
|
267 |
-" outputSeparator="|" |
|
268 |
-" cb=vim.current.buffer.range(int(line1)-1,int(line2)) |
|
269 |
-" colLen=[] |
|
270 |
-" # first we collect col lengths and calculate the longest |
|
271 |
-" for line in cb[1:]: |
|
272 |
-" spLine=line.split(inputSeparator) |
|
273 |
-" for i in range(len(spLine)): |
|
274 |
-" try: |
|
275 |
-" if len(spLine[i]) > colLen[i]: |
|
276 |
-" colLen[i] = len(spLine[i]) |
|
277 |
-" except IndexError: |
|
278 |
-" colLen.append(len(spLine[i])) |
|
279 |
-" tmpBuf=[] |
|
280 |
-" # Then we fill the cols with spaces |
|
281 |
-" for line in cb[1:]: |
|
282 |
-" spLine=line.split(inputSeparator) |
|
283 |
-" newLine=outputSeparator.join([spElt.ljust(colLen[i]) for i, spElt in enumerate(spLine)]) + outputSeparator |
|
284 |
-" tmpBuf.append(newLine) |
|
285 |
-" cb[1:]=tmpBuf[:] |
|
286 |
-"EOS |
|
287 |
- |
|
288 |
- |
|
289 |
- |
|
290 |
- |
|
291 | 264 |
highlight PmenuSel ctermfg=LightGray ctermbg=DarkRed |
292 | 265 |
|
293 | 266 |
if filereadable(".vim.custom") |
294 | 267 |
so .vim.custom |
295 | 268 |
endif |
296 | 269 |
|
270 |
+let g:syntastic_javascript_checkers = ['jshint'] |
|
271 |
+call unite#custom#source('file,file/new,buffer,file_rec','matchers','matcher_fuzzy') |
|
272 |
+ |
|
273 |
+autocmd FileType unite call s:unite_my_settings() |
|
274 |
+function! s:unite_my_settings() |
|
275 |
+ " Overwrite settings. |
|
276 |
+ let b:SuperTabDisabled=1 |
|
277 |
+ imap <buffer><expr> <C-v> unite#do_action('vsplit') |
|
278 |
+ imap <buffer><expr> <C-s> unite#do_action('split') |
|
279 |
+ imap <buffer> <Tab> <Plug>(unite_complete) |
|
280 |
+ imap <buffer> <C-j> <Plug>(unite_select_next_line) |
|
281 |
+ imap <buffer> <Down> <Plug>(unite_select_next_line) |
|
282 |
+ imap <buffer> <C-k> <Plug>(unite_select_previous_line) |
|
283 |
+ imap <buffer> <Up> <Plug>(unite_select_previous_line) |
|
284 |
+ |
|
285 |
+ " exit with esc |
|
286 |
+ nmap <buffer> <ESC> <Plug>(unite_exit) |
|
287 |
+ |
|
288 |
+ " exit with ctrl-c |
|
289 |
+ imap <buffer> <c-c> <Plug>(unite_exit) |
|
290 |
+ nmap <buffer> <c-c> <Plug>(unite_exit) |
|
291 |
+endfunction |
|
292 |
+ |
|
293 |
+if executable('ag') |
|
294 |
+ " let g:unite_source_file_async_command = |
|
295 |
+ " \ 'ag --follow --nocolor --nogroup --hidden -g ""' |
|
296 |
+ " https://github.com/ggreer/the_silver_searcher |
|
297 |
+ " Use ag in unite grep source. |
|
298 |
+ " let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden ' . |
|
299 |
+ " \ '--ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
300 |
+ " \ '--ignore ''**/*.pyc'' -g ""' |
|
301 |
+ let g:unite_source_grep_command = 'ag' |
|
302 |
+ let g:unite_source_grep_default_opts = |
|
303 |
+ \ '--line-numbers --nocolor --nogroup --hidden --ignore ' . |
|
304 |
+ \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
305 |
+ \ '--ignore ''**/*.pyc''' |
|
306 |
+ let g:unite_source_grep_recursive_opt = '' |
|
307 |
+elseif executable('ack-grep') |
|
308 |
+ let g:unite_source_grep_command = 'ack-grep' |
|
309 |
+ " Match whole word only. This might/might not be a good idea |
|
310 |
+ let g:unite_source_grep_default_opts = '--no-heading --no-color -a -H' |
|
311 |
+ "let g:unite_source_grep_default_opts = '--no-heading --no-color -a -w' |
|
312 |
+ let g:unite_source_grep_default_opts = '--exclude ''\.(git|svn|hg|bzr)''' |
|
313 |
+ let g:unite_source_grep_recursive_opt = '' |
|
314 |
+elseif executable('ack') |
|
315 |
+ let g:unite_source_grep_command = 'ack' |
|
316 |
+ let g:unite_source_grep_default_opts = '--no-heading --no-color -a -w' |
|
317 |
+ let g:unite_source_grep_default_opts = '--exclude ''\.(git|svn|hg|bzr)''' |
|
318 |
+ let g:unite_source_grep_recursive_opt = '' |
|
319 |
+endif |
|
320 |
+ |
|
321 |
+nnoremap [unite] <Nop> |
|
322 |
+nmap <space> [unite] |
|
323 |
+nmap [unite]s :<C-u>Unite -auto-preview grep:.<C-m> |
|
324 |
+nmap [unite]o :<C-u>Unite outline -start-insert<C-m> |
|
325 |
+nmap [unite]f :<C-u>Unite file_rec/async -start-insert<C-m> |
|
326 |
+nmap [unite]F :<C-u>Unite file -start-insert<C-m> |
|
327 |
+nmap [unite]g :<C-u>Unite file_rec/git -start-insert<C-m> |
|
328 |
+nmap [unite]j :<C-u>Unite buffer -start-insert<C-m> |
|
329 |
+ |
|
330 |
+" Reload |
|
331 |
+map <silent> tu :call GHC_BrowseAll()<CR> |
|
332 |
+" Type Lookup |
|
333 |
+map <silent> tw :call GHC_ShowType(1)<CR> |
... | ... |
@@ -2,7 +2,9 @@ import Control.Monad |
2 | 2 |
|
3 | 3 |
import Data.List |
4 | 4 |
import Data.Maybe |
5 |
+import Data.Monoid |
|
5 | 6 |
import Data.Ratio ((%)) |
7 |
+import Data.Word |
|
6 | 8 |
|
7 | 9 |
import System.IO |
8 | 10 |
|
... | ... |
@@ -13,18 +15,21 @@ import XMonad.Actions.GridSelect |
13 | 15 |
import XMonad.Actions.SpawnOn |
14 | 16 |
import XMonad.Core |
15 | 17 |
import XMonad.Hooks.DynamicLog |
18 |
+import XMonad.Hooks.EwmhDesktops |
|
19 |
+import XMonad.Hooks.ICCCMFocus |
|
16 | 20 |
import XMonad.Hooks.ManageDocks |
17 | 21 |
import XMonad.Layout.Accordion |
22 |
+import XMonad.Layout.BoringWindows hiding (Replace) |
|
18 | 23 |
import XMonad.Layout.Circle |
19 | 24 |
import XMonad.Layout.Combo |
25 |
+import XMonad.Layout.Decoration |
|
20 | 26 |
import XMonad.Layout.DragPane |
21 |
-import XMonad.Layout.Maximize |
|
22 |
-import XMonad.Layout.SubLayouts |
|
23 | 27 |
import XMonad.Layout.Gaps |
24 | 28 |
import XMonad.Layout.Grid |
25 | 29 |
import XMonad.Layout.IM |
26 | 30 |
import XMonad.Layout.LayoutCombinators |
27 |
-import XMonad.Layout.BoringWindows hiding (Replace) |
|
31 |
+import XMonad.Layout.LayoutModifier |
|
32 |
+import XMonad.Layout.Maximize |
|
28 | 33 |
import XMonad.Layout.NoBorders |
29 | 34 |
import XMonad.Layout.OneBig |
30 | 35 |
import XMonad.Layout.PerWorkspace |
... | ... |
@@ -33,31 +38,59 @@ import XMonad.Layout.Renamed |
33 | 38 |
import XMonad.Layout.ResizableTile |
34 | 39 |
import XMonad.Layout.Simplest |
35 | 40 |
import XMonad.Layout.Spiral |
41 |
+import XMonad.Layout.SubLayouts |
|
36 | 42 |
import XMonad.Layout.Tabbed |
37 | 43 |
import XMonad.Layout.ThreeColumns |
38 | 44 |
import XMonad.Layout.TwoPane |
39 | 45 |
import XMonad.Layout.WindowNavigation |
40 | 46 |
import XMonad.Prompt |
41 | 47 |
import XMonad.StackSet as W |
42 |
-import XMonad.StackSet hiding ( workspaces ) |
|
43 | 48 |
import XMonad.Util.Dzen |
44 | 49 |
import XMonad.Util.EZConfig(additionalKeys) |
45 | 50 |
import XMonad.Util.Loggers |
46 | 51 |
import XMonad.Util.Run(spawnPipe) |
47 |
- |
|
52 |
+nmaster :: Int |
|
48 | 53 |
nmaster = 1 |
54 |
+ |
|
49 | 55 |
ratio = 13/21 |
56 |
+ |
|
50 | 57 |
delta = 3/100 |
58 |
+ |
|
59 |
+tiled :: Tall a |
|
51 | 60 |
tiled = Tall nmaster delta ratio |
61 |
+ |
|
52 | 62 |
myTabbed = renamed [Replace "Tabbed"] $ tabbedBottom shrinkText defaultTheme |
63 |
+ |
|
64 |
+threeLayout :: ThreeCol a |
|
53 | 65 |
threeLayout = ThreeColMid nmaster delta ratio |
66 |
+ |
|
67 |
+writingLayout :: ModifiedLayout Rename (ModifiedLayout Gaps Full) a |
|
54 | 68 |
writingLayout = renamed [Replace "Writing"] $ gaps [(L,500), (R, 500)] Full |
55 | 69 |
|
56 |
-imLayout = renamed [Replace "im"] $ withIM ratio empathyRoster Accordion where |
|
57 |
- ratio = 1%6 |
|
70 |
+imLayout :: ModifiedLayout Rename (ModifiedLayout AddRoster Accordion) Window |
|
71 |
+imLayout = renamed [Replace "im"] $ withIM myRatio empathyRoster Accordion where |
|
72 |
+ myRatio = 1%6 |
|
58 | 73 |
empathyRoster = And (ClassName "Empathy") (Role "contact_list") |
59 | 74 |
|
60 | 75 |
|
76 |
+base :: NewSelect |
|
77 |
+ (ModifiedLayout Rename (Mirror ThreeCol)) |
|
78 |
+ (NewSelect (ModifiedLayout Rename (Mirror Tall)) |
|
79 |
+ (NewSelect Full |
|
80 |
+ (NewSelect Accordion |
|
81 |
+ (NewSelect Circle |
|
82 |
+ (NewSelect SpiralWithDir |
|
83 |
+ (NewSelect |
|
84 |
+ (ModifiedLayout Rename |
|
85 |
+ (ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest)) |
|
86 |
+ (NewSelect |
|
87 |
+ (ModifiedLayout Rename (Mirror Accordion)) |
|
88 |
+ (NewSelect |
|
89 |
+ (ModifiedLayout Rename (ModifiedLayout Gaps Full)) |
|
90 |
+ (NewSelect |
|
91 |
+ (ModifiedLayout Rename DragPane) |
|
92 |
+ (NewSelect (ModifiedLayout Rename Grid) |
|
93 |
+ (NewSelect TwoPane OneBig))))))))))) Word64 |
|
61 | 94 |
base = mthree ||| wide ||| Full ||| Accordion ||| Circle ||| spiral (6/7) |
62 | 95 |
||| myTabbed ||| wideAccordion ||| writingLayout ||| rows ||| grid |
63 | 96 |
||| (TwoPane (3/100) (1/2)) ||| (OneBig (3/4) (3/4)) |
... | ... |
@@ -82,20 +115,16 @@ myLayout = avoidStruts $ smartBorders $ |
82 | 115 |
myDzenConfig :: DzenConfig |
83 | 116 |
myDzenConfig = (timeout 1 >=> (onCurr (vCenter 100)) >=> (onCurr (hCenter 300)) >=> XMonad.Util.Dzen.font "xft:Source Code Pro:size=20:antialias=true") |
84 | 117 |
|
118 |
+makeLayoutList :: [t] -> [(t,t)] |
|
85 | 119 |
makeLayoutList [] = [] |
86 | 120 |
makeLayoutList (l:ls) = (l,l):(makeLayoutList ls) |
87 | 121 |
|
122 |
+changeLayout :: Maybe String -> X () |
|
88 | 123 |
changeLayout a = |
89 | 124 |
case a of |
90 |
- Just x -> sendMessage $ JumpToLayout x |
|
125 |
+ Just r -> sendMessage $ JumpToLayout r |
|
91 | 126 |
_ -> error "this shouldn't happen" |
92 | 127 |
|
93 |
- |
|
94 | 128 |
-- This is the currently used layout change |
95 | 129 |
-- activated with Meta+; |
96 | 130 |
-- It displays the relevant list of layouts for the current display |
... | ... |
@@ -114,9 +143,9 @@ nchooseLayout conf = do |
114 | 143 |
_ -> defaultList |
115 | 144 |
|
116 | 145 |
case a of |
117 |
- Just x -> do |
|
118 |
- sendMessage $ JumpToLayout x |
|
119 |
- dzenConfig myDzenConfig x |
|
146 |
+ Just r -> do |
|
147 |
+ sendMessage $ JumpToLayout r |
|
148 |
+ dzenConfig myDzenConfig r |
|
120 | 149 |
return () |
121 | 150 |
where |
122 | 151 |
wrapped_loName :: X [Char] |
... | ... |
@@ -137,13 +166,7 @@ nchooseLayout conf = do |
137 | 166 |
|
138 | 167 |
|
139 | 168 |
|
140 |
-chooseLayout :: GSConfig String -> X () |
|
141 |
-chooseLayout conf = do |
|
142 |
- a <- gridselect conf $ makeLayoutList ["Tall", "ThreeCol", "Accordion", "Full", "Tabbed", "Spiral", "Wide", "ThreeWide", "WideAccordion", "Writing", |
|
143 |
- "WritingNew", "Gridding", "TwoPane", "OneBig"] |
|
144 |
- changeLayout a |
|
145 |
- return () |
|
146 |
- |
|
169 |
+myPP :: PP |
|
147 | 170 |
myPP = sjanssenPP { |
148 | 171 |
ppCurrent = xmobarColor "grey" "white", |
149 | 172 |
ppHidden = xmobarColor "red" "black", |
... | ... |
@@ -151,6 +174,7 @@ myPP = sjanssenPP { |
151 | 174 |
ppTitle = xmobarColor "green" "" . shorten 126 |
152 | 175 |
} |
153 | 176 |
|
177 |
+myManageHook :: Query (Endo (StackSet WorkspaceId (Layout Window) Window ScreenId ScreenDetail)) |
|
154 | 178 |
myManageHook = composeAll |
155 | 179 |
[ |
156 | 180 |
(role =? "gimp-toolbox" <||> role =? "gimp-image-winow") --> (ask >>= doF . W.sink) |
... | ... |
@@ -169,8 +193,10 @@ doCopy :: WorkspaceId -> ManageHook |
169 | 193 |
doCopy i = doF . copyWin i =<< ask |
170 | 194 |
copyWin i a = copyWindow a i |
171 | 195 |
|
196 |
+viewShift :: WorkspaceId -> Query (Endo (StackSet WorkspaceId l Window ScreenId sd)) |
|
172 | 197 |
viewShift = doF . liftM2 (.) W.greedyView W.shift |
173 | 198 |
|
199 |
+dShow :: String -> X () |
|
174 | 200 |
dShow = dzenConfig myDzenConfig |
175 | 201 |
|
176 | 202 |
copyNSwitch windows target = do |
... | ... |
@@ -183,29 +209,32 @@ shiftNSwitch windows target = do |
183 | 209 |
windows $ W.greedyView target |
184 | 210 |
dShow target |
185 | 211 |
|
212 |
+switchWorkspace :: WorkspaceId -> X () |
|
186 | 213 |
switchWorkspace target = do |
187 | 214 |
windows $ W.greedyView target |
188 | 215 |
dShow target |
189 | 216 |
|
217 |
+maximizeSwitch :: X () |
|
190 | 218 |
maximizeSwitch = do |
191 | 219 |
withFocused $ sendMessage . maximizeRestore |
192 | 220 |
windows W.focusUp |
193 | 221 |
|
222 |
+maximizeFlop :: X () |
|
194 | 223 |
maximizeFlop = do |
195 | 224 |
windows W.focusUp |
196 | 225 |
withFocused $ sendMessage . maximizeRestore |
197 | 226 |
|
227 |
+main :: IO () |
|
198 | 228 |
main = do |
199 | 229 |
xmproc <- spawnPipe "/home/edwlan/.cabal/bin/xmobar /home/edwlan/.xmobarrc" |
200 | 230 |
--xmproc1 <- spawnPipe "/home/edwlan/.cabal/bin/xmobar /home/edwlan/.xmobarrc1" |
201 |
- xmonad $ defaultConfig |
|
202 |
- { |
|
231 |
+ xmonad $ ewmh defaultConfig { |
|
203 | 232 |
manageHook = myManageHook <+> manageSpawn <+> manageHook defaultConfig, |
204 | 233 |
--handleEventHook = handleTimerEvent, |
205 | 234 |
layoutHook = maximize myLayout, |
206 |
- logHook = dynamicLogWithPP myPP { |
|
235 |
+ logHook = takeTopFocus >> (dynamicLogWithPP myPP { |
|
207 | 236 |
ppOutput = hPutStrLn xmproc |
208 |
- }, |
|
237 |
+ }), |
|
209 | 238 |
modMask = mod4Mask, |
210 | 239 |
focusFollowsMouse = False, |
211 | 240 |
XMonad.workspaces = ["web", "terminal", "1", "2", "3", "4", "5", "6", "images", "IM"] |
... | ... |
@@ -24,8 +24,8 @@ export MPD_HOST=srv2.elangley.org |
24 | 24 |
|
25 | 25 |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) |
26 | 26 |
# Example format: plugins=(rails git textmate ruby lighthouse) |
27 |
-fpath=(~/.zsh.d/completion $fpath) |
|
28 |
-plugins=(git ruby rails osx brew zsh-syntax-highlighting python git-extra git-flow battery scd) |
|
27 |
+fpath=(~/.zsh.d/completion ~/.zsh.d/functions $fpath) |
|
28 |
+plugins=(git ruby rails osx brew zsh-syntax-highlighting python git-extra git-flow battery) |
|
29 | 29 |
|
30 | 30 |
source $ZSH/oh-my-zsh.sh |
31 | 31 |
unsetopt correct_all |
... | ... |
@@ -67,6 +67,7 @@ cmdtermtitle() { |
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
if [[ $TERM != "linux" ]]; then |
70 |
+ autoload -U add-zsh-hook |
|
70 | 71 |
add-zsh-hook preexec cmdtermtitle |
71 | 72 |
fi |
72 | 73 |
|
... | ... |
@@ -187,6 +188,7 @@ alias cp.='gcp --target-directory=.' |
187 | 188 |
alias notep='note post' |
188 | 189 |
alias bower='noglob bower' |
189 | 190 |
alias node='nodejs' |
191 |
+alias find='noglob find' |
|
190 | 192 |
|
191 | 193 |
echo "done variables and options" |
192 | 194 |
|
... | ... |
@@ -3,8 +3,12 @@ |
3 | 3 |
# We have to supress less and grep for the pattern to work accurately |
4 | 4 |
if [[ $1 == "" ]]; then |
5 | 5 |
ps ax | egrep -v '(grep|pslist|less)' | less |
6 |
-else |
|
6 |
+elif [[ $2 == "" ]]; then |
|
7 | 7 |
ps ax | egrep -v '(grep|pslist|less)' | less -p $* |
8 |
+else |
|
9 |
+ opts=$1 |
|
10 |
+ shift |
|
11 |
+ ps "ax$opts" | egrep -v '(grep|pslist|less)' | less -p $* |
|
8 | 12 |
fi |
9 | 13 |
|
10 | 14 |
|