A whole lot of updates

33b72c4e93be427860114754c9963e3142323df7
Alexis Sellier committed ago 1 parent a56cbe61
.gitconfig +3 -0
51 51
[commit]
52 52
  gpgsign = true
53 53
54 54
[pull]
55 55
  ff = only
56 +
57 +
[init]
58 +
  defaultBranch = master
.gnupg/gpg-agent.conf +1 -0
1 1
pinentry-program /usr/bin/pinentry-curses
2 +
pinentry-timeout 3600
.profile +1 -0
7 7
export PATH=~/bin:~/.local/bin:~/.cabal/bin:~/.cargo/bin:~/.gem/ruby/2.6.0/bin:~/.npm-packages/bin:$PATH
8 8
export EDITOR=nvim
9 9
export VISUAL=nvim
10 10
export MOZ_USE_XINPUT2=1 # Pixel scrolling in Firefox
11 11
export RIPGREP_CONFIG_PATH=$HOME/.rgrc
12 +
export PATH="$HOME/.radicle/bin:$PATH"
12 13
13 14
systemctl --user start share-sync
14 15
15 16
if command -v xinput >/dev/null; then
16 17
  prop="$(xinput | rg Touchpad | rg -o 'id=[0-9]+' | sed 's/id=//')"
.vim/after/syntax/solidity.vim +2 -1
1 -
syn match solKeyword /\(msg\.\)\@<=\(sender\|value\)/
1 +
syn match   solKeyword /\(msg\.\)\@<=\(sender\|value\)/
2 +
syn keyword solKeyword override immutable
.vim/coc-settings.json +6 -0
2 2
  "diagnostic.virtualText": true,
3 3
  "diagnostic.virtualTextPrefix": " ✗ ",
4 4
  "diagnostic.virtualTextLines": 1,
5 5
  "diagnostic.enableSign": false,
6 6
  "diagnostic.enableMessage": "never",
7 +
  "diagnostic.messageDelay": 0,
8 +
  "diagonstic.virtualTextCurrentLineOnly": false,
9 +
  "diagnostic.virtualTextLines": 1,
10 +
  "diagnostic.maxWindowHeight": 12,
11 +
  "diagnostic.format": "%message",
12 +
  "suggest.fixInsertedWord": false,
7 13
  "codeLens.enable": false,
8 14
  "coc.preferences.useQuickfixForLocations": true,
9 15
  "coc.preferences.bracketEnterImprove": false,
10 16
  "coc.preferences.snippets.enable": false,
11 17
  "coc.preferences.formatOnSaveFiletypes": [
.vim/syntax/todo.vim +7 -5
1 1
" Vim syntax file
2 2
" Language:	    Todo file
3 3
" Maintainer:	Alexis Sellier
4 4
" File Types:	.todo
5 5
"
6 -
syntax match todoOther    '^.*'
7 -
syntax match todoDone     '^\s*\[[Xx]\].*'
8 -
syntax match todoNormal   '^\s*\[ \]\s*.*'
9 -
syntax match todoComment  '^\s*%.*'
10 -
syntax match todoCheckbox '^\s*\[\s\]'
6 +
syntax match todoOther       '^.*'
7 +
syntax match todoDone        '^\s*\[[Xx]\].*'
8 +
syntax match todoNormal      '^\s*\[ \]\s*.*'
9 +
syntax match todoComment     '^\s*%.*'
10 +
syntax match todoCheckbox    '^\s*\[\s\]'
11 +
syntax match todoUrgent      '^\s*\[!\]\s.*$'
12 +
syntax match todoImportant   '\s!!$'
.vimrc +16 -2
116 116
au FileType c,cpp,glsl  setlocal number ts=8  sw=8 noexpandtab
117 117
au FileType lua         setlocal number       sw=2 expandtab
118 118
au FileType sh,zsh      setlocal number sts=2 sw=2 expandtab
119 119
au FileType vim,ruby    setlocal number sts=2 sw=2 expandtab
120 120
au FileType help        setlocal number ts=4  sw=4 noexpandtab
121 +
au FileType solidity    setlocal number ts=4  sw=4 expandtab nowrap
121 122
au FileType rust        setlocal number signcolumn=yes nowrap colorcolumn=100 textwidth=100
122 123
au FileType plain       setlocal nonumber noai nocin nosi inde= wrap linebreak textwidth=80
123 124
au FileType pandoc      setlocal nonumber
124 125
au FileType markdown    setlocal nonumber conceallevel=2
125 126
au FileType rst         setlocal nonumber sw=2 expandtab wrap linebreak textwidth=80
156 157
  let c = col(".")
157 158
  %s/\s\+$//e
158 159
  call cursor(l, c)
159 160
endfunction
160 161
162 +
" Git gutter
163 +
let g:gitgutter_sign_modified = '±'
164 +
let g:gitgutter_sign_modified_removed = '±'
165 +
let g:gitgutter_map_keys = 0
166 +
167 +
nmap <Leader>gs <Plug>(GitGutterStageHunk)
168 +
nmap <Leader>gu <Plug>(GitGutterUndoHunk)
169 +
161 170
" Markdown, highlight YAML frontmatter
162 171
let g:vim_markdown_frontmatter = 1
163 172
164 173
" We use a POSIX shell
165 174
let g:is_posix = 1
322 331
  Plug 'vim-pandoc/vim-pandoc-syntax'
323 332
  Plug 'junegunn/goyo.vim'
324 333
  Plug 'vim-scripts/fountain.vim'
325 334
  Plug 'exu/pgsql.vim'
326 335
  Plug 'hail2u/vim-css3-syntax'
327 -
  Plug 'lervag/vimtex'
336 +
  Plug 'lervag/vimtex', { 'for': ['tex'] }
328 337
  Plug 'itchyny/vim-gitbranch'
329 338
  Plug 'cespare/vim-toml'
330 339
  Plug 'rust-lang/rust.vim'
331 -
  Plug 'neoclide/coc.nvim', {'branch': 'release', 'for': ['rust'] }
340 +
  Plug 'neoclide/coc.nvim', { 'branch': 'release', 'for': ['rust'] }
332 341
  Plug 'tomlion/vim-solidity'
342 +
  Plug 'airblade/vim-gitgutter'
343 +
  Plug 'leafgarland/typescript-vim'
333 344
334 345
  call plug#end()
335 346
endif
336 347
337 348
"
378 389
endif
379 390
380 391
" coc.vim
381 392
function! SetupCoc()
382 393
  nmap <silent> gd           <Plug>(coc-definition)
394 +
  nmap <silent> gy           <Plug>(coc-type-definition)
383 395
  nmap <silent> gi           <Plug>(coc-implementation)
384 396
  nmap <silent> gr           <Plug>(coc-references)
397 +
  nmap <silent> gj           <Plug>(coc-diagnostic-next)
398 +
  nmap <silent> gk           <Plug>(coc-diagnostic-prev)
385 399
  nmap <silent> <leader>/    :CocList --interactive symbols<CR>
386 400
387 401
  " This is a kind of hack to make <C-Y> not trigger snippet expansion.
388 402
  " We use <C-p><C-n> to insert the selection without triggering anything, and
389 403
  " then close the popup.
.xinitrc +1 -1
4 4
#
5 5
set -uo pipefail
6 6
7 7
. ~/bin/toggle-displays
8 8
9 -
[ -f ~/.profile ]   && . ~/.profile
10 9
[ -f ~/.synaptics ] && . ~/.synaptics
11 10
12 11
setxkbmap -option compose:lwin
13 12
setxkbmap -option compose:rwin
13 +
setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl
14 14
15 15
if [ -f ~/.Xmodmap ]; then
16 16
  xmodmap ~/.Xmodmap;
17 17
fi
18 18
.zshrc +8 -7
47 47
bindkey '^R' history-incremental-search-backward
48 48
49 49
#
50 50
# ls
51 51
#
52 -
LS_IGNORE="Dropbox" # ~/Dropbox is symlinked.
53 -
54 -
alias ls="/bin/ls -I $LS_IGNORE --group-directories-first"
55 -
alias l="/bin/ls -lFGhL --color=auto -I $LS_IGNORE --group-directories-first"
56 -
alias ll='/bin/ls -lFAGh --color=auto --group-directories-first'
52 +
alias l="ls -lFGhL --color=auto --group-directories-first"
53 +
alias ll='ls -lFAGh --color=auto --group-directories-first'
57 54
58 55
#
59 56
# Aliases
60 57
#
61 58
alias g='git'
64 61
alias mv='/bin/mv -i'
65 62
alias ..='cd ..'
66 63
alias img='sxiv -a'
67 64
alias df='df -h'
68 65
alias sys='systemctl'
66 +
alias s='systemctl'
69 67
alias x='startx'
70 68
alias web='chromium &'
71 69
alias e=$EDITOR
72 70
alias pdf='mupdf'
73 71
alias webserver='python2 -m SimpleHTTPServer'
74 72
alias pacman='sudo pacman --color=auto'
75 -
alias netctl='sudo netctl'
76 73
alias vim=nvim
77 74
alias clip='xclip -sel clip'
78 75
alias irc='weechat'
79 76
alias cloc='tokei'
80 77
alias shred='shred -uvz'
81 78
alias diskusage='ncdu'
82 79
alias calc=kalk
83 -
alias tree=tree-git-ignore
80 +
alias t=tree-git-ignore
81 +
82 +
function weather {
83 +
  curl "https://v2.wttr.in/$1"
84 +
}
84 85
85 86
function tree-git-ignore {
86 87
  local ignored=$(git ls-files -ci --others --directory --exclude-standard)
87 88
  local ignored_filter=$(echo "$ignored" \
88 89
    | egrep -v "^#.*$|^[[:space:]]*$" \
bin/record-window +2 -3
20 20
tmp="$(mktemp).gif"
21 21
22 22
let x=$x+1
23 23
let y=$y+1
24 24
25 -
OUT="$NAME-$now.gif"
25 +
OUT="$NAME-$now.webm"
26 26
27 27
ffmpeg -v warning \
28 28
         -video_size ${w}x${h} \
29 29
             -framerate 6 \
30 30
             -f x11grab \
31 31
             -i :0.0+${x},${y} \
32 -
             -vf fps=$FPS,scale=iw*$SCALE:ih*$SCALE:flags=lanczos \
33 -
             -gifflags +transdiff -y \
32 +
             -vf fps=$FPS,scale=iw*$SCALE:ih*$SCALE \
34 33
             "$OUT"
35 34
36 35
echo "saved to '$OUT'"
37 36
38 37
# TIP: convert FILE.gif -strip -coalesce -layers Optimize OPTIMIZED.gif