Updates

abd742770f76c97d46a1460956b3bcc7eafd8840
Alexis Sellier committed ago 1 parent c1bda479
.vimrc +14 -6
49 49
set virtualedit=block
50 50
set tags+=.tags
51 51
set tags+=codex.tags
52 52
set undofile
53 53
set gdefault                        " Always use /g with %s/
54 -
set colorcolumn=80
54 +
set colorcolumn=100
55 55
set list
56 56
set listchars=tab:·\ ,eol:¬,trail:█
57 57
set fillchars=diff:\ ,vert:│
58 58
set diffopt=filler,vertical,foldcolumn:0
59 59
set statusline=%<%f\ %h%m%r%=%y\ \ %-14(%{&sw}:%{&sts}:%{&ts}%)%-14.(%l,%c%V%)\ %P
60 60
set guicursor=n-v-c:block-Cursor/lCursor-blinkon0,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor
61 -
set spelllang=en_us
61 +
set spelllang=en_us,en_gb
62 +
set completeopt=menu
62 63
63 64
" We don't use tabs much, but at least try and show less cruft
64 65
function! Tabline()
65 66
  let s = ''
66 67
  for i in range(tabpagenr('$'))
109 110
au FileType lua         setlocal       sw=2 expandtab
110 111
au FileType sh,zsh      setlocal ts=2  sw=2 noexpandtab
111 112
au FileType vim,ruby    setlocal sts=2 sw=2 expandtab
112 113
au FileType help        setlocal ts=4  sw=4 noexpandtab
113 114
au FileType txt         setlocal noai nocin nosi inde= wrap linebreak
114 -
au FileType pandoc      setlocal nonumber
115 -
au FileType markdown    setlocal nonumber
116 -
au FileType rst         setlocal nonumber sw=2 expandtab
117 -
au FileType fountain    setlocal nonumber noai nocin nosi inde= wrap linebreak
115 +
au FileType pandoc      setlocal nonumber spell
116 +
au FileType markdown    setlocal nonumber spell
117 +
au FileType rst         setlocal nonumber sw=2 expandtab spell
118 +
au FileType fountain    setlocal nonumber noai nocin nosi inde= wrap linebreak spell
119 +
au FileType tex         setlocal spell
118 120
119 121
au BufRead,BufNewFile *.md        setf markdown
120 122
au BufRead,BufNewFile *.tex       setf tex
121 123
au BufRead,BufNewFile *.todo      setf todo
122 124
au BufRead,BufNewFile *.tikz      setf tex
184 186
185 187
" Easy command mode switch
186 188
inoremap kj <Esc>
187 189
inoremap <C-l> <C-x><C-l>
188 190
191 +
" Correct spelling mistakes
192 +
inoremap <C-s> <c-g>u<Esc>[s1z=`]a<c-g>u
193 +
189 194
" Jump to high/low and scroll
190 195
noremap <C-k> H{
191 196
noremap <C-j> L}
192 197
193 198
" Move easily between ^ and $
311 316
312 317
  call plug#end()
313 318
endif
314 319
315 320
if has("nvim")
321 +
  " Make sure we dont' load the rust cargo plugin from rust.vim!
322 +
  let g:loaded_rust_vim_plugin_cargo = 1
323 +
  " Don't add errors to quickfix if rustfmt fails.
316 324
  let g:rustfmt_fail_silently = 1
317 325
  autocmd BufWritePre *.rs :RustFmt
318 326
endif
319 327
320 328
"
.xmobarrc +1 -2
15 15
          , Run Date       "%b %d %Y %H:%M" "date" 10
16 16
          , Run DiskU      [("/", "<used>/<size>"), ("/home", "<used>/<size>")] [] 20
17 17
          , Run Com        "xmobar-unison-status" [] "dropbox" 10
18 18
          , Run Com        "todo-widget" [] "todo" 10
19 19
          , Run Com        "xmobar-brightness" [] "brightness" 10
20 -
          , Run Com        "seedbox-status" [] "seedbox" 10
21 20
          , Run CoreTemp   [ "--template", "<core0>° <core1>°" ] 50
22 21
          , Run Wireless   "wlp2s0" [ "--template", "☎ <essid>/<quality>"] 10
23 22
          , Run Battery    [ "--template", "⌁ <left>%" ] 100
24 23
          , Run StdinReader
25 24
          ]
26 25
     , sepChar = "%"
27 26
     , alignSep = "}{"
28 -
     , template = "%StdinReader%  }{ %todo%   %brightness%   %battery%   %wlp2s0wi%   %seedbox%   %dropbox%   %multicpu% · %memory% · %disku% · %dynnetwork%   <fc=#aaaaaa>%date%</fc> "
27 +
     , template = "%StdinReader%  }{ %todo%   %brightness%   %battery%   %wlp2s0wi%   %dropbox%   %multicpu% · %memory% · %disku% · %dynnetwork%   <fc=#aaaaaa>%date%</fc> "
29 28
}
.xmonad/xmonad.hs +6 -3
61 61
        , normalBorderColor  = "#1F1F1F"
62 62
        , borderWidth        = 1
63 63
        , handleEventHook    = mconcat [docksEventHook, handleEventHook def]
64 64
        , keys               = myKeys home
65 65
        , logHook            = dynamicLogWithPP (barConfig xmproc)
66 -
        , layoutHook         = avoidStruts $ smartBorders $ myLayout
66 +
        , layoutHook         = smartBorders $ avoidStruts $ myLayout
67 67
        , manageHook         = floatNextHook <+> manageDocks <+> manageHook def
68 68
        , startupHook        = startup <+> docksStartupHook
69 69
        } `additionalKeysP` myXF86Keys
70 70
  where
71 71
    myLayout = layoutHook def
72 72
    myXF86Keys =
73 -
       [ ("<XF86MonBrightnessUp>",              safeSpawn "xbacklight" ["-inc", "10"])
74 -
       , ("<XF86MonBrightnessDown>",            safeSpawn "xbacklight" ["-dec", "10"])
73 +
       [ ("<XF86MonBrightnessUp>",      safeSpawn "light"  ["-A", "5"])
74 +
       , ("<XF86MonBrightnessDown>",    safeSpawn "light"  ["-U", "5"])
75 +
       , ("<XF86AudioRaiseVolume>",     safeSpawn "amixer" ["-q", "sset", "Master", "2+"])
76 +
       , ("<XF86AudioLowerVolume>",     safeSpawn "amixer" ["-q", "sset", "Master", "2-"])
77 +
       , ("<XF86AudioMute>",            safeSpawn "amixer" ["-q", "sset", "Master", "toggle"])
75 78
       ]
76 79
77 80
startup :: X ()
78 81
startup = do
79 82
    -- Open a terminal if none are open.
.zshrc +2 -0
9 9
  xset s off                           #
10 10
  xset m 7/5 0                         # Pointer settings
11 11
  setxkbmap us -variant altgr-intl
12 12
fi
13 13
14 +
export GPG_TTY=$(tty)
15 +
14 16
# `ls` colors
15 17
if [ -f ~/.dircolors ]; then
16 18
  eval $(dircolors -b ~/.dircolors)
17 19
fi
18 20
bin/xmobar-unison-status added +14 -0
1 +
#!/bin/sh
2 +
3 +
status="$(systemctl --user is-active dropbox)"
4 +
5 +
case "$status" in
6 +
	"active")
7 +
		if $(unison dropbox -testserver); then
8 +
			echo "<fc=aquamarine>✔</fc>"
9 +
		else
10 +
			echo "<fc=maroon>↯</fc>"
11 +
		fi ;;
12 +
	*)
13 +
		echo "<fc=maroon>✘</fc>" ;;
14 +
esac