cf8 avatar cf8 committed 592a41a

cleanup and some changes to xmonad.hs and zshrc

Comments (0)

Files changed (4)

 " wrap and break the lines
 set wrap
 set linebreak
-" set pastetoggle=
+set pastetoggle=
 
 " scroll jump
 set scrolljump=8
 set softtabstop=4
 set shiftwidth=4
 set smarttab
-set expandtab
+"set expandtab
 
 " colors and font
 set background=dark
 
 " --- Hotkeys --- "
 
-" no insert mode 
-imap >Ins> <Esc>i
-
 " visual shifting without exiting visual mode!
 vnoremap < <gv
 vnoremap > >gv
 
-" copy-paste
-vmap <C-C> "+ya
-vmap <C-X> "+xa
-map <C-V> <esc>"+gpa
-
-" close buffer on shift-q
-nmap <S-q> <esc>:bd<cr>a
-
-" Space = PageDown, Shift-Space = PageUp
-nmap <Space> <PageDown>
-nmap <S-Space> <PageUp>
-
-" Shift-insert fix
-map <S-Insert> <MiddleMouse>
-map! <S-Insert> <MiddleMouse>
+" " Shift-insert fix
+" map <S-Insert> <MiddleMouse>
+" map! <S-Insert> <MiddleMouse>
 
 " ZenCoding
 let g:user_zen_expandabbr_key = '<c-e>'
 vmap ; <esc>
 
 au BufNewFile,BufRead *.less set ft=css
-au BufNewFile,BufRead *.js inoremap {<CR> {<CR>};<C-O>O
 
 " Command-T binds and settings
 nmap ` :CommandTBuffer<cr><Down>
 let g:CommandTMaxFiles=20000
 let g:CommandTSelectPrevMap=['<C-p>', '<C-k>', '<Esc>OA', '<Up>']
 
-nmap <F5> :JSHint<cr>
-
 set notimeout
 set ttimeout
 set timeoutlen=100
+
 set cm=blowfish
 
 " work machine specific settings
 let hostname = substitute(system('hostname'), '\n', '', '')
 if hostname == 'harvester'
-    autocmd BufNewFile,BufRead /srv/http/* set nowrap tabstop=2 shiftwidth=2 softtabstop=2 expandtab
+    autocmd BufNewFile,BufRead /srv/http/* set tabstop=2 shiftwidth=2 softtabstop=2 expandtab
     autocmd BufRead,BufNewFile *.tp setfiletype php
     autocmd BufRead,BufNewFile *.tpt setfiletype php.html
     autocmd BufRead,BufNewFile *.php setfiletype php.html 
 endif
 
-autocmd BufRead,BufNewFile *.coffee set nowrap tabstop=2 shiftwidth=2 softtabstop=2 expandtab
+autocmd BufRead,BufNewFile *.coffee set tabstop=2 shiftwidth=2 softtabstop=2 expandtab
 
 let g:showmarks_include="abcdef"
 
-nmap <F8> :TagbarOpenAutoClose<CR> 
-
 " sessions (thanks to nl_0)
 set sessionoptions-=options
 set sessionoptions+=localoptions
-
 nmap <leader>ms :mks ~/.vim/sessions/
 nmap <leader>ws :exe "mks! " . v:this_session<cr>
 nmap <leader>ls :so ~/.vim/sessions/
 endfun
 map <F2> :call RangerChooser()<CR>
 
-"au BufWritePost *.coffee silent CoffeeMake! -b | cwindow | redraw!
-
-
-" highlight OverLength ctermbg=88 ctermfg=white guibg=#592929
-" au BufRead,BufNewFile *.js match OverLength /\%81v.\+/
-
 xset +fp ~/.fonts &
 xset fp rehash &
 
-# no more capslock key!
-xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' &
-
-eval $(gpg-agent --daemon) &
+# no more capslock key! -- no need anymore
+# xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' &
 
 #run lastfm mpd scrobbler
 pidof mpdscribble >& /dev/null
 # compositor, fuck you compositor
 # compton &
 
-# # set screens
-# xrandr --output VGA1 --mode 1280x1024 --right-of HDMI1 &
-# xrandr --output HDMI1 --mode 1920x1080 &
+# set screens
+$( sleep 1 ; xrandr --output VGA1 --mode 1280x1024 --right-of HDMI1 --output HDMI1 --mode 1920x1080 --primary) &
 
 # run wm
 exec xmonad
 main = xmonad   =<< statusBar cmd pp kb conf 
     where 
     uhook = withUrgencyHook NoUrgencyHook
-    cmd = "xmobar"
+    cmd = "xmobar -x 1"
     pp = customPP
     kb = toggleStrutsKey
     conf = uhook $ ewmh myConfig 
             , [ className =? t --> doShift	(workspaces' !! 0)	| t <- myWebs   ]
             , [ resource  =? c --> doShift	(workspaces' !! 1)	| c <- myChats  ]
             , [ className =? t --> doShift	(workspaces' !! 2)	| t <- myFiles  ]
-            , [ className =? c --> doShift	(workspaces' !! 3)	| c <- myWorks  ]
+            , [ resource  =? c --> doShift	(workspaces' !! 3)	| c <- myWorks  ]
             , [ resource  =? t --> doShift	(workspaces' !! 4)	| t <- myTerms  ]
             , [ className =? c --> doShift	(workspaces' !! 5)	| c <- myMiscs  ]
             , [ className =? c --> doFloat						| c <- myFloats ]
         myCFloats = ["Xmessage","Save As...","XFontSel","Nitrogen", "Wine"]
         myCNames  = ["bashrun"]
         myFiles   = ["Pcmanfm","Nautilus","Lanikai", "Thunderbird"]
-        myWorks   = ["Gvim"]
+        myWorks   = ["vim"]
 
 -- colors and font
 
     , ((modMask,               xK_l     ), sendMessage Expand)
 
     -- restart
-    , ((modMask .|. shiftMask, xK_r     ), spawn "killall conky dzen2 ; xmonad --recompile; xmonad --restart") 
+    , ((modMask .|. shiftMask, xK_r     ), spawn "xmonad --recompile; xmonad --restart") 
 
     -- applications
     , ((modMask .|. shiftMask, xK_f     ), runOrRaise "iron" (className =? "Iron") )
     , ((modMask .|. shiftMask, xK_p     ), runOrRaise "pcmanfm" (className =? "Pcmanfm") ) 
-    , ((modMask .|. shiftMask, xK_g     ), runOrRaise "gvim" (className =? "Gvim") ) 
+    , ((modMask .|. shiftMask, xK_g     ), raiseMaybe (runInTerm "-name vim" "vim --servername main") (resource =? "vim"))
     , ((modMask .|. shiftMask, xK_Return), raiseMaybe (runInTerm "-name tmux" "/home/cf8/bin/runtmux") (resource =? "tmux"))
     , ((modMask .|. shiftMask, xK_m     ), raiseMaybe (runInTerm "-name mcabber" "dtach -A /tmp/mcabber mcabber") (resource =? "mcabber"))
     , ((0                    , xK_Scroll_Lock ), spawn "sflock") 
 
     -- tagkeys
     , ((modMask,               xK_1     ), windows (viewOnScreen 0 ( workspaces' !! 0 ) ))
-    , ((modMask,               xK_2     ), windows (viewOnScreen 0 ( workspaces' !! 1 )))
-    , ((modMask,               xK_3     ), windows (viewOnScreen 0 ( workspaces' !! 2 )))
-    , ((modMask,               xK_q     ), windows (viewOnScreen 0 ( workspaces' !! 3 )))
+    , ((modMask,               xK_2     ), windows (viewOnScreen 1 ( workspaces' !! 1 )))
+    , ((modMask,               xK_3     ), windows (viewOnScreen 1 ( workspaces' !! 2 )))
+    , ((modMask,               xK_q     ), windows (viewOnScreen 1 ( workspaces' !! 3 )))
     , ((modMask,               xK_w     ), windows (viewOnScreen 0 ( workspaces' !! 4 )))
-    , ((modMask,               xK_e     ), windows (viewOnScreen 0 ( workspaces' !! 5 )))
+    , ((modMask,               xK_e     ), windows (viewOnScreen 1 ( workspaces' !! 5 )))
 
     ]
+    -- ++
+    -- [((m .|. modMask, k), windows $ f i)
+    --     | (i, k) <- zip (XMonad.workspaces conf) [xK_1,xK_2,xK_3,xK_q,xK_w,xK_e]
+    --     , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
+
     ++
     [((m .|. modMask, k), windows $ f i)
         | (i, k) <- zip (XMonad.workspaces conf) [xK_1,xK_2,xK_3,xK_q,xK_w,xK_e]
 {
     mplayer `youtube-dl -g ${@}`
 }
+alias gt="google-translate"
+alias rcd="sudo systemctl"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.