[
  {
    "path": ".Xdefaults",
    "content": "!!!  MISC  !!!\nXcursor.theme:            redglass\nXcursor.size:             28\n\nEclipse*fontList:         -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*\ngitk*font:                -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*\n\nxpdf*background:          #eeeeec\nxpdf*fontList:            -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*\nxpdf*foreground:          #2e3436\nxpdf*initialZoom:         width\nxpdf*shadowThickness:     1\n\nurxvt*foreground:         #bebebe\nurxvt*background:         #202020\n!urxvt*background:         #412e21\nurxvt*boldMode:           false\nurxvt*meta8:              false\n!urxvt*letterSpace: +1\n!urxvt*font:               xft:Inconsolata:pixelsize=12:dpi=96\n!urxvt*font:               -xos4-terminus-medium-r-normal--14-*-*-*-*-*-iso10646-*\nurxvt*font:               xft:DejaVu Sans Mono:pixelsize=12\n!urxvt*font:               xft:Ubuntu Mono:style=Regular:pixelsize=14\n!urxvt*font:               xft:Droid Sans Mono:style=Regular:pixelsize=13\n\n\n!!!  URXVT  !!!\nurxvt*cursorColor:        #ffaa77\nurxvt*matcher.button:     1\nurxvt*matcher.pattern.1:  \\\\bwww\\\\.[\\\\w-]+\\\\.[\\\\w./?&@#-=]*[\\\\w/-]\nurxvt*matcher.pattern.2:  \\\\bhttps?:\\/\\/[\\\\w-.]*\\/[\\\\w./?&@#-=]*.(jpg|jpeg|png)\nurxvt*matcher.launcher.2: feh $0\nurxvt*perl-lib:           .urxvt\nurxvt*perl-ext-common:    default,matcher,font-size\nurxvt*urlLauncher:        firefox\nurxvt*pointerColor:       yellow\nurxvt*saveLines:          10000\nurxvt*scrollBar:          false\nurxvt*termName:           rxvt-256color\nurxvt*tripleclickwords:   true\nurxvt*underlineColor:     #CC6666\nurxvt.keysym.C-Up:        perl:font-size:increase\nurxvt.keysym.C-Down:      perl:font-size:decrease\n!urxvt*fading:            20\n!urxvt*shading:           5\n!urxvt*transparent:       true\n\n! black\nurxvt*color0:   #000000\nurxvt*color8:   #505050\n! red\nurxvt*color1:   #ff669d\nurxvt*color9:   #d04c63\n! green\nurxvt*color2:   #B3D38C\nurxvt*color10:  #93D6A9\n! yellow\nurxvt*color3:   #efaf7f\nurxvt*color11:  #f4a45f\n! blue\nurxvt*color4:   #344863\nurxvt*color12:  #80c0d9\n! magenta\nurxvt*color5:   #CCA3B3\nurxvt*color13:  #AA66AA\n! cyan\nurxvt*color6:   #0b94a0\nurxvt*color14:  #96cccc\n! white\nurxvt*color7:   white\nurxvt*color15:  darkgray\n\n! black\nurxvt2*color0:   #000000\nurxvt2*color8:   #505050\n! red\nurxvt2*color1:   #ff669d\nurxvt2*color9:   #d04c63\n! green\nurxvt2*color2:   #B3D38C\nurxvt2*color10:  #93D6A9\n! yellow\nurxvt2*color3:   #efaf7f\nurxvt2*color11:  #f4a45f\n! blue\nurxvt2*color4:   #344863\nurxvt2*color12:  #80c0d9\n! magenta\nurxvt2*color5:   #CCA3B3\nurxvt2*color13:  #AA66AA\n! cyan\nurxvt2*color6:   #0b94a0\nurxvt2*color14:  #96cccc\n! white\nurxvt2*color7:   white\nurxvt2*color15:  darkgray\n\n! Pnevma 2\n!urxvt*color0:  #2F2E2D\n!urxvt*color8:  #4A4845\n!urxvt*color1:  #A36666\n!urxvt*color9:  #D78787\n!urxvt*color2:  #8FA57E\n!urxvt*color10: #A9BA9C\n!urxvt*color3:  #D7AF87\n!urxvt*color11: #E4C9AF\n!urxvt*color4:  #7FA5BD\n!urxvt*color12: #A1BDCE\n!urxvt*color5:  #C79EC4\n!urxvt*color13: #D7BEDA\n!urxvt*color6:  #8ADBB4\n!urxvt*color14: #B1E7DD\n!urxvt*color7:  #D0D0D0\n!urxvt*color15: #EFEFEF\n\n!urxvt2*font:               -xos4-terminus-medium-r-normal--18-140-72-72-c-80-iso10646-1\n!urxvt2*font:               -*-terminus-medium-r-*-*-24-*-*-*-*-*-*-*\nurxvt2*foreground:         #222\n!urxvt2*background:         #f5f5f0\nurxvt2*background:         #ccc\n!urxvt2*font:               xft:DejaVu Sans Mono:pixelsize=16:style=bold\nurxvt2*font:               xft:DejaVu Sans Mono:pixelsize=12\n!urxvt2*font:               xft:DejaVu Sans Mono:pixelsize=16\n!urxvt2*foreground:         #000\n!urxvt2*background:         #eee\n!urxvt2*cursorColor:        #000\n\nurxvt2*cursorColor:        #2069ff\nurxvt2*boldMode:           true\nurxvt2*matcher.button:     1\nurxvt2*matcher.launcher.2: feh $0\nurxvt2*matcher.pattern.1:  \\\\bwww\\\\.[\\\\w-]+\\\\.[\\\\w./?&@#-]*[\\\\w/-]\nurxvt2*matcher.pattern.2:  \\\\bhttps?:\\/\\/[\\\\w-.]*\\/[\\\\w./?&@#=-]*.(jpg|jpeg|png)\nurxvt2*perl-ext-common:    default,matcher\nurxvt2*pointerColor:       yellow\nurxvt2*saveLines:          10000\nurxvt2*scrollBar:          false\nurxvt2*termName:           rxvt-256color\nurxvt2*tripleclickwords:   true\nurxvt2*underlineColor:     #CC6666\nurxvt2*urlLauncher:        iceweasel\n\n\n!!!  XTERM  !!!\nxterm*allowWindowOps:     true\n!xterm*background:         #eee\nxterm*boldMode:           true\nxterm*colorMode:          true\nxterm*cursorColor:        #f77\nxterm*dynamicColors:      true\nxterm*eightBitInput:      false\n!xterm*faceName:           DejaVu Sans Mono:pixelsize=12:style=bold\n!xterm*foreground:         #000\nxterm*printAtrributes:    2\nxterm*utf8:               true\n\nxterm*foreground:         #bebebe\nxterm*background:         #202020\n\nxft*dpi:                  96\nxft*antialias:            true\nxft*rgba:                 rgb\nxft*hinting:              true\n\n!black\n!*color0: #1B1D1E\n!*color8: #505354\n!*color0: #262729\n!*color8: #554444\n!red\n!*color1: #F92672\n!*color9: #FF669D\n!green\n!*color2: #A6E22E\n!*color10: #BEED5F\n!yellow\n!*color3: #FD971F\n!*color11: #E6DB74\n!blue\n!*color4: #66D9EF\n!*color12: #66D9EF\n!magenta\n!*color5: #9E6FFE\n!*color13: #9E6FFE\n!cyan\n!*color6: #5E7175\n!*color14: #A3BABF\n!white\n!*color7: #CCCCC6\n!*color15: #F8F8F2\n"
  },
  {
    "path": ".Xmodmap",
    "content": "remove Lock = Caps_Lock\nkeysym Caps_Lock = Control_L\nadd Control = Control_L\n\nkeycode 94 = parenleft parenright bar brokenbar bar brokenbar\nkeycode 92 = Multi_key\n"
  },
  {
    "path": ".bash_profile",
    "content": "if [[ -r ~/.profile ]]; then\n  . $HOME/.profile\nelse\n  echo 'No ~/.profile found.'\nfi\n\n# bashrc doesn't get sourced for login shells; do it here.\n\nif [[ $- == *i* ]]; then\n  if [[ -r ~/.bashrc ]]; then\n    . $HOME/.bashrc\n  else\n    echo 'No ~/.bashrc found.'\n  fi\nfi\n"
  },
  {
    "path": ".bashrc",
    "content": "if [[ -r $HOME/.shrc ]]; then\n  . $HOME/.shrc\nelse\n  echo 'No .shrc found.'\nfi\n\nshopt -s globstar\n\nstty werase undef\nbind '\\C-w:unix-filename-rubout'\n\nPROMPT_COMMAND=_prompt\n\n[[ -n $KITTY_WINDOW_ID ]] && trap 'printf \"\\033]0;%s\\007\" \"${BASH_COMMAND/_prompt/bash}\"' DEBUG\n"
  },
  {
    "path": ".config/git/config",
    "content": "; Config {{{1\n[user]\n  name       = Marco Hinz\n  email      = mh.codebro@gmail.com\n  signingKey = D56EA60F557FD8B6\n[core]\n  editor       = nvr --remote-wait-silent\n  excludesfile = ~/.config/git/ignore\n  autocrlf     = false\n  filemode     = false\n[init]\n  templatedir = ~/.config/git/template\n  defaultBranch = main\n[commit]\n  gpgsign = true\n[fetch]\n  prune = true\n  writeCommitGraph = true\n[pull]\n  ff = only\n[push]\n  default = current\n  followTags = true\n[rebase]\n  autosquash = true\n  autostash  = true\n[tag]\n  sort = version:refname\n[rerere]\n  enabled = true\n[advice]\n  detachedHead = no\n  statusHints = no\n[pack]\n  writeReverseIndex = true\n[diff]\n  tool                = nvr\n  algorithm           = patience\n  mnemonicPrefix      = true\n  compactionHeuristic = true\n[difftool \"nvr\"]\n  cmd = nvr -sd $LOCAL $REMOTE\n[merge]\n  tool = nvr\n  conflictstyle = diff3\n[mergetool]\n  keepBackup = false\n[mergetool \"nvr\"]\n  cmd           = nvr -sd $LOCAL $BASE $REMOTE $MERGED -c 'winc J | winc ='\n  trustExitCode = true\n\n; Aliases {{{1\n[alias]\n  a        = add\n  b        = branch\n  bi       = bisect\n  bl       = blame\n  c        = commit\n  ca       = commit --amend\n  caa      = commit --amend --no-edit\n  cf       = commit --fixup\n  cl       = clone\n  co       = checkout\n  codate   = \"!f() { git checkout `git rev-list -n1 --before \\\"$@\\\" HEAD`; }; f\"\n  cp       = cherry-pick\n  d        = diff --color --no-ext-diff\n  dc       = !git d --cached\n  dcs      = !git d --cached --stat\n  des      = describe --contains\n  ds       = !git d --stat\n  dt       = difftool\n  dw       = !git d --word-diff=color\n  f        = fetch\n  g        = grep\n  h        = help\n  lfp      = !git l --first-parent\n  ln       = !git l @{1}..\n  ls       = \"!f() { git ls-files | grep \"${@:-''}\"; }; f\"\n  lso      = ls-files --others --exclude-standard\n  lsr      = ls-remote\n  m        = merge\n  ma       = merge --abort\n  mt       = mergetool\n  n        = name-rev --name-only\n  p        = push\n  pl       = pull --ff-only\n  plr      = pull --rebase origin master\n  r        = reset\n  ra       = rebase --abort\n  rc       = rebase --continue\n  re       = rebase\n  rem      = remote\n  ri       = rebase -i --keep-empty\n  rs       = rebase --skip\n  ru       = remote update\n  s        = status --short --branch --untracked-files=no\n  sh       = show\n  shs      = show --stat\n  st       = stash\n  stl      = stash list\n  sts      = stash show -p\n  t        = tag\n  tr       = trail\n  unmerged = branch --no-merged master\n  wt       = worktree\n\n  rehook = \"!f() { cd \\\"$(git rev-parse --show-toplevel)\\\"; rm -r .git/hooks; git init; }; f\"\n\n  description = !git config --get \"branch.$(git rev-parse --abbrev-ref HEAD).description\"\n\n  snapshot = !git stash push \"snapshot: $(date)\" && git stash apply \"stash@{0}\"\n\n  ours   = !git checkout --ours $@ && git add $@\n  theirs = !git checkout --theirs $@ && git add $@\n\n  rank    = shortlog -sn --no-merges\n  authors = \"!f() { git log --no-merges --pretty='format:%<(26)%an <%ae>' --author \\\"$*\\\" | sort | uniq; }; f\"\n  by      = \"!f() { IFS=$'\\n'; select a in `git authors \\\"$*\\\"`; do git l --no-merges --author \\\"${a%%  *<*}\\\"; break; done; }; f\"\n\n  upstream = !git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)\n  upstream-remote = !git upstream | sed -e 's/\\\\/.*$//g'\n\n; Colors {{{1\n[color]\n  branch      = auto\n  diff        = auto\n  interactive = auto\n  status      = auto\n  ui          = auto\n[include]\n  path = config.colors\n"
  },
  {
    "path": ".config/git/config.colors.dark",
    "content": "[alias]\n    l = log --graph --pretty='%C(242)%h %C(156)%s %C(248)%an%C(242), %C(248)%ar%C(222)%d' --decorate --date=relative\n\n[color \"diff\"]\n    frag       = 104\n    func       = 74\n    meta       = 137 bold\n    new        = 114\n    old        = 167\n    plain      = 240\n    whitespace = 24 24\n\n[color \"status\"]\n    header = 240\n    branch = yellow\n"
  },
  {
    "path": ".config/git/config.colors.light",
    "content": "[alias]\n    l = log --graph --pretty='%C(245)%h %C(16)%s %C(reset)%C(ul 245)%an%C(reset), %C(248)%ar%C(124)%d' --decorate --date=relative\n\n[color \"diff\"]\n    new        = 28\n    old        = 124\n    context    = 248\n    commit     = 16 bold\n    frag       = 16\n    func       = 16\n    meta       = 16 bold\n    whitespace = 27 27\n\n[color \"status\"]\n    header = 240\n    branch = yellow\n"
  },
  {
    "path": ".config/git/template/hooks/post-applypatch",
    "content": "#!/usr/bin/env bash\n\nif [[ \"$(uname -s)\" = Darwin ]]; then\n    osascript <<EOF\n    display notification \"git-ctags: `pwd`\" with title \"post-applypatch\"\nEOF\nfi\n\n~/bin/git-ctags &>/dev/null &\n"
  },
  {
    "path": ".config/git/template/hooks/post-checkout",
    "content": "#!/usr/bin/env bash\n\nif [[ \"$(uname -s)\" = Darwin ]]; then\n    osascript <<EOF\n    display notification \"git-ctags: `pwd`\" with title \"post-checkout\"\nEOF\nfi\n\n~/bin/git-ctags &>/dev/null &\n\nif [[ $1 != 0000000000000000000000000000000000000000 ]] \\\n    && [[ $3 -eq 1 ]] \\\n    && git diff --name-only $1 $2 | egrep -q '^Gemfile|\\.gemspec$' \\\n    && command -v bundle &>/dev/null\nthen\n    exec bundle\nfi\n"
  },
  {
    "path": ".config/git/template/hooks/post-commit",
    "content": "#!/usr/bin/env bash\n\nif [[ \"$(uname -s)\" = Darwin ]]; then\n    osascript <<EOF\n    display notification \"git-ctags: `pwd`\" with title \"post-commit\"\nEOF\nfi\n\n~/bin/git-ctags &>/dev/null &\n"
  },
  {
    "path": ".config/git/template/hooks/post-merge",
    "content": "#!/usr/bin/env bash\n\nif [[ \"$(uname -s)\" = Darwin ]]; then\n    osascript <<EOF\n    display notification \"git-ctags: `pwd`\" with title \"post-merge\"\nEOF\nfi\n\n~/bin/git-ctags &>/dev/null &\n"
  },
  {
    "path": ".config/git/template/hooks/post-rewrite",
    "content": "#!/usr/bin/env bash\n\ncase \"$1\" in\n    rebase)\n        if [[ \"$(uname -s)\" = Darwin ]]; then\n            osascript <<EOF\n            display notification \"git-ctags: `pwd`\" with title \"post-rewrite\"\nEOF\n        fi\n        ~/bin/git-ctags &>/dev/null &\n        ;;\nesac\n"
  },
  {
    "path": ".config/git/template/hooks/pre-commit",
    "content": "#!/usr/bin/env bash\n\nif git rev-parse --verify HEAD &>/dev/null; then\n    against=HEAD\nelse\n    # Initial commit: diff against an empty tree object\n    against=4b825dc642cb6eb9a060e54bf8d69288fbee4904\nfi\n\nexec git diff-index --check --cached $against --\n"
  },
  {
    "path": ".config/karabiner/assets/complex_modifications/any.json",
    "content": "{\n  \"title\": \"Any\",\n  \"rules\": [\n    {\n      \"manipulators\": [\n        {\n          \"description\": \"(Any) caps_lock > left_control, caps_lock alone > escape\",\n          \"from\": {\n            \"key_code\": \"caps_lock\"\n          },\n          \"to\": [\n            {\n              \"key_code\": \"left_control\",\n              \"lazy\": true\n            }\n          ],\n          \"to_if_alone\": [\n            {\n              \"key_code\": \"escape\"\n            }\n          ],\n          \"type\": \"basic\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": ".config/karabiner/assets/complex_modifications/keychron-k6.json",
    "content": "{\n  \"title\": \"Keychron K6\",\n  \"rules\": [\n    {\n      \"description\": \"(Keychron K6) left_shift alone > `\",\n      \"manipulators\": [\n        {\n          \"conditions\": [\n            {\n              \"type\": \"device_if\",\n              \"identifiers\": [\n                {\n                  \"product_id\": 591,\n                  \"vendor_id\": 1452\n               }\n              ]\n            }\n          ],\n          \"from\": {\n            \"key_code\": \"left_shift\"\n          },\n          \"to\": [\n            {\n              \"key_code\": \"left_shift\"\n            }\n          ],\n          \"to_if_alone\": [\n            {\n              \"key_code\": \"grave_accent_and_tilde\"\n            }\n          ],\n          \"type\": \"basic\"\n        }\n      ]\n    },\n    {\n      \"description\": \"(Keychron K6) right_shift alone > ~\",\n      \"manipulators\": [\n        {\n          \"conditions\": [\n            {\n              \"type\": \"device_if\",\n              \"identifiers\": [\n                {\n                  \"product_id\": 591,\n                  \"vendor_id\": 1452\n                }\n              ]\n            }\n          ],\n          \"from\": {\n            \"key_code\": \"right_shift\"\n          },\n          \"to\": [\n            {\n              \"key_code\": \"right_shift\"\n            }\n          ],\n          \"to_if_alone\": [\n            {\n              \"key_code\": \"grave_accent_and_tilde\",\n              \"modifiers\": [\n                \"left_shift\"\n              ]\n            }\n          ],\n          \"type\": \"basic\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": ".config/rg/rgrc",
    "content": "--hidden\n--no-ignore\n--smart-case\n"
  },
  {
    "path": ".ctags",
    "content": "--regex-ruby=/(^|[:;])[ \\t]*([A-Z][[:alnum:]_]+) *=/\\2/c,class,constant/\n--regex-ruby=/^[ \\t]*attr_(reader|writer|accessor) (:[a-z0-9_]+, )*:([a-z0-9_]+)/\\3/A,attr/\n\n--langdef=elixir\n--langmap=elixir:.ex.exs\n--regex-elixir=/^[ \\t]*def(p?)[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\2/f,functions,functions (def ...)/\n--regex-elixir=/^[ \\t]*defcallback[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\1/c,callbacks,callbacks (defcallback ...)/\n--regex-elixir=/^[ \\t]*defdelegate[ \\t]+([a-z_][a-zA-Z0-9_?!]*)/\\1/d,delegates,delegates (defdelegate ...)/\n--regex-elixir=/^[ \\t]*defexception[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/e,exceptions,exceptions (defexception ...)/\n--regex-elixir=/^[ \\t]*defimpl[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/i,implementations,implementations (defimpl ...)/\n--regex-elixir=/^[ \\t]*defmacro(p?)[ \\t]+([a-z_][a-zA-Z0-9_?!]*)\\(/\\2/a,macros,macros (defmacro ...)/\n--regex-elixir=/^[ \\t]*defmacro(p?)[ \\t]+([a-zA-Z0-9_?!]+)?[ \\t]+([^ \\tA-Za-z0-9_]+)[ \\t]*[a-zA-Z0-9_!?!]/\\3/o,operators,operators (e.g. \"defmacro a <<< b\")/\n--regex-elixir=/^[ \\t]*defmodule[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/m,modules,modules (defmodule ...)/\n--regex-elixir=/^[ \\t]*defprotocol[ \\t]+([A-Z][a-zA-Z0-9_]*\\.)*([A-Z][a-zA-Z0-9_?!]*)/\\2/p,protocols,protocols (defprotocol...)/\n--regex-elixir=/^[ \\t]*Record\\.defrecord[ \\t]+:([a-zA-Z0-9_]+)/\\1/r,records,records (defrecord...)/\n"
  },
  {
    "path": ".emacs.d/configs/erlang.el",
    "content": "(setq erlang-root-dir \"~/local/erlang/lib/erlang/erts-6.3.1\")\n(setq exec-path (cons \"~/local/erlang/lib/erlang/erts-6.3.1/bin\" exec-path))\n(require 'erlang-start)\n"
  },
  {
    "path": ".emacs.d/configs/haskell.el",
    "content": "(require 'haskell-mode-autoloads)\n\n(custom-set-variables\n '(haskell-process-auto-import-loaded-modules t)\n '(haskell-process-log t)\n '(haskell-process-suggest-remove-import-lines t)\n '(haskell-process-type (quote cabal-repl))\n '(haskell-tags-on-save t))\n\n(add-to-list 'Info-default-directory-list \"~/.emacs.d/packages/haskell-mode\")\n\n(eval-after-load 'haskell-mode '(progn\n\t\t\t\t  (interactive-haskell-mode)\n\t\t\t\t  (define-key haskell-mode-map [f8] 'haskell-navigate-imports)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-l\") 'haskell-process-load-or-reload)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-z\") 'haskell-interactive-switch)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-n C-t\") 'haskell-process-do-type)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-n C-i\") 'haskell-process-do-info)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-n C-c\") 'haskell-process-cabal-build)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c C-n c\") 'haskell-process-cabal)\n\t\t\t\t  (define-key haskell-mode-map (kbd \"C-c SPC\") 'haskell-mode-contextual-space)))\n\n(let ((my-cabal-path (expand-file-name \"~/.cabal/bin\")))\n  (setenv \"PATH\" (concat my-cabal-path \":\" (getenv \"PATH\")))\n  (add-to-list 'exec-path my-cabal-path))\n\n(eval-after-load 'haskell-cabal '(progn\n\t\t\t\t   (define-key haskell-cabal-mode-map (kbd \"C-c C-c\") 'haskell-process-cabal-build)\n\t\t\t\t   (define-key haskell-cabal-mode-map (kbd \"C-c c\") 'haskell-process-cabal)\n\t\t\t\t   (define-key haskell-cabal-mode-map (kbd \"C-c C-k\") 'haskell-interactive-mode-clear)))\n;;\t\t\t\t   (define-key haskell-cabal-mode-map (bkd \"C-c C-z\") 'haskell-interactive-switch)))\n"
  },
  {
    "path": ".emacs.d/init.el",
    "content": "(when (< emacs-major-version 24)\n  (princ \"Install at least Emacs 24.\\n\" #'external-debugging-output)\n  (kill-emacs))\n\n(when (member \"Source Code Pro\" (font-family-list))\n  (set-default-font \"Source Code Pro-13\"))\n\n(if (fboundp 'tool-bar-mode)     (tool-bar-mode 0))\n(if (fboundp 'toggle-scroll-bar) (toggle-scroll-bar 0))\n(menu-bar-mode 0)\n\n(setq ring-bell-function 'ignore)\n(setq inhibit-splash-screen t)\n(setq inhibit-startup-message t)\n(setq custom-file \"~/.emacs.d/custom.el\")\n\n(require 'package)\n(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\") t)\n(add-to-list 'package-archives '(\"org\" . \"http://orgmode.org/elpa/\") t)\n(package-initialize)\n\n(unless (package-installed-p 'use-package)\n  (package-refresh-contents)\n  (package-install 'use-package))\n\n(eval-and-compile\n  (defvar use-package-verbose t)\n  (require 'cl)\n  (require 'use-package)\n  (require 'bind-key)\n  (setq use-package-always-ensure t))\n\n(defalias 'yes-or-no-p 'y-or-n-p)\n\n(setq backup-directory-alist\n      `((\".*\" . ,temporary-file-directory)))\n(setq auto-save-file-name-transforms\n      `((\".*\" ,temporary-file-directory t)))\n\n(let ((week (* 60 60 24 7))\n      (current (float-time (current-time))))\n  (dolist (file (directory-files temporary-file-directory t))\n    (when (and (backup-file-name-p file)\n               (> (- current (float-time (fifth (file-attributes file))))\n                  week))\n      (message \"%s\" file)\n      (delete-file file))))\n\n(delete-selection-mode +1)\n\n(setq-default tab-width 2)\n(setq-default indent-tabs-mode nil)\n\n(when (display-graphic-p)\n  (use-package subatomic-theme)\n  (toggle-frame-maximized))\n\n(use-package ace-window\n  :bind ((\"M-q\" . ace-window)))\n\n(use-package git-gutter\n  :config (global-git-gutter-mode 1))\n\n(use-package avy\n  :bind* (\"C-,\" . avy-goto-char-2))\n\n(use-package slime\n  :init\n  (setq inferior-lisp-program \"sbcl\")\n  (setq slime-contribs '(slime-fancy)))\n\n(unless (and (fboundp 'server-running-p)\n             (server-running-p))\n  (server-start))\n\n(if (file-readable-p custom-file)\n    (load custom-file))\n"
  },
  {
    "path": ".gemrc",
    "content": ":update_sources: true\n:bulk_threshold: 1000\n:verbose: true\n:benchmark: false\n:backtrace: false\ngem: --no-document\n"
  },
  {
    "path": ".gitignore",
    "content": "/*/\n!/bin/\n!.*\n/.git/\n"
  },
  {
    "path": ".gnupg/gpg-agent.conf",
    "content": "pinentry-program /usr/local/bin/pinentry-mac\ndefault-cache-ttl 7200\n"
  },
  {
    "path": ".gnupg/gpg.conf",
    "content": "personal-digest-preferences SHA256\ncert-digest-algo SHA256\ndefault-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed\nkeyid-format long\n\nkeyserver hkps://hkps.pool.sks-keyservers.net\nkeyserver-options no-honor-keyserver-url\n"
  },
  {
    "path": ".hgrc",
    "content": "[ui]\nusername = Marco Hinz <mh.codebro@gmail.com>\ncolor = always\n\n[pager]\npager = LESS='FRX' less\n\n[alias]\na    = add\nb    = branch\nbi   = bisect\nbm   = bookmark\nc    = commit\ncl   = clone\nco   = checkout\nd    = diff\ng    = grep\nh    = help\nl    = !hg log -G | LESS=FRX less\nm    = merge\np    = push\npl   = pull\nr    = revert\nrank = !hg churn -t '{author}' -c | less -FRX\ns    = status\nu    = update\n\n[extensions]\ncolor =\npager =\nchurn =\n\n[color]\ndiff.trailingwhitespace = bold red_background\n"
  },
  {
    "path": ".iex.exs",
    "content": "IEx.configure [\n  colors: [\n    eval_info:       [:yellow, :bright],\n    eval_error:      [:red],\n    eval_interrupt:  [:red],\n    stack_info:      [:blue],\n    doc_code:        [:blue],\n    doc_inline_code: [:blue],\n    doc_headings:    [:red, :bright],\n  ],\n  width: 100,\n  default_prompt: [\n    \"\\e[G\",\n    :blue,\n    :bright,\n    \"%prefix(%counter)>\",\n  ] |> IO.ANSI.format |> IO.chardata_to_string\n]\n\ndefmodule Mex do\n  defp expand_all(n, env) do\n    Macro.prewalk(n, &Macro.expand(&1, env))\n  end\n\n  defmacro mex(do: block) do\n    block\n    |> expand_all(__CALLER__)\n    |> Macro.to_string\n    |> IO.puts\n\n    quote do: :ok\n  end\nend\n"
  },
  {
    "path": ".inputrc",
    "content": "set show-all-if-ambiguous on\n\nControl-p: history-search-backward\nControl-k: history-search-backward\nControl-n: history-search-forward\n"
  },
  {
    "path": ".irbrc",
    "content": "begin\n  require 'pry'\n  Pry.start\n  exit\nrescue LoadError\n  require 'irb/completion'\n  IRB.conf[:PROMPT_MODE] = :SIMPLE\n  warn 'not installed: pry'\nend\n"
  },
  {
    "path": ".lldbinit",
    "content": "command alias ptype target modules lookup -t %1\ncommand alias reload command source -s 1 ~/.lldbinit\n\nsettings set target.x86-disassembly-flavor intel\nsettings set frame-format \"frame #${frame.index}: ${frame.pc}{ \\x1b\\x5b36m${module.file.basename}\\x1b\\x5b39m{` \\x1b\\x5b32m${function.name-with-args} \\x1b\\x5b39m${function.pc-offset}}}{ at \\x1b\\x5b31m${line.file.basename}\\x1b\\x5b0m ${line.number}}\\n\"\n"
  },
  {
    "path": ".macos",
    "content": "#!/usr/bin/env bash\n\nsudo -v\n\n# Cron {{{1\n# This needs full disk access enabled for the calling terminal emulator.\n# E.g. Security & Privacy -> Full Disk Access -> iTerm.app\n# Reference: https://gitlab.com/gnachman/iterm2/wikis/fulldiskaccess\nif crontab -l 2>&1 | grep -qv english; then\n  { crontab -l 2>/dev/null; echo \"*/30 * * * * ~/bin/english-notification\"; } | crontab -\nfi\n\n# Defaults {{{1\ndefaults write ApplePressAndHoldEnabled -bool true\ndefaults write NSGlobalDomain InitialKeyRepeat -int 20\ndefaults write NSGlobalDomain KeyRepeat -int 1\ndefaults write NSRequiresAquaSystemAppearance  -bool true\ndefaults write com.apple.finder AppleShowAllFiles -boolean true\ndefaults write com.google.Keystone.Agent checkInterval 172800\n\n# Defaults (need disabled SIP) {{{1\nif [[ \"$(csrutil status)\" =~ enabled ]]; then\n  echo 'Disable System Integrity Protection (rootless mode):'\n  echo '  * restart'\n  echo '  * hold cmd+R to boot into Recovery System'\n  echo '  * Utilities -> Terminal'\n  echo '  * $ csrutil disable'\n  echo '  * restart'\nelse\n  defaults write /System/Library/LaunchAgents/com.apple.mdworker.single LowPriorityBackgroundIO -int 1\n  defaults write /System/Library/LaunchAgents/com.apple.mdworker.shared LowPriorityBackgroundIO -int 1\nfi\n\n# vim: et sts=2 sw=2\n"
  },
  {
    "path": ".misc/YellowLight.itermcolors",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>Ansi 0 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Ansi 1 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.10676553100347519</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.789775550365448</real>\n\t</dict>\n\t<key>Ansi 10 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.40609359741210938</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.98006147146224976</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.37424531579017639</real>\n\t</dict>\n\t<key>Ansi 11 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.40395939350128174</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.98757272958755493</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.99950331449508667</real>\n\t</dict>\n\t<key>Ansi 12 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.44485551118850708</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.40937519073486328</real>\n\t</dict>\n\t<key>Ansi 13 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.46518981456756592</real>\n\t\t<key>Red Component</key>\n\t\t<real>1</real>\n\t</dict>\n\t<key>Ansi 14 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.99263292551040649</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.37597531080245972</real>\n\t</dict>\n\t<key>Ansi 15 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>1</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.99999600648880005</real>\n\t</dict>\n\t<key>Ansi 2 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.76266151666641235</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Ansi 3 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.76959484815597534</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.78058648109436035</real>\n\t</dict>\n\t<key>Ansi 4 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.78216177225112915</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.14576995372772217</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0096152340993285179</real>\n\t</dict>\n\t<key>Ansi 5 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.78154844045639038</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.18891248106956482</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.79022186994552612</real>\n\t</dict>\n\t<key>Ansi 6 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.78166204690933228</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.77425903081893921</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Ansi 7 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.78104829788208008</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.78105825185775757</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.7810397744178772</real>\n\t</dict>\n\t<key>Ansi 8 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.4078223705291748</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.40782788395881653</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.40781760215759277</real>\n\t</dict>\n\t<key>Ansi 9 Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.40569943189620972</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.43035173416137695</real>\n\t\t<key>Red Component</key>\n\t\t<real>1</real>\n\t</dict>\n\t<key>Background Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.918487548828125</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.99384576082229614</real>\n\t\t<key>Red Component</key>\n\t\t<real>1</real>\n\t</dict>\n\t<key>Badge Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>0.5</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.1491314172744751</real>\n\t\t<key>Red Component</key>\n\t\t<real>1</real>\n\t</dict>\n\t<key>Bold Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>1</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.99999600648880005</real>\n\t</dict>\n\t<key>Cursor Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.78104829788208008</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.78105825185775757</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.7810397744178772</real>\n\t</dict>\n\t<key>Cursor Guide Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>0.25</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.9268307089805603</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.70213186740875244</real>\n\t</dict>\n\t<key>Cursor Text Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>1</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.99999600648880005</real>\n\t</dict>\n\t<key>Foreground Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Link Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.73423302173614502</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.35916060209274292</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Selected Text Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.0</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>Selection Color</key>\n\t<dict>\n\t\t<key>Alpha Component</key>\n\t\t<real>1</real>\n\t\t<key>Blue Component</key>\n\t\t<real>1</real>\n\t\t<key>Color Space</key>\n\t\t<string>sRGB</string>\n\t\t<key>Green Component</key>\n\t\t<real>0.86970102787017822</real>\n\t\t<key>Red Component</key>\n\t\t<real>0.75813239812850952</real>\n\t</dict>\n</dict>\n</plist>\n"
  },
  {
    "path": ".misc/neovim-local.mk",
    "content": "CMAKE_BUILD_TYPE  := Debug\nCMAKE_EXTRA_FLAGS := -DCMAKE_INSTALL_PREFIX=${HOME}/local/nvim\nUSE_BUNDLED       := ON\n\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_GETTEXT=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_GPERF=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LIBICONV=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LIBTERMKEY=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LUA=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_MSGPACK=OFF\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_UNIBILIUM=OFF\n\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LIBUV=ON\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_BUSTED=ON\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LUAJIT=ON\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LUAROCKS=ON\n\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LIBVTERM=ON\n# DEPS_CMAKE_FLAGS  += -DUSE_BUNDLED_LUV=ON\n\n.PHONY: all\ndefault: all\n\n.PHONY: info\ninfo:\n\t@awk -F = '/BUILD_TYPE:/ { print \"BUILD_TYPE:\", $$2 }' build/CMakeCache.txt\n\t@awk -F = '/C_COMPILER:/ { print \"C_COMPILER:\", $$2 }' build/CMakeCache.txt\n\n.PHONY: release\nrelease:\n\t$(MAKE) CMAKE_BUILD_TYPE=RelWithDebInfo\n\nrebuild-%:\n\trm -f .deps/build/src/$*-stamp/$*-build\n\tDEBUG=1 $(MAKE) deps\n\n.PHONY: cl\ncl:\n\trm -f errors.json\n\twget https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint/errors.json\n\t$(eval FILES = $(shell git diff-tree --name-only --no-commit-id -r master..))\n\tsrc/clint.py --suppress-errors=errors.json ${FILES}\n"
  },
  {
    "path": ".profile",
    "content": "# This file gets sourced by every login shell.\n\n# PATH {{{1\nnewpath=(\n    # homebrew (keg-only)\n    /usr/local/sbin\n    /usr/local/opt/coreutils/libexec/gnubin\n    /usr/local/opt/ncurses/bin\n    /usr/local/opt/ruby/bin\n    /usr/local/lib/ruby/gems/*/bin\n    /usr/local/opt/llvm/bin\n\n    ~/data/go/bin  # $GOPATH\n    ~/.npm/bin\n    ~/.asdf/bin\n    ~/.asdf/shims\n    ~/.cargo/bin\n    ~/local/*/bin\n    ~/bin\n)\n\n# Apple's path_helper gets called from /etc/profile and\n# /etc/zprofile and mangles $PATH. Work around it.\nif [[ -x /usr/libexec/path_helper ]]; then\n    PATH=\n    eval \"$(/usr/libexec/path_helper -s)\"\nfi\n\n# Only unique elements, please.\nfor dir in \"${newpath[@]}\"; do\n    case $PATH in\n        *:\"$dir\":*) ;;\n        *) [[ -d $dir ]] && PATH=\"$dir:$PATH\" ;;\n    esac\ndone\n\nexport PATH\nunset newpath dir\n# }}}\n\nexport ME=$HOME/data\nexport LANG=en_US.UTF-8\n\nexport FZF_DEFAULT_COMMAND=\"rg --files --hidden --glob '!.git'\"\nexport FZF_DEFAULT_OPTS='--inline-info --color=light'\n\nexport RIPGREP_CONFIG_PATH=\"$HOME/.config/rg/rgrc\"\n\nexport ELIXIR_EDITOR='ec +__LINE__ __FILE__'\n\nexport GOPATH=$ME/go\nexport GOARCH=amd64\nexport GOOS=\"$(uname -s | tr '[:upper:]' '[:lower:]')\"\n\nexport PGDATA=/usr/local/var/postgres\n\nif   command -v nvim  1>/dev/null; then export EDITOR='nvim'\nelif command -v vim   1>/dev/null; then export EDITOR='vim'\nelif command -v vi    1>/dev/null; then export EDITOR='vi'\nelif command -v emacs 1>/dev/null; then export EDITOR='emacs -nw'\nelif command -v nano  1>/dev/null; then export EDITOR='nano'\nelse echo 'Install a proper editor.'\nfi\n\nexport MANPATH=/usr/local/opt/coreutils/libexec/gnuman:\"$MANPATH\"\nexport MANPATH=/usr/local/opt/erlang/lib/erlang/man:\"$MANPATH\"\nexport MANPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:\"$MANPATH\"\nexport MANWIDTH=82\n\ncase \"$EDITOR\" in\n    nvim) export MANPAGER=\"nvim +'set ft=man' -\" ;;\n    vim)  export MANPAGER=\"/bin/sh -c \\\"col -b | vim -c 'set ft=man ro nomod nolist' -\\\"\" ;;\n    *)    export MANPAGER='less' ;;\nesac\n"
  },
  {
    "path": ".pryrc",
    "content": "def line(obj, depth, indent=true)\n  print indent ? obj.rjust(depth.to_i + obj.length) : obj\nend\n\ndef ppp(obj, depth=0, indent=true)\n  if obj.is_a? Array\n    line \"[\\n\", depth, indent\n    obj.each { |v| ppp v, depth+2 }\n    line \"],\\n\", depth\n  elsif obj.is_a? Hash\n    line \"{\\n\", depth, indent\n    obj.each do |k,v|\n      line \"#{k} => \", depth+2\n      ppp v, depth+2, false\n    end\n    line \"},\\n\", depth\n  else\n    line \"#{':' if obj.is_a? Symbol}#{obj},\\n\", depth, indent\n  end\nend\n\n# vim: ft=ruby\n"
  },
  {
    "path": ".psqlrc",
    "content": "\\set PROMPT1 '%[%033[0;34m%]%/%R%x%#%[%033[0m%] '\n\\set PROMPT2 '%[%033[0;33m%]%R%x →%[%033[0m%] '\n\\x auto\n"
  },
  {
    "path": ".pypirc",
    "content": "[distutils]\nindex-servers = pypi\n\n[pypi]\nusername:mhinz\n"
  },
  {
    "path": ".rtorrent.rc",
    "content": "directory  = /data/torrent/download\nsession    = /data/torrent/session\n\nschedule   = low_diskspace,5,60,close_low_diskspace=50M\nencryption = allow_incoming,try_outgoing,enable_retry,prefer_plaintext\n\nip = 127.0.0.1\n\nport_range   = 32537-32537\nport_random  = yes\n\ndht           = disable\npeer_exchange = false\n"
  },
  {
    "path": ".shrc",
    "content": "# This file gets sourced by .bashrc and .zshrc.\n\nos=\"$(uname -s)\"\n\nstty discard undef\n\nif [[ -z $THEME ]]; then\n    if [[ -n $ITERM_PROFILE  ]]; then\n        export THEME=$ITERM_PROFILE\n    elif [[ -n $KITTY_WINDOW_ID ]]; then\n        export THEME=Light\n    else\n        export THEME=Dark\n    fi\nfi\n\nif [[ $THEME = Dark ]]; then\n    eval $(dircolors ~/.zsh/dircolors.dark)\n    ln -fs \\\n        ~/.config/git/config.colors.dark \\\n        ~/.config/git/config.colors\nelse\n    eval $(dircolors ~/.zsh/dircolors.light)\n    ln -fs \\\n        ~/.config/git/config.colors.light \\\n        ~/.config/git/config.colors\nfi\n\n# Prompt {{{1\nif [[ -n ${ZSH_VERSION-} ]]; then\n    _p_pink='%F{161}'\n    _p_red='%F{9}'\n    _p_green='%F{46}' # 77\n    _p_blue='%F{67}'\n    _p_clear='%f%k%b%u'\n    _p_bold='%B'\n    _p_underline='%U'\n    _p_user='%F{19}'\n    _p_host='%F{32}'\nelse\n    _p_pink='\\[\\e[38;5;161m\\]'\n    _p_red='\\[\\e[38;5;9m\\]'\n    _p_green='\\[\\e[38;5;46m\\]'\n    _p_blue='\\[\\e[38;5;67m\\]'\n    _p_clear='\\[\\e[0m\\]'\n    _p_bold='\\[\\e[1m\\]'\n    _p_underline='\\[\\e[4m\\]'\n    _p_user='\\[\\e[38;5;19m\\]'\n    _p_host='\\[\\e[38;5;32m\\]'\nfi\n\n[[ $THEME = Dark ]] && _p_main=$_p_green || _p_main=$_p_pink\n\n_prompt() {\n    local exitval=$?\n    local jobs=\"$(jobs | wc -l | tr -d '\\n')\"\n    local gittop=\"$(git rev-parse --show-toplevel 2>/dev/null)\"\n    local pwd=\"$(pwd -P)\"\n    local p\n\n    # this directory might be below a git repo but not part of it\n    [[ -n $gittop && -z $(git ls-files) ]] && gittop=\n\n    # root!\n    [[ $UID -eq 0 ]] && p+=\"${_p_red}${_p_underline}ROOT${_p_clear} \"\n\n    # show user and host on remote systems\n    if [[ -n $SSH_CONNECTION ]]; then\n        [[ $UID -ne 0 ]] && p+=\"${_p_user}${USER}${_p_clear} \"\n        p+=\"${_p_host}$(hostname) \"\n    fi\n\n    p+=$_p_main\n\n    if [[ -z $gittop ]]; then\n        p+=\"$pwd \"\n    else\n        local parentdir=\"${gittop%/*}\"\n        local front=\"${parentdir/#${HOME}/~}\"\n        local middle=\"${_p_underline}${_p_bold}${gittop##*/}${_p_clear}\"\n        local back=\"${_p_main}${pwd#${gittop}}\"\n        p+=\"${front}/${middle}${back}${_p_clear} \"\n\n        # branch name or short SHA if detached\n        local branch=$(git symbolic-ref --short -q HEAD || git rev-parse --short HEAD)\n        [[ -n $branch ]] && p+=\"${_p_bold}${branch}\"\n\n        # dirty working tree\n        git diff --no-ext-diff --quiet 2>/dev/null || p+=\"$_p_bold *\"\n\n        # staged changes\n        git diff-index --cached --quiet HEAD 2>/dev/null || p+=\"$_p_bold ✓\"\n\n        local gitdir=\"${gittop}/.git\"\n\n        [[ -f \"${gitdir}/refs/stash\" ]] && p+=' [stash]'\n\n        if [[ -f \"${gitdir}/MERGE_HEAD\" ]]; then\n            p+=' [merge]'\n        elif [[ -f \"${gitdir}/CHERRY_PICK_HEAD\" ]]; then\n            p+=' [cherry]'\n        elif [[ -f \"${gitdir}/REVERT_HEAD\" ]]; then\n            p+=' [revert]'\n        elif [[ -f \"${gitdir}/rebase-merge/interactive\" ]]; then\n            p+=' [rebase-i]'\n        elif [[ -d \"${gitdir}/rebase-apply\" ]]; then\n            p+=' [rebase]'\n        fi\n    fi\n\n    p+=\"${_p_clear}\"$'\\n'\n\n    (( $jobs )) && p+=\"[${_p_blue}${_p_bold}${jobs}${_p_clear}]\"\n    (( $exitval )) && p+=\"[${_p_red}${_p_bold}${exitval}${_p_clear}]\"\n\n    PS1=\"${p}❯ \"\n}\n\n# Aliases {{{1\nalias d='docker'\nalias dc='docker-compose'\nalias g='git'\nalias m='mhi'\n\nalias t='task'\nalias tf='task -f'\nalias tn='task | head -n 1'\n\nalias pip3up=\"pip3 list --outdated | sed -e '1,2d; s/ .*//' | xargs pip3 --no-cache-dir install -U\"\nalias gemup=\"gem update --system && gem update && gem cleanup\"\nalias npmup=\"npm install npm@latest -g && npm -g update\"\nif [[ $os = Darwin ]]; then\n    alias brewup='brew update && brew upgrade && brew upgrade --cask --greedy && brew cleanup --prune 1'\n    alias allup=\"pip3up; gemup; npmup; brewup\"\nelif [[ $os = Linux ]]; then\n    alias aptup='sudo apt update && sudo apt upgrade && sudo apt autoremove'\n    alias allup=\"pip3up; gemup; npmup; aptup\"\nfi\n\nalias stripcolors='sed -r \"s/\\x1b\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\"'\nalias mirror='wget --mirror --no-parent --continue'\nalias myip='dig +short myip.opendns.com @resolver1.opendns.com'\nalias val='valgrind -v --leak-check=full --show-reachable=yes'\nalias yt2mp3='youtube-dl -x --audio-format mp3 --audio-quality 0 -o \"%(title)s.%(ext)s\"'\nalias yt2mp3-chapters='yt-dlp -x --audio-format mp3 --audio-quality 0 --split-chapters -o \"%(title)s - %(chapter_number)s. %(chapter)s.%(ext)s\"'\nalias yt2mp3-playlist='yt-dlp -x --audio-format mp3 --audio-quality 0 --yes-playlist -o \"%(title)s - %(playlist_index)s. %(playlist)s.%(ext)s\"'\n\nif [[ $os = FreeBSD ]]; then\n    alias ls='gnuls --color=auto -N'\nelse\n    alias ls='ls --color=auto -Nv'\nfi\nalias l='ls -1h --group-directories-first'\nalias ll='ls -lh --group-directories-first'\nalias la='ll -A'\n\nalias grep='grep --color=auto'\n\nalias 1='fg %1'\nalias 2='fg %2'\nalias 3='fg %3'\nalias 11='bg %1'\nalias 22='bg %2'\nalias 33='bg %3'\n\nif [[ $os = Darwin ]]; then\n    alias chrome='open -a Google\\ Chrome'\n    alias preview='open -a Preview'\n    alias vlc='open -a VLC'\n    alias xcode='open -a Xcode'\n\n    if [[ -x /Applications/LuLu.app/Contents/Resources/Netiquette.app/Contents/MacOS/Netiquette ]]; then\n        alias objsee-netiquette='/Applications/LuLu.app/Contents/Resources/Netiquette.app/Contents/MacOS/Netiquette -list'\n    fi\n\n    if [[ -x /Applications/FileMonitor.app/Contents/MacOS/FileMonitor ]]; then\n        alias objsee-filemonitor='sudo /Applications/FileMonitor.app/Contents/MacOS/FileMonitor'\n    fi\n\n    if [[ -x /Applications/ProcessMonitor.app/Contents/MacOS/ProcessMonitor ]]; then\n        alias objsee-processmonitor='sudo /Applications/ProcessMonitor.app/Contents/MacOS/ProcessMonitor'\n    fi\nfi\n\n# Functions {{{1\ndsf() {\n    git diff --no-index --color \"$@\" | diff-so-fancy | less -RFXx2\n}\n\ns() {\n    if (( $# )); then\n        ps -eo pid,ppid,user,%cpu,%mem,state,command | grep -i \"$@\" | grep -v \"grep.*$@\" | grep \"$@\"\n    else\n        ps -eo pid,ppid,user,%cpu,%mem,state,command\n    fi\n}\n\nr() {\n  exec $SHELL\n}\n\nmd() {\n  command mkdir -p $1 && builtin cd $1\n}\n\nrd() {\n  dir=$PWD\n  builtin cd ..\n  if command rmdir \"$dir\" 2>/dev/null; then\n    echo 'Removed empty directory:' $dir\n  else\n    builtin cd \"$dir\"\n    echo 'Directory is not empty:'\n    ls -A\n  fi\n  unset dir\n}\n\nlookup() {\n  open \"https://sks-keyservers.net/pks/lookup?search=${*}\"\n}\n\noman() {\n    open \"https://man.openbsd.org/${*}\"\n}\n\ncamusedby() {\n  echo 'Recent camera uses:'\n  local usedby=$(lsof | grep -w \"AppleCamera\\|USBVDC\\|iSight\" | awk '{printf $2\"\\n\"}' | xargs ps)\n  echo $usedby\n}\n\nfix-perm() {\n  [[ $1 = -h ]] && {\n    echo 'usage: fix-perm [dirs:700] [files:600]'\n    return 1\n  } 1>&2\n  find . -type d -exec chmod ${1-700} {} +\n  find . -type f -exec chmod ${2-600} {} +\n}\n\nangband() {\n    save_stty=\"$(stty --save)\"\n    # Disable flow control and delayed suspend, since we need ^S and ^Y.\n    stty -ixon dsusp undef\n    command angband\n    stty \"$save_stty\"\n}\n\n_() {\n    for file in \"$@\"; do\n        if [[ ${file:0:1} = _ ]]; then\n            mv -nv \"$file\" \"${file:1}\"\n        else\n            mv -nv \"$file\" _\"$file\"\n        fi\n    done\n}\n\nfsed() {\n    [[ $# -lt 2 ]] && { echo 'usage: fsed <sed cmd> <files>' 2>&1; return 1; }\n    for file in \"${@:2}\"; do mv -nv \"$file\" \"$(sed \"$1\" <<< \"$file\")\"; done\n}\n\nasn() {\n    (( !$# )) && { echo 'usage: asn <host>' 2>&1; return 1; }\n    local ip=\"$1\"\n    grep ':' 1>/dev/null <<< \"$ip\" && ip=\"$(dig -x \"$ip\" +short)\"     # IPv6 to domain\n    grep '[g-z]' 1>/dev/null <<< \"$ip\" && ip=\"$(dig \"$ip\" A +short)\"  # domain to IPv4\n    local rr=\"$(printf '%s' \"$ip.\" | tac -s.)\"origin.asn.cymru.com\n    dig \"$rr\" TXT +short\n    whois -h whois.cymru.com -- \"$ip\"\n}\n\nhex() {\n    { echo 'obase=16'; seq \"$1\" \"$2\"; } | bc | paste -s -d ' '\n}\n\nmount() {\n    command mount | sed -e 's/^\\(.*\\) on \\([^ ]*\\)/\\1\\t\\2\\t/' | sort -t$'\\t' -k2 -f | column -s$'\\t' -t\n}\n# }}}\n\n# Chrome {{{1\nch() {\n  export CONF_COLS=$[ COLUMNS/2 ]\n  export CONF_SEP='{::}'\n\n  cp -f ~/Library/Application\\ Support/Google/Chrome/Default/History /tmp/h\n\n  sqlite3 -separator $CONF_SEP /tmp/h 'select title, url from urls order by last_visit_time desc' \\\n      | ruby -ne '\n  cols = ENV[\"CONF_COLS\"].to_i\n  title, url = $_.split(ENV[\"CONF_SEP\"])\n  puts \"\\x1b[33m#{title.ljust(cols)}\\x1b[0m #{url}\"' \\\n      | fzf --ansi --multi --no-hscroll --tiebreak=index \\\n      | grep --color=never -o 'https\\?://.*' \\\n      | xargs open\n\n  unset CONF_COLS CONF_SEP\n}\n\n# FZF {{{1\nurl() {\n    tmux capture-pane -pJS - \\\n        | grep -oE '\\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]' \\\n        | fzf-tmux --multi --tac --exit-0 \\\n        | while read url; do open \"$url\"; done\n}\n\nf() {\n  local file=\"$(fzf-tmux -1 --tac --tiebreak=index)\"\n  [[ -n $file ]] && cd \"$(dirname \"$file\")\"\n}\n\np() {\n  local dirs=(\n    $ME/github/*\n    $HOME/.vim/bundle\n  )\n  local dir=\"$(find \"${dirs[@]}\" -type d -mindepth 1 -maxdepth 1 | fzf-tmux -1 --tac)\"\n  [[ -n $dir ]] && cd \"$dir\" && clear\n}\n\nc() {\n  local configs=(\n    ~/.bash_profile\n    ~/.bashrc\n    ~/.config/git/config\n    ~/.profile\n    ~/.shrc\n    ~/.tmux.conf\n    ~/.vim/autoload/mhi.vim\n    ~/.vim/lua/config.lua\n    ~/.vim/magic.vim\n    ~/.vim/vimrc\n    ~/.zsh/.zprofile\n    ~/.zsh/.zshrc\n    ~/.zshenv\n  )\n  local IFS=$'\\n'\n  local files=($(echo \"${configs[*]}\" | fzf-tmux -m -1 --tac --tiebreak=index))\n  [[ -n $files ]] && v \"${files[@]}\"\n}\n\nbook() {\n    local book=\"$(rg --files $ME/books | fzf -1 --tac)\"\n    [[ -z $book ]] && return 1\n    cd \"${book%/*}\"\n    clear\n    ls -1 --group-directories-first\n}\n\n# Git {{{1\npr() {\n    local origin pr\n    if [[ $# -eq 0 ]]; then\n        echo \"usage: pr [remote] <ref>\"\n        return 1\n    elif [[ $# -eq 1 ]]; then\n        origin=$(git config branch.master.remote || echo origin)\n        pr=$1\n    else\n        origin=$1\n        pr=$2\n    fi\n    git fetch $origin refs/pull/${pr}/head || return\n    git checkout -q FETCH_HEAD\n}\n\nprpush() {\n    local pr=$1\n    local local_branch=$(git rev-parse --abbrev-ref HEAD)\n    [[ $local_branch == pr[[:digit:]]* ]] && pr=${local_branch#??}\n\n    local url=$(git config remote.$(git config branch.master.remote).url)\n    local slug=${${url#*github.com?}%.git}\n    local repo=\"${slug#*/}\"\n\n    local url=https://api.github.com/repos/${slug}/pulls/${pr}\n    local label=$(curl -s \"$url\" | jq -r '.head.label')\n    local author=${label%%:*}\n    local remote_branch=${label#*:}\n\n    local cmd=\"git push -f git@github.com:${author}/${repo} ${local_branch}:${remote_branch}\"\n    echo \"$cmd\"\n    eval \"$cmd\"\n}\n\nchanged() {\n    local files=$(git diff -U0 --no-prefix --relative \"$@\" 2>/dev/null | quickfix_diff_to_hunk)\n    [[ -z $files ]] && { echo '¯\\_(ツ)_/¯'; return 1; }\n    v -q <(echo $files)\n}\n\nquickfix_diff_to_hunk() {\n    ruby -ne  '\n    (file = $1; next) if $_ =~ /^\\+\\+\\+ (.*)/;\n    next if file.nil?;\n    (linenr = $1; next) if $_ =~ /^@@ .*\\+(\\d+)/;\n    next if linenr.nil?;\n    puts \"#{file}:#{linenr}: #{$1}\" if $_ =~ /^[+-](.*)/;\n    linenr = nil\n    '\n}\n\nb() {\n    git checkout $(git branch -a | fzf -1 | cut -c3-)\n}\n\ngho() {\n  local prefix\n  prefix=$(git rev-parse --show-prefix)\n  (( $? )) && return 1\n  local branch=$(git symbolic-ref -q --short HEAD)\n  local remote=$(git config branch.master.remote || echo origin)\n  local url=$(git config remote.${remote}.url)\n  url=${url/git\\@github\\.com:/https:\\/\\/github.com/}\n  url=${url%\\.git}\n  open ${url}/tree/${branch}/${prefix}${1:-}\n}\n\ngl() {\n    nvim +'Gclog'\n}\n\n# iTerm2 {{{1\nproftoggle() {\n    if [[ -z $ITERM_PROFILE ]]; then\n        print \"Not in iTerm\" 1>&2\n        return\n    fi\n    tmup\n    if [[ $ITERM_PROFILE == Light ]]; then\n        export ITERM_PROFILE=Dark\n        eval $(dircolors ~/.zsh/dircolors.dark)\n        ln -fs \\\n            ~/.config/git/config.colors.dark \\\n            ~/.config/git/config.colors\n    else\n        export ITERM_PROFILE=Light\n        eval $(dircolors ~/.zsh/dircolors.light)\n        ln -fs \\\n            ~/.config/git/config.colors.light \\\n            ~/.config/git/config.colors\n    fi\n    local seq=\"\\e]1337;SetProfile=${ITERM_PROFILE}\\x7\"\n    if [[ -n $TMUX ]]; then\n        seq=\"\\ePtmux;\\e${seq}\\e\\\\\"\n        tmux setenv -g ITERM_PROFILE $ITERM_PROFILE\n    fi\n    printf $seq\n    clear\n}\n\n# Tmux {{{1\ntm() {\n    if (( $# )); then\n        tmux has-session -t \"$*\" && tmux attach -t \"$*\" || tmux new-session -s \"$*\"\n    else\n        tmux attach || tmux new-session -s default\n    fi\n}\n\ntmup() {\n    [[ -n $TMUX ]] && export \"$(tmux showenv -s)\"\n}\n\n# Vim {{{1\nv() {\n if [[ -x $ME/github/neovim/neovim/build/bin/nvim ]]; then\n     VIMRUNTIME=$ME/github/neovim/neovim/runtime $ME/github/neovim/neovim/build/bin/nvim \"$@\"\n else\n     $EDITOR \"$@\"\n fi\n}\n\nvd() {\n    VIMRUNTIME=$ME/github/neovim/neovim/runtime lldb -- $ME/github/neovim/neovim/build/bin/nvim \"$@\"\n}\n\nall() {\n    git rev-parse --is-inside-work-tree &>/dev/null && tool=git || tool=ag\n    nvim +\"Grepper -tool $tool -highlight -jump -open -noswitch -query $1\"\n}\n\nva() {\n    nvim -q <(ag --vimgrep \"$@\")\n}\n\nvg() {\n    nvim -q <(git grep -nI \"$@\")\n}\n\ntest -r ~/.shenv && . ~/.shenv\n\n# vim: ft=sh fdm=marker\n"
  },
  {
    "path": ".tmux.conf",
    "content": "# tmux.conf\n\n#  bindings  {{{1\nbind-key a               send-prefix\nbind-key r               source-file ~/.tmux.conf \\; display-message 'Reloaded ~/tmux.conf'\nbind-key G               set status\nbind-key T               run-shell 'for i in {1..$(tmux list-windows | wc -l)}; do tmux next-window; done'\nbind-key ,               command-prompt \"rename-window '%%'\"\n\nbind-key s               command-prompt -p 'Send pane to:'   'join-pane -ht \"%%\"'\nbind-key j               command-prompt -p 'Join pane from:' 'join-pane -hs \"%%\"'\nbind-key B               break-pane\n\nbind-key c               new-window\nbind-key C               new-window      -c \"#{pane_current_path}\"\nbind-key |               split-window -h -c \"#{pane_current_path}\"\nbind-key -               split-window -v -c \"#{pane_current_path}\"\n\nbind-key -r n            next-window\nbind-key -r p            previous-window\nbind-key -r o            last-window\nbind-key -r Left         swap-window -t {previous}\nbind-key -r Right        swap-window -t {next}\n\nbind-key h               select-pane -L\nbind-key j               select-pane -D\nbind-key k               select-pane -U\nbind-key l               select-pane -R\n\nbind-key -n M-h          if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-h' 'select-pane -L'\nbind-key -n M-j          if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-j' 'select-pane -D'\nbind-key -n M-k          if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-k' 'select-pane -U'\nbind-key -n M-l          if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-l' 'select-pane -R'\n\nbind-key -r C-h          resize-pane -L 3\nbind-key -r C-j          resize-pane -D 3\nbind-key -r C-k          resize-pane -U 3\nbind-key -r C-l          resize-pane -R 3\n\nbind-key +               choose-buffer \"delete-buffer -b '%%'\"\nbind-key >               save-buffer ~/.tmux-exchange \\; display-message 'tmux: buffer saved'\nbind-key <               load-buffer ~/.tmux-exchange \\; display-message 'tmux: buffer loaded'\n\nbind-key v               copy-mode\nbind-key -r P            paste-buffer\n\nbind-key -T copy-mode-vi y    send -X copy-pipe-and-cancel pbcopy\nbind-key -T copy-mode-vi v    send -X begin-selection\nbind-key -T copy-mode-vi C-v  send -X rectangle-toggle\n\n#  options  {{{1\nset-option -g  prefix             C-a\nset-option -g  default-terminal   'tmux-256color'\nset-option -ga update-environment ' ITERM_PROFILE'\n\nset-option -ga terminal-overrides ',xterm-256color:Tc'\nset-option -ga terminal-overrides ',*:Setulc=\\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colors in kitty\n\nset-option -g  mode-keys          vi\nset-option -g  mouse              on\n\nset-option -gs escape-time        1\nset-option -g  repeat-time        1000\n\nset-option -g  base-index         1\nset-option -g  focus-events       on\nset-option -g  history-limit      1000\nset-option -g  status-position    top\nset-option -g  monitor-activity   off\nset-option -g  renumber-windows   on\nset-option -g  set-titles         on\nset-option -g  visual-activity    off\n\n#  statusline  {{{1\nset-option -g status-justify   centre\nset-option -g status-interval  60\n\nset-option -g window-status-current-format  ' #W '\nset-option -g window-status-format          ' #W '\n\nset-option -g  status-left   ''\n\nset-option -g  status-right  '#{?window_zoomed_flag, #[fg=colour16]#[bg=colour214] ZOOM ,}#[default] '\nset-option -ga status-right  '#[fg=colour15]#[bg=colour245] '\n# set-option -ga status-right  '#(cat ~/todo)'\nset-option -ga status-right  \"#(pmset -g batt | awk 'NR==2 { gsub(/;/, \\\"\\\"); print $3 }') #[default]\"\nset-option -ga status-right  ' #[bg=colour245] %H:%M '\n\n#  colors  {{{1\nset-option -g status-style                 fg=colour15,bg=default\nset-option -g window-status-current-style  fg=colour15,bg=colour161\nset-option -g window-status-style          fg=colour15,bg=colour24\n\nset-option -g pane-border-style            fg=colour240\nset-option -g pane-active-border-style     fg=colour240\n\nset-option -g window-status-activity-style fg=colour111\n\nset-option -g message-style                fg=colour15,bg=colour161\nset-option -g message-command-style        fg=colour15,bg=colour24\n"
  },
  {
    "path": ".travis.yml",
    "content": "sudo: false\ndist: trusty\n\naddons:\n  apt:\n    packages: shellcheck\n\nscript: shellcheck bin/mhi* bin/build* bin/bootstrap*\n"
  },
  {
    "path": ".vim/autoload/mhi.vim",
    "content": "\"\n\" Show the commit that touched the current line last.\n\"\nfunction! mhi#git_blame_current_line() abort\n  let gitdir = finddir('.git', expand('%:p').';')\n  if empty(gitdir)\n    echo 'no git'\n    return\n  endif\n  let sha = matchstr(systemlist(printf('git blame --porcelain -lL%d,+1 %s',\n        \\ line('.'), expand('%')))[0], '\\x\\+')\n  new\n  execute 'silent file fugitive://'.gitdir.'//'.sha\n  edit\n  silent! %foldopen\n  set bufhidden=wipe\n  nnoremap <silent><buffer> q :quit<cr>\nendfunction\n\n\"\n\" Show evolution of current line\n\"\nfunction mhi#git_log_evolution(startline, endline, file) abort\n  let cmd = printf('git log -L %s,%s:%s', a:startline, a:endline, a:file)\n  enew\n  set buftype=nofile\n  setfiletype git\n  let &l:statusline = cmd\n  nnoremap <silent><buffer> q :bd<cr>\n  execute 'silent! %!' cmd\nendfunction\n\n\"\n\" Close nearest open bracket.\n\"\nfunction! mhi#close_bracket() abort\n  highlight BracketRange cterm=underline\n  let pos = [0, 0]\n  let pairs = {}\n  for [open, close] in map(split(&matchpairs, ','), 'split(v:val, \":\")')\n    let pairs[open] = close\n    let m = searchpairpos(escape(open, '['), '', close, 'bnW')\n    if m[0] > pos[0]\n      let pos = m\n    elseif m[1] > pos[1] && m[0] == pos[0]\n      let pos[1] = m[1]\n    endif\n  endfor\n  if pos != [0, 0]\n    let cur = getcurpos()[1:2]\n    call clearmatches()\n    call matchadd('BracketRange',\n          \\ '\\%'.pos[0].'l\\%'.pos[1].'c.*\\_.\\+\\%'.cur[0].'l\\%'.cur[1].'c')\n    call timer_start(&matchtime * 100, {-> clearmatches()})\n    return pairs[matchstr(getline(pos[0]), '.', pos[1]-1)]\n  endif\n  return ''\nendfunction\n\n\"\n\" GitHub\n\"\nfunction! mhi#github_open_issue() abort\n  if !exists('b:git_dir')\n    return\n  endif\n  let issue = matchstr(expand('<cWORD>'), '\\d\\+')\n  if empty(issue)\n    return\n  endif\n  let remote = systemlist('git config branch.master.remote || echo origin')[0]\n  let url = systemlist(printf('git config remote.%s.url', remote))[0]\n  let slug = substitute(matchstr(url, '\\v[/:]\\zs.*'), '\\.git', '', '')\n  let url = 'https://github.com/'. slug .'/issues/'. issue\n  silent execute '!open -a Google\\ Chrome' url\nendfunction\n\nfunction! mhi#github_open_slug() abort\n  let old_isk = &iskeyword\n  let &iskeyword = 'a-z,A-z,48-57,-,_,/,.'\n  let slug = expand('<cword>')\n  let &iskeyword = old_isk\n  call system('open https://github.com/'. slug)\nendfunction\n\n\"\n\" Tmux\n\"\nfunction! mhi#tmux_navigate(direction) abort\n  let oldwin = winnr()\n  execute 'wincmd' a:direction\n  if !empty($TMUX) && winnr() == oldwin\n    let sock = split($TMUX, ',')[0]\n    let direction = tr(a:direction, 'hjkl', 'LDUR')\n    silent execute printf('!tmux -S %s select-pane -%s', sock, direction)\n  endif\nendfunction\n\n\"\n\" Smarter jumping.\n\"\nfunction! mhi#jump()\n  if (&filetype ==# 'vim' && &buftype ==# 'nofile') || &buftype ==# 'quickfix'\n    execute \"normal! \\<cr>\"\n  elseif &filetype ==# 'vim'\n    call lookup#lookup()\n  elseif &filetype ==# 'man'\n    execute \"normal \\<c-]>\"\n  elseif has_key(get(g:, 'ls#servers', {}), &filetype)\n    call ls#feature#definition()\n  else\n    let word = expand('<cword>')\n    if empty(word)\n      return\n    endif\n    try\n      execute 'tag' word\n    catch\n      echoerr substitute(v:exception, '.\\{-}:', '', '')\n      return\n    endtry\n    call halo#run()\n  endif\n  \" normal! zvzt\nendfunction\n\n\"\n\" Showing [+1 -2 ~3] in statusline.\n\"\nfunction! mhi#sy_stats_wrapper()\n  let symbols = ['+', '-', '~']\n  let [added, modified, removed] = sy#repo#get_stats()\n  let stats = [added, removed, modified]  \" reorder\n  let hunkline = ''\n  for i in range(3)\n    if stats[i] > 0\n      let hunkline .= printf('%s%s ', symbols[i], stats[i])\n    endif\n  endfor\n  if !empty(hunkline)\n    let hunkline = '%3*[%5*'. hunkline[:-2] .'%3*]%*'\n  endif\n  return hunkline\nendfunction\n\n\"\n\" Verbatim matching for *.\n\"\nfunction! mhi#search() abort\n  let regsave = @@\n  normal! gvy\n  let @/ = '\\V' . substitute(escape(@@, '\\'), '\\n', '\\\\n', 'g')\n  let @@ = regsave\nendfunction\n\n\"\n\" Jump forward/backward to next match and highlight it.\n\"\nfunction! mhi#search_highlight_next_match(cmd) abort\n  silent! call matchdelete(s:match)\n  try\n    execute 'normal!' a:cmd.'zvzz'\n  catch /E486/  \" pattern not found\n    echohl ErrorMsg | echo substitute(v:exception, '^.\\{-}:', '', '') | echohl NONE\n  endtry\n  let line = line('.')\n  let col = col('.')\n  call search(@/, 'zce', line, 100)\n  let len = col('.') - col + 1\n  call cursor(line, col)\n  let s:match = matchaddpos('IncSearch', [[line, col, len]])\nendfunction\n\n\"\n\" For 'foldtext'.\n\"\nfunction! mhi#foldy()\n  let linelen = &tw ? &tw : 80\n  let marker  = strpart(&fmr, 0, stridx(&fmr, ',')) . '\\d*'\n  let range   = foldclosedend(v:foldstart) - foldclosed(v:foldstart) + 1\n\n  let left    = substitute(getline(v:foldstart), marker, '', '')\n  let leftlen = len(left)\n\n  let right    = range . ' [' . v:foldlevel . ']'\n  let rightlen = len(right)\n\n  let tmp    = strpart(left, 0, linelen - rightlen)\n  let tmplen = len(tmp)\n\n  if leftlen > len(tmp)\n    let left    = strpart(tmp, 0, tmplen - 4) . '... '\n    let leftlen = tmplen\n  endif\n\n  let fill = repeat(' ', linelen - (leftlen + rightlen))\n\n  return left . fill . right . repeat(' ', 100)\nendfunction\n\n\"\n\" Switch to VCS root, if there is one.\n\"\nfunction! mhi#cd() abort\n  if &buftype =~# '\\v(nofile|terminal)' || expand('%') =~# '^fugitive'\n    return\n  endif\n  if !exists('s:cache')\n    let s:cache = {}\n  endif\n  let dirs   = [ '.git', '.hg', '.svn' ]\n  let curdir = mhi#normalize(resolve(expand('%:p:h')))\n  if !isdirectory(curdir)\n    echohl WarningMsg | echo 'No such directory: '. curdir | echohl NONE\n    return\n  endif\n  if has_key(s:cache, curdir)\n    execute 'lcd' fnameescape(s:cache[curdir])\n    return\n  endif\n  for dir in dirs\n    let founddir = finddir(dir, curdir .';')\n    if !empty(founddir)\n      break\n    endif\n  endfor\n  let dir = empty(founddir) ? curdir : mhi#normalize(resolve(fnamemodify(founddir, ':p:h:h')))\n  let s:cache[curdir] = dir\n  execute 'lcd' fnameescape(dir)\nendfunction\n\n\"\n\" Capture output of any command in a new window.\n\"\nfunction! mhi#scratch(cmd) abort\n  let more = &more\n  set nomore\n  try\n    let lines = 1\n    redir => lines\n    silent execute a:cmd\n  finally\n    redir END\n    let &more = more\n  endtry\n  noautocmd new\n  setlocal buftype=nofile bufhidden=hide noswapfile\n  silent put =lines\n  1\n  nnoremap <buffer> q :q<cr>\nendfunction\n\n\"\n\" Make <tab> a little bit more useful. Stolen from junegunn.\n\"\nfunction! s:can_complete(func, prefix)\n  if empty(a:func) || a:func(1, '') < 0\n    return 0\n  endif\n  let result = a:func(0, matchstr(a:prefix, '\\k\\+$'))\n  return !empty(type(result) == type([]) ? result : result.words)\nendfunction\n\nfunction! mhi#tab_yeah()\n  if pumvisible()\n    return \"\\<c-n>\"\n  endif\n  let line = getline('.')\n  let col = col('.') - 2\n  if empty(line) || line[col] !~ '\\k\\|[/~.]' || line[col + 1] =~ '\\k'\n    return \"\\<tab>\"\n  endif\n  let prefix = expand(matchstr(line[0:col], '\\S*$'))\n  if prefix =~ '^[~/.]'\n    return \"\\<c-x>\\<c-f>\"\n  endif\n  if !empty(&completefunc) && s:can_complete(function(&completefunc), prefix)\n    return \"\\<c-x>\\<c-u>\"\n  endif\n  if !empty(&omnifunc) && s:can_complete(function(&omnifunc), prefix)\n    return \"\\<c-x>\\<c-o>\"\n  endif\n  return \"\\<c-n>\"\nendfunction\n\n\"\n\" Get syntax group information. Stolen from jamessan.\n\"\nfunction! s:synnames()\n  let syn                 = {}\n  let [lnum, cnum]        = [line('.'), col('.')]\n  let [effective, visual] = [synID(lnum, cnum, 0), synID(lnum, cnum, 1)]\n  let syn.effective       = synIDattr(effective, 'name')\n  let syn.effective_link  = synIDattr(synIDtrans(effective), 'name')\n  let syn.visual          = synIDattr(visual, 'name')\n  let syn.visual_link     = synIDattr(synIDtrans(visual), 'name')\n  return syn\nendfunction\n\nfunction! mhi#syninfo()\n  let syn = s:synnames()\n  let info = ''\n  if syn.visual != ''\n    let info .= printf('visual: %s', syn.visual)\n    if syn.visual != syn.visual_link\n      let info .= printf(' (as %s)', syn.visual_link)\n    endif\n  endif\n  if syn.effective != syn.visual\n    if syn.visual != ''\n      let info .= ', '\n    endif\n    let info .= printf('effective: %s', syn.effective)\n    if syn.effective != syn.effective_link\n      let info .= printf(' (as %s)', syn.effective_link)\n    endif\n  endif\n  return info\nendfunction\n\n\"\n\" Run Exercism tests\n\"\nfunction! mhi#run_exercism_tests() abort\n  if expand('%:e') == 'vim'\n    let testfile = printf('%s/%s.vader', expand('%:p:h'),\n          \\ tr(expand('%:p:h:t'), '-', '_'))\n    if !filereadable(testfile)\n      echoerr 'File does not exist: '. testfile\n      return\n    endif\n    source %\n    execute 'Vader' testfile\n  else\n    let sourcefile = printf('%s/%s.vim', expand('%:p:h'),\n          \\ tr(expand('%:p:h:t'), '-', '_'))\n    if !filereadable(sourcefile)\n      echoerr 'File does not exist: '. sourcefile\n      return\n    endif\n    execute 'source' sourcefile\n    Vader\n  endif\nendfunction\n\n\"\n\" Find and source project-specific Vim configs\n\"\nfunction! mhi#source_project_config() abort\n  let projectfile = findfile('.project.vim', expand('%:p').';')\n  if filereadable(projectfile)\n    execute 'source' projectfile\n  endif\nendfunction\n\n\"\n\" Cycle through completion functions.\n\"\nfunction! mhi#next_completion() abort\n  let compls = [ 'emoji#complete', 'tmuxcomplete#complete' ]\n  let &cfu = compls[(index(compls, &cfu) + 1) % len(compls)]\n  echomsg 'Using '. &cfu\nendfunction\n\n\"\n\" Wrapper for :terminal\n\"\nfunction! mhi#terminal(bang, mods, cmd) abort\n  let terms = filter(map(tabpagebuflist(), 'getbufvar(v:val, ''terminal_job_id'')'), '!empty(v:val)')\n  if empty(terms)\n    execute a:mods 'new'\n    let g:terminal = termopen($SHELL)\n    $\n    if a:bang | wincmd p | endif\n  endif\n  call chansend(g:terminal, a:cmd.\"\\n\")\nendfunction\n\n\"\n\" Switch buffer. Skip buffers already shown in another window.\n\"\nfunction! mhi#switch_buffer(cmd) abort\n  try\n    execute a:cmd\n  catch /E85/  \" There is no listed buffer\n    return\n  endtry\n  let bufs = tabpagebuflist()\n  while !empty(bufs)\n    let buf = bufnr('')\n    if count(bufs, buf) == 1 | break | endif\n    execute a:cmd\n    call filter(bufs, 'v:val != '.buf)\n  endwhile\n  stopinsert\n  call halo#run()\nendfunction\n\n\"\n\" :cd chokes on UNC paths with two backslashes. Use one backslash instead.\n\"\n\" Bad:  :cd z:\\\\share\n\" Good: :cd z:\\share\n\"\nfunction! mhi#normalize(path) abort\n  return has('win32') && &shellslash == 0\n        \\ ? substitute(a:path, '\\v^(\\w):\\\\\\\\', '\\1:\\\\', '')\n        \\ : a:path\nendfunction\n\n\"\n\" Highlight the '123' in 'ctermfg=123' according to its number.\n\"\nfunction! mhi#vim_highlight_groups()\n  for c in range(256)\n    execute 'syntax match CtermFg'.c '/\\<\\%(ctermfg=\\)\\@<='.c.'\\>/ display containedin=vimHiNmbr'\n    execute 'syntax match CtermBg'.c '/\\<\\%(ctermbg=\\)\\@<='.c.'\\>/ display containedin=vimHiNmbr'\n    execute 'highlight CtermFg'.c 'ctermfg='.c 'cterm=NONE'\n    execute 'highlight CtermBg'.c 'ctermfg='.c 'cterm=NONE'\n  endfor\nendfunction\n\n\" vim: fdm=syntax\n"
  },
  {
    "path": ".vim/colors/fnord.vim",
    "content": "let g:colors_name = 'fnord'\n\nif !has('gui_running') || &termguicolors == 0\n  if exists('+termguicolors')\n    let &termguicolors = 1\n  else\n    echohl Error\n    echomsg \"vim-fnord requires a Vim supporting the 'termguicolors' option.\"\n    echohl NONE\n    finish\n  endif\nendif\n\n\" highlight clear\n\" syntax reset\n\nfunction! s:hi(group, fg, bg, gui, guisp)\n  let config = a:group\n  if !empty(a:fg)    | let config .= ' guifg='.a:fg                    | endif\n  if !empty(a:bg)    | let config .= ' guibg='.a:bg                    | endif\n  if !empty(a:gui)   | let config .= ' gui='  .a:gui . ' cterm='.a:gui | endif\n  if !empty(a:guisp) | let config .= ' guisp='.a:guisp                 | endif\n  execute 'highlight' config\nendfunction\n\nlet s:blue0   = '#35d4d9'\nlet s:blue1   = '#25909c'\nlet s:blue2   = '#013969'\nlet s:blue3   = '#05224a'\nlet s:blue4   = '#68b3da'\nlet s:blue5   = '#00c2f4'\nlet s:blue6   = '#5879bd'\nlet s:blue7   = '#124a7b'\nlet s:gray0   = '#afb8c4'\nlet s:gray1   = '#eeeeee'\nlet s:gray2   = '#555588'\nlet s:yellow0 = '#e5e568'\nlet s:purple  = '#5e50ba'\nlet s:orange  = '#d69a66'\nlet s:orange2 = '#e3c08e'\nlet s:orange3 = '#d2a500'\n\" let s:red     = '#772d26'\nlet s:green   = '#97dd7b'\nlet s:green2  = '#103850'\nlet s:red     = '#d2554f'\nlet s:red2    = '#d42a60'\nlet s:red3    = '#fb6c89'\nlet s:pink    = '#d371e3'\n\ncall s:hi('Normal', s:gray0, s:blue2, 'NONE', '')\n\ncall s:hi('NormalFloat', '', s:blue3,  'NONE', '')\ncall s:hi('FloatBorder', s:red3, s:blue3, 'NONE', '')\n\n\" call s:hi('StatusLine', 'black', s:blue0, 'NONE', '')\ncall s:hi('StatusLine', s:gray0, s:blue7, 'bold', '')\ncall s:hi('StatusLineNC', s:gray0, s:blue7, 'NONE', '')\n\ncall s:hi('User1', '#6acdef', s:blue7, 'bold', '')  \" main/master branch\ncall s:hi('User2', s:yellow0, s:blue7, 'bold', '')  \" other branch\ncall s:hi('User3', s:blue7,   s:blue7, '',     '')  \" hunkline brackets\ncall s:hi('User4', s:green,   s:blue7, 'bold', '')  \" filename\ncall s:hi('User5', '#ef8a55', s:blue7, '',     '')  \" hunkline\ncall s:hi('User6', s:blue6,   s:blue7, '',     '')  \" separators\n\ncall s:hi('TabLineSel', 'black', s:blue5, 'NONE', '')\ncall s:hi('TabLine', s:gray0, s:blue7, 'NONE', '')\ncall s:hi('TabLineFill', s:gray1, s:blue2, 'NONE', '')\n\ncall s:hi('Visual', s:blue2, s:green, 'NONE', 'NONE')\ncall s:hi('CursorLine', '', s:blue7, 'NONE', 'NONE')\n\ncall s:hi('Special', s:gray0, '', 'NONE', '')\ncall s:hi('Statement' , s:pink, '' , 'NONE', '')\ncall s:hi('Function', s:yellow0, '', 'NONE', '')\ncall s:hi('Identifier', s:blue0, '', 'NONE', '')\ncall s:hi('PreProc', s:blue0, '', 'NONE', '')\ncall s:hi('String', s:green, '', 'NONE', '')\ncall s:hi('Type', s:blue0, '', 'bold', '')\ncall s:hi('VertSplit', '', s:blue7, 'NONE', '')\ncall s:hi('Comment', s:blue4, '', 'NONE', '')\ncall s:hi('Folded', s:gray1, s:blue1, 'NONE', '')\ncall s:hi('EndOfBuffer', s:blue4, '', 'NONE', '')\ncall s:hi('Constant', s:orange, '', 'NONE', '')\ncall s:hi('NonText', s:blue6, '', 'NONE', '')\n\ncall s:hi('LineNr', s:blue6, s:blue2, 'NONE', '')\ncall s:hi('CursorLineNr', s:yellow0, s:blue2, 'NONE', '')\ncall s:hi('SignColumn', s:orange, s:blue2, 'NONE', '')\n\ncall s:hi('DiffAdd', s:green, s:blue2, 'NONE', '')\ncall s:hi('DiffChange', s:orange, s:blue2, 'NONE', '')\ncall s:hi('DiffDelete', s:red3, s:blue2, 'NONE', '')\n\ncall s:hi('Pmenu', s:blue4, s:blue3, 'NONE', '')\ncall s:hi('PmenuSel', 'black', s:orange, 'NONE', '')\ncall s:hi('PmenuSbar', 'black', s:blue3, 'NONE', '')\ncall s:hi('PmenuThumb', 'black', s:blue2, 'NONE', '')\n\ncall s:hi('RFCType', s:blue6, '', 'NONE', '')\ncall s:hi('RFCID', s:blue4, '', 'NONE', '')\ncall s:hi('RFCDelim', s:blue6, '', 'NONE', '')\n\ncall s:hi('ErrorMsg', s:red3, s:blue2, 'bold', '')\ncall s:hi('Todo', s:yellow0, s:blue2, 'bold', '')\ncall s:hi('Question', s:pink, s:blue2, 'bold', '')\n\ncall s:hi('QuickFixLine', s:orange2, '', 'bold', '')\n\ncall s:hi('Search', 'black', s:yellow0, 'NONE', '')\ncall s:hi('IncSearch', 'black', s:red3, 'NONE', '')\n\nhighlight default link diffAdded     DiffAdd\nhighlight default link diffRemoved   DiffDelete\nhighlight default link diffFile      Comment\nhighlight default link diffNewFile   Comment\nhighlight default link diffLine      Comment\nhighlight default link diffIndexLine Comment\nhighlight default link diffSubname   Comment\n"
  },
  {
    "path": ".vim/lua/config.lua",
    "content": "local mapopts = { noremap = true, silent = true }\n\n-- lsp {{{1\nlocal function default_lsp_settings(_client, _bufnr)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<cr>',       '<cmd>lua vim.lsp.buf.definition()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', 'gd',         '<cmd>lua vim.lsp.buf.declaration()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', 'K',          '<cmd>lua vim.lsp.buf.hover()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>jc', '<cmd>lua vim.lsp.buf.code_action()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>jn', '<cmd>lua vim.lsp.buf.rename()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>jr', '<cmd>lua vim.lsp.buf.references()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>jt', '<cmd>lua vim.lsp.buf.type_definition()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>js', '<cmd>lua vim.lsp.buf.signature_help()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '<leader>jd', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, border = \"single\"})<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', '[d',         '<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>', mapopts)\n  vim.api.nvim_buf_set_keymap(0, 'n', ']d',         '<cmd>lua vim.lsp.diagnostic.goto_next()<cr>', mapopts)\n\n  vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.vim.lsp.omnifunc')\n  -- if client.resolved_capabilities.document_formatting then\n  --   buf_set_keymap(\"n\", \"<space>f\", \"<cmd>lua vim.lsp.buf.formatting()<CR>\", opts)\n  -- end\n  -- if client.resolved_capabilities.document_range_formatting then\n  --   buf_set_keymap(\"v\", \"<space>f\", \"<cmd>lua vim.lsp.buf.range_formatting()<CR>\", opts)\n  -- end\nend\n\nvim.fn.sign_define('LspDiagnosticsSignError',       {text = '', texthl = 'LspDiagnosticsSignError'})\nvim.fn.sign_define('LspDiagnosticsSignWarning',     {text = '', texthl = 'LspDiagnosticsSignWarning'})\nvim.fn.sign_define('LspDiagnosticsSignHint',        {text = '', texthl = 'LspDiagnosticsSignHint'})\nvim.fn.sign_define('LspDiagnosticsSignInformation', {text = '', texthl = 'LspDiagnosticsSignInformation'})\n\nvim.cmd('highlight! link FloatBorder NormalFloat')\nvim.cmd('command! LspLog :lua vim.cmd(\"edit\" .. vim.lsp.get_log_path())')\n\n-- https://en.wikipedia.org/wiki/Box-drawing_character\nvim.lsp.handlers['textDocument/hover'] = vim.lsp.with(\n  vim.lsp.handlers.hover, {\n    -- border = 'double'\n    border = {\n      {\"╭\", \"NormalFloat\"},\n      {\"─\", \"NormalFloat\"},\n      {\"╮\", \"NormalFloat\"},\n      {\"│\", \"NormalFloat\"},\n      {\"╯\", \"NormalFloat\"},\n      {\"─\", \"NormalFloat\"},\n      {\"╰\", \"NormalFloat\"},\n      {\"│\", \"NormalFloat\"},\n    }\n  }\n)\n\nvim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(\n  vim.lsp.diagnostic.on_publish_diagnostics, {\n    signs = { priority = 11 },\n    underline = true,\n    virtual_text = true,\n    update_in_insert = false,\n  }\n)\n\nlocal lspconfig = require('lspconfig')\n\nlspconfig.util.default_config = vim.tbl_extend('force', lspconfig.util.default_config, {\n  autostart = false,\n  on_attach = default_lsp_settings,\n})\n\nfor _, v in pairs({'gopls', 'pyright', 'rust_analyzer'}) do\n  lspconfig[v].setup({})\nend\n\nlspconfig.clangd.setup({\n  cmd = {'/Library/Developer/CommandLineTools/usr/bin/clangd', '--background-index'},\n  autostart = true,\n})\n\nlocal sumneko_root_path = '/Users/mhi/data/lua/lua-language-server'\nlocal sumneko_bin = '/bin/macos/lua-language-server'\n\nlspconfig.sumneko_lua.setup({\n   cmd = {sumneko_root_path .. sumneko_bin, '-E', sumneko_root_path .. '/main.lua'},\n   settings = {\n      Lua = {\n         runtime = {\n            version = 'LuaJIT',\n            -- path = vim.split(package.path, ';'),\n         },\n         workspace = {\n            library = {\n               -- ['/Users/mhi/data/github/neovim/neovim/runtime/lua'] = true,\n               -- ['/Users/mhi/data/github/neovim/neovim/runtime/lua/vim/lsp'] = true,\n               -- ['/Users/mhi/data/github/neovim/neovim/.deps/usr/share/lua/busted'] = true,\n            },\n            -- preloadFileSize = 50;\n            -- ignoreDir = { 'data' }\n         },\n         diagnostics = {\n            globals = {'vim', 'describe', 'it', 'before_each', 'after_each', 'pending',\n                       'teardown'},\n            -- disable = {'lowercase-global', 'unused-function'},\n         },\n         -- completion = {\n         --    keywordSnippet = \"Disable\",\n         -- },\n      },\n   },\n})\n\n-- treesitter {{{1\nrequire('nvim-treesitter.configs').setup({\n  highlight = {\n    enable = {'c', 'lua', 'javascript', 'typescript'}\n  },\n  textobjects = {\n    select = {\n      enable = true\n    }\n  }\n})\n\n-- telescope {{{1\n-- require('telescope').load_extension('spotlight')\n\nvim.api.nvim_set_keymap('n', '<leader>ff', '<cmd>Telescope find_files<cr>', mapopts)\nvim.api.nvim_set_keymap('n', '<leader>fg', '<cmd>Telescope live_grep<cr>', mapopts)\nvim.api.nvim_set_keymap('n', '<leader>fb', '<cmd>Telescope buffers<cr>', mapopts)\nvim.api.nvim_set_keymap('n', '<leader>fh', '<cmd>Telescope help_tags<cr>', mapopts)\n\n-- hop {{{1\nrequire('hop').setup({ teasing = false })\n\nvim.api.nvim_set_keymap('n', '<space>',   '<cmd>HopChar2<cr>', mapopts)\nvim.api.nvim_set_keymap('n', '<c-space>', '<cmd>HopWord<cr>', mapopts)\n\n-- colorizer {{{1\nif vim.o.termguicolors then\n  require('colorizer').setup({'vim'})\nend\n\n-- vim: nowrap\n"
  },
  {
    "path": ".vim/vimrc",
    "content": "\"\n\"                         ███████████████████████████\n\"                         ███████▀▀▀░░░░░░░▀▀▀███████\n\"                         ████▀░░░░░░░░░░░░░░░░░▀████\n\"                         ███│░░░░░░░░░░░░░░░░░░░│███\n\"                         ██▌│░░░░░░░░░░░░░░░░░░░│▐██\n\"                         ██░└┐░░░░░░░░░░░░░░░░░┌┘░██\n\"                         ██░░└┐░░░░░░░░░░░░░░░┌┘░░██\n\"                         ██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██\n\"                         ██▌░│██████▌░░░▐██████│░▐██\n\"                         ███░│▐███▀▀░░▄░░▀▀███▌│░███\n\"                         ██▀─┘░░░░░░░▐█▌░░░░░░░└─▀██\n\"                         ██▄░░░▄▄▄▓░░▀█▀░░▓▄▄▄░░░▄██\n\"                         ████▄─┘██▌░░░░░░░▐██└─▄████\n\"                         █████░░▐█─┬┬┬┬┬┬┬─█▌░░█████\n\"                         ████▌░░░▀┬┼┼┼┼┼┼┼┬▀░░░▐████\n\"                         █████▄░░░└┴┴┴┴┴┴┴┘░░░▄█████\n\"                         ███████▄░░░░░░░░░░░▄███████\n\"                         ██████████▄▄▄▄▄▄▄██████████\n\"                         ███████████████████████████\n\"\n\"   You are about to experience a potent dosage of Vim. Watch your steps.\n\"\n\"                ╔══════════════════════════════════════════╗\n\"                ║           ⎋ HERE BE VIMPIRES ⎋           ║\n\"                ╚══════════════════════════════════════════╝\n\nlet s:is_win = has('win32')\nlet $v = $HOME.(s:is_win ? '\\vimfiles' : '/.vim')\n\nif s:is_win\n  set shell=cmd.exe\n  set shellcmdflag=/c\n  set encoding=utf-8\nendif\n\n\" Plug {{{1\nlet s:bundle_dir = $v.'/bundle'\n\nlet g:plug_shallow = 0\nlet g:plug_window  = 'enew'\nlet g:plug_pwindow = 'vertical rightbelow new'\n\ncall plug#begin(s:bundle_dir)\n  Plug 'jonathanfilip/vim-lucius'\n  Plug 'arcticicestudio/nord-vim'\n  Plug 'mhartington/oceanic-next'\n  Plug 'joshdick/onedark.vim'\n\n  Plug 'AndrewRadev/splitjoin.vim'\n  Plug 'chrisbra/unicode.vim', {'on': ['UnicodeName', 'UnicodeTable']}\n  Plug 'godlygeek/csapprox', {'for': 'fugitiveblame' }\n  Plug 'junegunn/fzf', has('win32') ? {} : {'on': 'FZF', 'dir': '~/local/fzf', 'do': './install --bin'}\n  Plug 'junegunn/vim-easy-align', {'on': '<plug>(LiveEasyAlign)'}\n  Plug 'junegunn/vim-plug'\n  Plug 'tpope/vim-commentary'\n  Plug 'tpope/vim-endwise'\n  Plug 'tpope/vim-fugitive'\n  Plug 'tpope/vim-repeat'\n  Plug 'tpope/vim-rhubarb'\n  Plug 'tpope/vim-rsi'\n  Plug 'tpope/vim-scriptease'\n  Plug 'tpope/vim-surround'\n\n  if has('nvim-0.5')\n    Plug 'neovim/nvim-lspconfig'\n    Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}\n    Plug 'nvim-treesitter/nvim-treesitter-refactor'\n    Plug 'nvim-treesitter/nvim-treesitter-textobjects'\n    Plug 'nvim-treesitter/playground'\n    Plug 'norcalli/nvim-colorizer.lua'\n    Plug 'nvim-lua/plenary.nvim'\n    Plug 'nvim-telescope/telescope.nvim'\n    Plug 'mhinz/telescope-spotlight.nvim'\n    Plug 'bfredl/luarefvim'\n    Plug 'phaazon/hop.nvim'\n  endif\n\n  let g:plug_url_format = 'git@github.com:%s.git'\n  Plug 'mhinz/vim-crates'\n  Plug 'mhinz/vim-grepper'\n  Plug 'mhinz/vim-halo'\n  Plug 'mhinz/vim-janah'\n  Plug 'mhinz/vim-lookup'\n  Plug 'mhinz/vim-mix-format'\n  Plug 'mhinz/vim-rfc'\n  Plug 'mhinz/vim-sayonara', {'on': 'Sayonara'}\n  Plug 'mhinz/vim-signify'\n  Plug 'mhinz/vim-startify'\n  Plug 'mhinz/vim-tree'\n  unlet! g:plug_url_format\ncall plug#end()\n\nif has('nvim-0.5')\n  lua require 'config'\n  lua require 'tree'\nendif\n\n\" Init {{{1\nif has('nvim')\n  let $GIT_EDITOR = 'nvr -cc split --remote-wait'\n  let $ELIXIR_EDITOR = 'nvr -l +__LINE__ __FILE__'\n  if v:progpath =~# 'build/bin/nvim$'\n    \" for build/runtime/syntax/vim/generated.vim\n    let &runtimepath .= ','.$VIM.'/build/runtime'\n  endif\nelse\n  filetype plugin indent on\n  syntax on\n  packadd! matchit\nendif\n\nlet g:vimsyn_embed   = 'l'\nlet g:vimsyn_folding = 'f'\nlet g:is_bash        = 1\nlet g:lisp_rainbow   = 1\n\nlet g:markdown_fenced_languages = ['vim']\n\nlet g:loaded_2html_plugin     = 1\nlet g:loaded_getscriptPlugin  = 1\nlet g:loaded_gzip             = 1\nlet g:loaded_logipat          = 1\n\" let g:loaded_matchit          = 1\n\" let g:loaded_matchparen       = 1\nlet g:loaded_rrhelper         = 1\nlet g:loaded_spellfile_plugin = 1\nlet g:loaded_tarPlugin        = 1\nlet g:loaded_vimballPlugin    = 1\nlet g:loaded_zipPlugin        = 1\n\naugroup vimrc\n  autocmd!\naugroup END\n\n\" Option {{{1\n\" indent settings\nset autoindent\nset cinoptions    =l1,p0,)50,*50,t0\nset expandtab\nset smarttab\nset softtabstop   =2\nset shiftwidth    =2\nset shiftround\n\n\" backup/swap/info/undo settings\nset nobackup\nset nowritebackup\nset undofile\nset swapfile\nif has('nvim')\n  set backupdir  -=.\n  set shada       ='100\nelse\n  set backupdir   =$v/files/backup\n  set directory   =$v/files/swap//\n  set undodir     =$v/files/undo\n  set viewdir     =$v/files/view\n  set viminfo     ='100,n$v/files/info/viminfo\nendif\n\n\" better navigation\nset cursorline\nset foldmethod    =marker\nset foldopen     -=hor\nset foldopen     +=jump\nset foldtext      =mhi#foldy()\nset hlsearch\nset incsearch\nset mouse         =a\nset scrolloff     =4\nset sidescroll    =5\nset ignorecase\nset smartcase\nset tagcase       =match\n\n\" misc settings\nset autoread\nset backspace     =indent,eol,start\nset clipboard     =unnamed\nset complete     -=i\nset completeopt  +=noselect\nset diffopt      +=vertical,foldcolumn:0,indent-heuristic,algorithm:patience\nset fileformats   =unix,dos,mac\nset hidden\nset history       =1000\nset lazyredraw\nset more\nset mousemodel    =popup\nset noautowrite\nset noautowriteall\nset noequalalways\nset noerrorbells\nset nofsync\nset nojoinspaces\nset wrapscan\nset nrformats     =hex\nset pastetoggle   =<F5>\nset norelativenumber\nset report        =0\nset sessionoptions-=options\nset sessionoptions+=localoptions\nset showfulltag\nset showtabline   =1\nset splitbelow\nset splitright\nset switchbuf     =\nset synmaxcol     =200\nset tags         ^=./.git/tags;\nset timeout\nset timeoutlen    =1000\nset titlestring   =VIM:\\ %f\nset ttimeout\nset ttimeoutlen   =10\nset ttyfast\nset virtualedit   =onemore,block\nset whichwrap     =h,l\n\n\" wild stuff\nset suffixes     +=.a,.1,.class\nset wildignore   +=*.o,*.so,*.zip,*.png\nset wildmenu\nset wildoptions   =tagfile\nif has('nvim')\n  set wildoptions+=pum\nelse\n  set wildmode=list:longest,full\nendif\n\n\" display settings\nset display      +=lastline\nset laststatus    =2\nset list\nset modeline\nset modelines     =1\nset nostartofline\nset numberwidth   =1\nset ruler\nset shortmess     =aoOTI\nset showcmd\nset showmatch\nset showmode\n\n\" spelling\nset spellfile     =~/.vim/spell/en.utf-8.add,~/.vim/spell/de.utf-8.add\nset spelllang     =en,de\n\n\" breaking\nset wrap\nset nolinebreak\nset breakindent\nset breakindentopt=min:40\n\"set highlight    +=@:SpecialKey\n\nset cpoptions     =aABcefFqsZ\nset formatoptions =tcrqnj\n\nif has('multi_byte') && &encoding ==# 'utf-8'\n  let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±,trail:⣿'\n  let &fillchars = 'vert: ,diff: '  \" ▚\n  let &showbreak = '↪ '\n  highlight VertSplit ctermfg=242\n  \" augroup vimrc\n  \"   autocmd InsertEnter * set listchars-=trail:⣿\n  \"   autocmd InsertLeave * set listchars+=trail:⣿\n  \" augroup END\nelse\n  let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'\n  let &fillchars = 'vert: ,stlnc:#'\n  let &showbreak = '-> '\n  augroup vimrc\n    autocmd InsertEnter * set listchars-=trail:.\n    autocmd InsertLeave * set listchars+=trail:.\n  augroup END\nendif\n\nif has('nvim')\n  set signcolumn=auto:2\nendif\n\n\" Mapping {{{1\nlet mapleader = ';'\nnnoremap \\ ;\n\ninoremap jf <esc>\n\nnnoremap gh :call mhi#github_open_issue()<cr>\nnnoremap gH :call mhi#github_open_slug()<cr>\n\ninoremap <expr> <tab> mhi#tab_yeah()\ninoremap <expr> <c-]> mhi#close_bracket()\n\nnnoremap <silent> <tab> <c-w>w:call halo#run()<cr>\nnnoremap <silent> <c-p> :call mhi#switch_buffer('bprevious')<cr>\nnnoremap <silent> <c-n> :call mhi#switch_buffer('bnext')<cr>\nnnoremap <silent> [b    :call mhi#switch_buffer('bprevious')<cr>\nnnoremap <silent> ]b    :call mhi#switch_buffer('bnext')<cr>\nnnoremap <silent> [q    :cprevious<bar>call halo#run()<cr>\nnnoremap <silent> ]q    :cnext<bar>call halo#run()<cr>\nnnoremap <silent> [l    :lprevious<bar>call halo#run()<cr>\nnnoremap <silent> ]l    :lnext<bar>call halo#run()<cr>\nnnoremap <silent> [t    :tabprevious<bar>call halo#run()<cr>\nnnoremap <silent> ]t    :tabnext<bar>call halo#run()<cr>\n\nnnoremap [<space>  :<c-u>put! =repeat(nr2char(10), v:count1)<cr>'[\nnnoremap ]<space>  :<c-u>put =repeat(nr2char(10), v:count1)<cr>\n\nnnoremap [e  :<c-u>execute 'move -1-'. v:count1<cr>\nnnoremap ]e  :<c-u>execute 'move +'. v:count1<cr>\n\n\" switch comma-separated arguments\nnnoremap [w  :normal F,h]w2w<cr>\nnnoremap ]w  :let s=&isk \\| setl isk+=\\\",' \\| exe \"norm diwmmebgPdw'mP\" \\| let &isk=s<cr>\n\nnnoremap }   }zz\nnnoremap {   {zz\nnnoremap ]]  ]]zz\nnnoremap [[  [[zz\nnnoremap []  []zz\nnnoremap ][  ][zz\n\nnnoremap g;  g;zvzz\nnnoremap g,  g,zvzz\n\nnnoremap <left>   <c-w>>\nnnoremap <right>  <c-w><\nnnoremap <up>     <c-w>-\nnnoremap <down>   <c-w>+\n\nnnoremap <silent><a-h>  :<c-u>call mhi#tmux_navigate('h')<cr>\nnnoremap <silent><a-j>  :<c-u>call mhi#tmux_navigate('j')<cr>\nnnoremap <silent><a-k>  :<c-u>call mhi#tmux_navigate('k')<cr>\nnnoremap <silent><a-l>  :<c-u>call mhi#tmux_navigate('l')<cr>\n\nxnoremap <  <gv\nxnoremap >  >gv\n\nonoremap gv  :<c-u>normal! gv<cr>\n\nnnoremap Q  gqap\n\nnnoremap <leader>ev  :edit $MYVIMRC<cr>\nnnoremap <leader>em  :edit ~/.vim/autoload/mhi.vim<cr>\n\nnnoremap <leader>si  :echo mhi#syninfo()<cr>\nnnoremap <leader>ss  :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, \"name\")')<cr>\n\nnnoremap <leader>m  :Messages<cr>\nnnoremap <leader>M  :<c-u><c-r><c-r>='let @'. v:register .' = '. string(getreg(v:register))<cr><c-f><left>\n\" nnoremap <leader>o  :!echo `git url`/blob/`git rev-parse --abbrev-ref HEAD`/%\\#L<C-R>=line('.')<cr> \\| xargs open<cr><cr>\nnnoremap <leader>o  :silent !open <c-r>=fnameescape('<c-r><c-a>')<cr><cr>\nnnoremap <leader>w  :update<cr>\nnnoremap <leader>x  :xit<cr>\nnnoremap <leader>l  :noh<bar>diffupdate<bar>call clearmatches()<bar>syntax sync fromstart<cr><c-l>\nnnoremap <leader>v  :Runtime<cr>\nnnoremap <leader>t  :Tree<cr>\nnnoremap <silent> <leader>d  :Dirview<cr>\n\" nnoremap <silent> <leader>d  :exe 'sil !open' fnameescape(printf('https://devdocs.io/#q=%s%%20%s', &ft, expand('<cword>')))<cr>\n\nnnoremap <silent><leader>b  :call mhi#git_blame_current_line()<cr>\n\nnnoremap '  `\nnnoremap `  '\n\nnnoremap <bs>  <c-t>\nnnoremap <silent><cr>  :call mhi#jump()<cr>\n\ncnoremap <expr> <c-n> wildmenumode() ? \"\\<c-n>\" : \"\\<down>\"\ncnoremap <expr> <c-p> wildmenumode() ? \"\\<c-p>\" : \"\\<up>\"\n\ncnoremap <leader>r   $VIMRUNTIME/\ncnoremap <leader>ft  ~/.vim/after/ftplugin/\n\nnnoremap <silent> n  :call mhi#search_highlight_next_match('Nn'[v:searchforward])<cr>\nnnoremap <silent> N  :call mhi#search_highlight_next_match('nN'[v:searchforward])<cr>\n\nxnoremap *  :<c-u>call mhi#search()<cr>//<cr>\nxnoremap #  :<c-u>call mhi#search()<cr>??<cr>\n\nif has('nvim')\n  nnoremap <leader>T      :vsplit +terminal<cr>\n  tnoremap <esc>          <c-\\><c-n>\n  tnoremap <silent><a-h>  <c-\\><c-n>:<c-u>call mhi#tmux_navigate('h')<cr>\n  tnoremap <silent><a-j>  <c-\\><c-n>:<c-u>call mhi#tmux_navigate('j')<cr>\n  tnoremap <silent><a-k>  <c-\\><c-n>:<c-u>call mhi#tmux_navigate('k')<cr>\n  tnoremap <silent><a-l>  <c-\\><c-n>:<c-u>call mhi#tmux_navigate('l')<cr>\nendif\n\nif !has('nvim')\n  if empty($TMUX)\n    let &t_SI = \"\\<Esc>]50;CursorShape=1\\x7\"\n    let &t_EI = \"\\<Esc>]50;CursorShape=0\\x7\"\n    let &t_SR = \"\\<Esc>]50;CursorShape=2\\x7\"\n  else\n    let &t_SI = \"\\<Esc>Ptmux;\\<Esc>\\<Esc>]50;CursorShape=1\\x7\\<Esc>\\\\\"\n    let &t_EI = \"\\<Esc>Ptmux;\\<Esc>\\<Esc>]50;CursorShape=0\\x7\\<Esc>\\\\\"\n    let &t_SR = \"\\<Esc>Ptmux;\\<Esc>\\<Esc>]50;CursorShape=2\\x7\\<Esc>\\\\\"\n  endif\nendif\n\n\" Autocmd {{{1\naugroup vimrc\n  \" foldopen=hor sucks\n  autocmd BufWinEnter * normal! zvzz\n\n  if has('nvim')\n    autocmd TermOpen,BufEnter term://* startinsert\n  endif\n\n  autocmd BufReadPost *\n        \\ if line(\"'\\\"\") > 1 && line(\"'\\\"\") <= line(\"$\") |\n        \\   execute 'normal! g`\"' |\n        \\ endif\n\n  autocmd WinEnter    * set cursorline\n  autocmd WinLeave    * set nocursorline\n  autocmd InsertEnter * set nocursorline\n  autocmd InsertLeave * set cursorline\n\n  autocmd FocusGained * call halo#run()\n\n  autocmd CompleteDone * pclose\naugroup END\n\n\" Command {{{1\ncommand! -nargs=1 -complete=command Scratch call mhi#scratch(<f-args>)\ncommand! CleanSpell  runtime! spell/cleanadd.vim\ncommand! Cd call mhi#cd()\ncommand! -range Evo call mhi#git_log_evolution(<line1>, <line2>, expand('%'))\ncommand! Changed exe 'args' join(map(systemlist('git diff --name-only --relative \"$@\" 2>/dev/null'), 'fnameescape(v:val)'))\ncommand! -nargs=1 -bang T call mhi#terminal(<bang>0, <f-mods>, <f-args>)\ncommand! Signs PP sign_getplaced('.', {'lnum': line('.'), 'group': '*'})\n\nif has('nvim')\n  command! LuaG lua print(vim.inspect(_G))\n  command! LspClients lua print(vim.inspect(vim.lsp.buf_get_clients()))\nendif\n\n\" Color {{{1\nfunction! s:colors_default() abort\n  \" highlight Comment cterm=italic\n  highlight link User1 StatusLine   \" master branch\n  highlight link User2 StatusLine   \" other branch\n  highlight link User3 StatusLine   \" separators\n  highlight link User4 StatusLine   \" filename at beginning\n  highlight link User5 StatusLine   \" ~changes\n  \" highlight SignifySignAdd ctermfg=151 ctermbg=NONE cterm=NONE\n  \" highlight SignifySignDelete ctermfg=181 ctermbg=NONE cterm=NONE\n  \" highlight SignifySignChange ctermfg=187 ctermbg=NONE cterm=NONE\n  \" highlight Halo guifg=white guibg=#F92672 ctermfg=white ctermbg=197\nendfunction\n\nfunction! s:colors_fnord() abort\n  highlight link StartifyPath Identifier\n  highlight link StartifyFile Directory\nendfunction\n\nfunction! s:colors_janah() abort\n  highlight User1  ctermfg=192 ctermbg=237 cterm=NONE\n  highlight User2  ctermfg=167 ctermbg=237 cterm=NONE\n  highlight User3  ctermfg=245 ctermbg=237 cterm=NONE\n  highlight User4  ctermfg=215 ctermbg=237 cterm=NONE\n  highlight User5  ctermfg=111 ctermbg=237 cterm=NONE\nendfunction\n\nfunction! s:colors_lucius() abort\n  if &background ==# 'light'\n    highlight Normal                  ctermbg=NONE guibg=NONE\n    highlight CursorLine              ctermbg=255\n    highlight User1      ctermfg=84   ctermbg=237  cterm=NONE\n    highlight User2      ctermfg=222  ctermbg=237  cterm=NONE\n    highlight User3      ctermfg=237  ctermbg=237  cterm=NONE\n    highlight User4      ctermfg=255  ctermbg=237  cterm=NONE\n    highlight User5      ctermfg=255  ctermbg=237  cterm=NONE\n    highlight StatusLine              ctermbg=237  cterm=NONE\n    highlight SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE\n    highlight Question   ctermfg=24   ctermbg=255  cterm=NONE\n    highlight Search     ctermfg=fg   ctermbg=222  cterm=NONE\n    highlight Folded                  ctermbg=253  cterm=NONE\n    \" highlight NormalFloat ctermfg=231 ctermbg=240  cterm=NONE\n    highlight NormalFloat ctermfg=0   ctermbg=223  cterm=NONE\n    highlight DirviewArchive    ctermfg=31\n    highlight DirviewDirectory  ctermfg=88\n    highlight DirviewImage      ctermfg=29\n    highlight DirviewVideo      ctermfg=115\n  endif\nendfunction\n\naugroup vimrc\n  autocmd ColorScheme *      call s:colors_default()\n  autocmd ColorScheme janah  call s:colors_janah()\n  autocmd ColorScheme lucius call s:colors_lucius()\n  autocmd ColorScheme fnord  call s:colors_fnord()\naugroup END\n\nif has('gui_running')\n  set background=light\n  colorscheme lucius\n  set guioptions=a\n  set mousehide\n  if s:is_win\n    autocmd GUIEnter * simalt ~x\n    let &guifont = 'Consolas:h10:b'\n  elseif has('gui_macvim')\n    set macmeta\n    let &guifont = 'Source Code Pro:h13'\n  endif\n  command! Bigger  let &guifont = substitute(&guifont, '\\d\\+', '\\=submatch(0)+1', '')\n  command! Smaller let &guifont = substitute(&guifont, '\\d\\+', '\\=submatch(0)-1', '')\nelse\n  set termguicolors\n  if !has('nvim')\n    let &t_8f = \"\\<Esc>[38:2:%lu:%lu:%lum\"\n    let &t_8b = \"\\<Esc>[48:2:%lu:%lu:%lum\"\n  endif\n  if $TERM =~ 'alacritty'\n    set background=dark\n    color janah\n    highlight Normal ctermbg=236\n  elseif $ITERM_PROFILE == 'Light'\n    set background=light\n    colorscheme lucius\n  else\n    set background=dark\n    colorscheme fnord\n  endif\nendif\n\n\" Statusline {{{1\ncommand! -bar ToggleStatusline let b:stl_location  = !get(b:, 'stl_location')\ncommand! -bar ToggleHighlight  let b:stl_highlight = !get(b:, 'stl_highlight')\n\nnnoremap <silent><f10> :ToggleStatusline<cr>\nnnoremap <silent><f11> :ToggleHighlight<cr>\n\nset statusline=%!SetStatusline()\n\nfunction! SetStatusline()\n  let stl = ' %4*%<%f%*'\n\n  if exists('b:git_dir')\n    let stl    .= '%3*:%*'\n    let branch  = fugitive#head(8)\n    let stl    .= ((branch =~# 'master\\|main') ? '%1*' : '%2*'). branch .'%*'\n    let stl    .= mhi#sy_stats_wrapper()\n  endif\n\n  let stl .= '%m%r%h%w '\n\n  \" right side\n  let stl .=\n        \\   '%= '\n        \\ . '%#ErrorMsg#%{&paste ? \" paste \" : \"\"}%*'\n        \\ . '%#WarningMsg#%{&ff != \"unix\" ? \" \".&ff.\" \":\"\"}%* '\n        \\ . '%#warningmsg#%{&fenc != \"utf-8\" && &fenc != \"\" ? \" \".&fenc.\" \" :\"\"}%* '\n\n  if get(b:, 'stl_highlight')\n    let id = synID(line('.'), col('.'), 1)\n    let stl .=\n          \\   '%#WarningMsg#['\n          \\ . '%{synIDattr('.id.',\"name\")} as '\n          \\ . '%{synIDattr(synIDtrans('.id.'),\"name\")}'\n          \\ . ']%* '\n  endif\n\n  if get(b:, 'stl_location')\n    let stl .=\n          \\   '%3*[%*%v%3*,%*%l%3*/%*%L%3*]%* '\n          \\ . '%p%3*%%%* '\n  endif\n\n  return stl\nendfunction\n\" }}}1\n\n\" Plugin {{{1\n\" Plugin: fzf {{{2\nset runtimepath+=~/local/fzf\n\nlet g:fzf_layout = {'down': '40%'}\n\nnnoremap <leader><leader> :Buffers<cr>\nnnoremap <leader>C        :Colorschemes<cr>\nnnoremap <leader>P        :Plugins<cr>\nnnoremap <leader>S        :Scriptnames<cr>\nnnoremap <leader>f        :FZF<cr>\n\nfunction! s:buflist()\n  return map(filter(range(1, bufnr('$')),\n        \\ 'bufloaded(v:val)'), 'printf(\"%s: %s\", v:val, bufname(v:val))')\nendfunction\n\nfunction! s:bufopen(lines)\n  if len(a:lines) < 2 | return | endif\n  let cmd = get({\n        \\ 'ctrl-s': 'split',\n        \\ 'ctrl-v': 'vsplit',\n        \\ 'ctrl-t': 'tabedit'\n        \\ }, a:lines[0], 'edit')\n  execute cmd '+b'.matchstr(a:lines[1], '^\\d\\+')\nendfunction\n\nfunction! s:plugopen(entry)\n  execute 'Dirvish' expand(s:bundle_dir) .'/'. a:entry\n  execute 'lcd' expand('%')\nendfunction\n\ncommand! Buffers let bl = reverse(s:buflist()) | call fzf#run({\n      \\ 'source':  bl,\n      \\ 'sink*':   function('<sid>bufopen'),\n      \\ 'options': '+m --expect=ctrl-s,ctrl-v,ctrl-t',\n      \\ 'down':    len(bl) + 2,\n      \\ }) | unlet bl\n\ncommand! Plugins call fzf#run({\n      \\ 'source':  reverse(sort(map(globpath(s:bundle_dir, '*', 0, 1), 'fnamemodify(v:val, \":t\")'))),\n      \\ 'sink':    function('<sid>plugopen'),\n      \\ 'options': '+m',\n      \\ 'left':    30\n      \\ })\n\ncommand! Colorschemes call fzf#run({\n      \\ 'source':  reverse(sort(map(globpath(&rtp, 'colors/*.vim', 0, 1), 'fnamemodify(v:val, \":t:r\")'))),\n      \\ 'sink':    'colorscheme',\n      \\ 'options': '+m',\n      \\ 'left':    30\n      \\ })\n\n\" Plugin: netrw {{{2\n\" let g:loaded_netrwPlugin = 1\nlet g:netrw_banner       = 0\nlet g:netrw_bufsettings  = 'relativenumber'\nlet g:netrw_keepdir      = 0\nlet g:netrw_liststyle    = 1\nlet g:netrw_sort_options = 'i'\n\n\" Plugin: surround {{{2\nlet g:surround_indent = 1\nlet g:surround_{char2nr('k')} = \"<kbd>\\r</kbd>\"\n\n\" Plugin: tagbar {{{2\nnnoremap <f2> :TagbarToggle<cr>\n\nlet g:tagbar_width     = 40\nlet g:tagbar_autoclose = 0\nlet g:tagbar_autofocus = 1\nlet g:tagbar_compact   = 1\n\n\" Plugin: vim-easy-align {{{2\nxmap <cr> <plug>(LiveEasyAlign)\n\n\" Plugin: vim-grepper {{{2\nnnoremap <leader>g :Grepper<cr>\nnmap gs <plug>(GrepperOperator)\nxmap gs <plug>(GrepperOperator)\n\nhighlight GrepperSideFile ctermfg=161 cterm=reverse\nhighlight Conceal ctermfg=NONE ctermbg=250\n\nlet g:grepper = {}\nlet g:grepper.dir = 'repo,filecwd'\nlet g:grepper.tools = ['git', 'rg', 'rubocop']\nlet g:grepper.rubocop = {\n      \\ 'grepprg': 'rubocop -femacs',\n      \\ 'grepformat': '%f:%l:%c: %t: %m' }\n\ncommand! Todo Grepper -noprompt -tool rg -query '(TODO|FIX|FIXME|XXX|NOTE|HACK|OPTIMIZE):'\n\n\" Plugin: vim-sayonara {{{2\nnnoremap <silent><leader>q  :Sayonara<cr>\nnnoremap <silent><leader>Q  :Sayonara!<cr>\n\nlet g:sayonara_confirm_quit = 0\n\n\" Plugin: vim-startify {{{2\nnnoremap <leader>st :Startify<cr>\n\nlet g:startify_change_to_dir       = 0\n\" let g:startify_custom_header       = 'startify#pad(startify#fortune#boxed())'\nlet g:startify_enable_special      = 0\nlet g:startify_fortune_use_unicode = 1\nlet g:startify_update_oldfiles     = 1\nlet g:startify_use_env             = 1\n\n\" Filetype {{{1\naugroup vimrc\n  \" Filetype: Assembly {{{2\n  let g:asmsyntax = 'nasm'\n  \" vim-commentary uses 'commentstring', not 'comments'\n  autocmd FileType nasm let &commentstring = '; %s'\n\n  \" Filetype: C {{{2\n  autocmd FileType c,cpp setl com=sO:*\\ -,mO:*\\ \\ ,exO:*/,s1:/*,mb:*,ex:*/\n  autocmd BufLeave *.{c,cpp} mark C\n  autocmd BufLeave *.h       mark H\n\n  \" Filetype: cmake {{{2\n  autocmd FileType cmake setlocal commentstring=#\\ %s\n\n  \" Filetype: crontab {{{2\n  autocmd FileType crontab setlocal nobackup nowritebackup\n\n  \" Filetype: Erlang {{{2\n  autocmd FileType erlang setl com-=:%\n\n  \" Filetype: Go {{{2\n  let g:go_bin_path    = $v.'/vendor/go'\n  let g:go_fmt_command = 'goimports'\n  let g:gofmt_on_save  = 0\n\n  autocmd FileType go setlocal noet sts& sw& com-=:// isk-=. lcs+=tab:\\ \\ \n\n  \" Filetype: Help {{{2\n  autocmd FileType help\n        \\  setl noet\n        \\| execute 'silent wincmd' 'TL'[winnr('$') == 2]\n\n  \" Filetype: HTML {{{2\n  autocmd FileType html setl et sts=2 sw=2\n\n  \" Filetype: Lua {{{2\n  autocmd FileType lua setl com-=:# sts=2 sw=2\n\n  \" Filetype: Perl {{{2\n  let perl_include_pod = 1\n\n  autocmd FileType perl\n        \\  setlocal com-=:# kp=perldoc\\ -f\n        \\| compiler perl\n\n  autocmd BufRead,BufNewFile *.html.ep{,l} set ft=html.epl\n\n  \" Filetype: Python {{{2\n  let python_highlight_all = 1\n\n  autocmd FileType python\n        \\  setlocal kp=pydoc mp=./%\n        \\| compiler pyunit\n\n  \" Filetype: Ruby {{{2\n  let g:ruby_operators                 = 1\n  let g:ruby_space_errors              = 1\n  let g:rubycomplete_buffer_loading    = 1\n  let g:rubycomplete_classes_in_global = 1\n  let g:rubycomplete_rails             = 1\n\n  function! s:ruby()\n    command! -buffer -bang Rubocop exe 'Grepper -tool rubocop -noprompt' ['-buffer',''][<bang>0]\n    command! -buffer -nargs=* -bang Rspec exe '<mods> T clear; bundle exec rspec <args>' expand('%:p').['', ':'.line('.')][<bang>0]\n    nnoremap <buffer> <leader>rs :vertical Rspec!<cr>\n  endfunction\n\n  autocmd BufNewFile *.rb call append(0, ['#!/usr/bin/env ruby', ''])\n  autocmd FileType ruby call s:ruby()\n\n  \" -> after/ftplugin/ruby.vim\n\n  \" Filetype: Rust {{{2\n  if has('nvim')\n    autocmd BufRead Cargo.toml call crates#toggle()\n  endif\n\n  \" Filetype: Sh, Zsh {{{2\n  au FileType zsh,sh setl com-=:# sts=4 sw=4\n        \\| com! -buffer Lint Grepper -noprompt -buffer -grepprg shellcheck -fgcc\n\n  \" Filetype: Text, Mail, Markdown {{{2\n  let g:instant_markdown_autostart = 0\n  let g:instant_markdown_slow      = 1\n\n  autocmd FileType mail     setl tw=72 wrap lbr\n  autocmd FileType markdown setl tw=80 mp=gomali\\ %\n  autocmd FileType text     setl tw=80 fo+=t\n\n  \" Filetype: VCS {{{2\n  autocmd FileType git,gitcommit setl tw=80 fo+=t\n\n  \" fugitive\n  autocmd BufReadPost fugitive:// setlocal bufhidden=delete\n  autocmd FileType fugitiveblame nmap q gq\n  autocmd User fugitive\n        \\  if get(b:, 'fugitive_type', '') =~# '\\v^%(tree|blob)$'\n        \\|   nnoremap <buffer> .. :edit %:h<cr>\n        \\| endif\n\n  \" signify\n  let g:signify_sign_show_text = 1\n  let g:signify_sign_add = '▊'\n  let g:signify_sign_change = '▊'\n  let g:signify_sign_delete = '▊'\n  omap ic <plug>(signify-motion-inner-pending)\n  xmap ic <plug>(signify-motion-inner-visual)\n  omap ac <plug>(signify-motion-outer-pending)\n  xmap ac <plug>(signify-motion-outer-visual)\n  nnoremap <silent><leader>p :SignifyHunkDiff<cr>\n  nnoremap <silent><leader>u :SignifyHunkUndo<cr>\n  autocmd User SignifyAutocmds autocmd! signify CursorHold,CursorHoldI\n\n  \" Filetype: Vim, Vader {{{2\n  autocmd FileType vim nnoremap <buffer><silent> <bs> :call lookup#pop()<bar>call halo#run()<cr>\n  autocmd FileType vim setl sts=2 sw=2 isk-=#\n\" }}}2\naugroup END\n\" }}}1\n\nif filereadable($v.'/magic.vim')\n  source $v/magic.vim\nendif\n\n\" vim: sw=2 sts=2 tw=0 fdm=marker\n"
  },
  {
    "path": ".weechat/weechat.conf",
    "content": "#\n# weechat -- weechat.conf\n#\n# WARNING: It is NOT recommended to edit this file by hand,\n# especially if WeeChat is running.\n#\n# Use /set or similar command to change settings in WeeChat.\n#\n# For more info, see: https://weechat.org/doc/quickstart\n#\n\n[debug]\n\n[startup]\ncommand_after_plugins = \"\"\ncommand_before_plugins = \"\"\ndisplay_logo = on\ndisplay_version = on\nsys_rlimit = \"\"\n\n[look]\nalign_end_of_lines = message\nalign_multiline_words = on\nbar_more_down = \"++\"\nbar_more_left = \"<<\"\nbar_more_right = \">>\"\nbar_more_up = \"--\"\nbare_display_exit_on_input = on\nbare_display_time_format = \"%H:%M\"\nbuffer_auto_renumber = on\nbuffer_notify_default = all\nbuffer_position = end\nbuffer_search_case_sensitive = off\nbuffer_search_force_default = off\nbuffer_search_regex = off\nbuffer_search_where = prefix_message\nbuffer_time_format = \"%H:%M\"\ncolor_basic_force_bold = off\ncolor_inactive_buffer = on\ncolor_inactive_message = on\ncolor_inactive_prefix = on\ncolor_inactive_prefix_buffer = on\ncolor_inactive_time = off\ncolor_inactive_window = on\ncolor_nick_offline = off\ncolor_pairs_auto_reset = 5\ncolor_real_white = off\ncommand_chars = \"\"\ncommand_incomplete = off\nconfirm_quit = off\nconfirm_upgrade = off\nday_change = on\nday_change_message_1date = \"-- %a, %d %b %Y --\"\nday_change_message_2dates = \"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --\"\neat_newline_glitch = off\nemphasized_attributes = \"\"\nhighlight = \"\"\nhighlight_regex = \"\"\nhighlight_tags = \"\"\nhotlist_add_conditions = \"${away} || ${buffer.num_displayed} == 0\"\nhotlist_buffer_separator = \", \"\nhotlist_count_max = 2\nhotlist_count_min_msg = 2\nhotlist_names_count = 3\nhotlist_names_length = 0\nhotlist_names_level = 12\nhotlist_names_merged_buffers = off\nhotlist_prefix = \"H: \"\nhotlist_remove = merged\nhotlist_short_names = on\nhotlist_sort = group_time_asc\nhotlist_suffix = \"\"\nhotlist_unique_numbers = on\ninput_cursor_scroll = 20\ninput_share = none\ninput_share_overwrite = off\ninput_undo_max = 32\nitem_away_message = on\nitem_buffer_filter = \"*\"\nitem_buffer_zoom = \"!\"\nitem_mouse_status = \"M\"\nitem_time_format = \"%H:%M\"\njump_current_to_previous_buffer = on\njump_previous_buffer_when_closing = on\njump_smart_back_to_buffer = on\nkey_bind_safe = on\nkey_grab_delay = 800\nmouse = on\nmouse_timer_delay = 100\nnick_color_force = \"\"\nnick_color_hash = djb2\nnick_color_stop_chars = \"_|[\"\nnick_prefix = \"\"\nnick_suffix = \"\"\npaste_auto_add_newline = on\npaste_bracketed = on\npaste_bracketed_timer_delay = 10\npaste_max_lines = 1\nprefix_action = \" *\"\nprefix_align = right\nprefix_align_max = 0\nprefix_align_min = 0\nprefix_align_more = \"+\"\nprefix_align_more_after = on\nprefix_buffer_align = right\nprefix_buffer_align_max = 0\nprefix_buffer_align_more = \"+\"\nprefix_buffer_align_more_after = on\nprefix_error = \"=!=\"\nprefix_join = \"-->\"\nprefix_network = \"--\"\nprefix_quit = \"<--\"\nprefix_same_nick = \"\"\nprefix_suffix = \"|\"\nquote_nick_prefix = \"<\"\nquote_nick_suffix = \">\"\nquote_time_format = \"%H:%M:%S\"\nread_marker = line\nread_marker_always_show = off\nread_marker_string = \"-\"\nsave_config_on_exit = on\nsave_config_with_fsync = off\nsave_layout_on_exit = none\nscroll_amount = 3\nscroll_bottom_after_switch = off\nscroll_page_percent = 100\nsearch_text_not_found_alert = on\nseparator_horizontal = \"-\"\nseparator_vertical = \"\"\ntab_width = 1\ntime_format = \"%a, %d %b %Y %T\"\nwindow_auto_zoom = off\nwindow_separator_horizontal = on\nwindow_separator_vertical = on\nwindow_title = \"WeeChat ${info:version}\"\nword_chars_highlight = \"!\\u00A0,-,_,|,alnum\"\nword_chars_input = \"!\\u00A0,-,_,|,alnum\"\n\n[palette]\n\n[color]\nbar_more = lightmagenta\nchat = default\nchat_bg = default\nchat_buffer = white\nchat_channel = red\nchat_day_change = cyan\nchat_delimiters = 245\nchat_highlight = 231\nchat_highlight_bg = 167\nchat_host = cyan\nchat_inactive_buffer = default\nchat_inactive_window = default\nchat_nick = lightcyan\nchat_nick_colors = \"27,39,41,71,94,103,111,131,143,181\"\nchat_nick_offline = default\nchat_nick_offline_highlight = default\nchat_nick_offline_highlight_bg = blue\nchat_nick_other = cyan\nchat_nick_prefix = green\nchat_nick_self = 63\nchat_nick_suffix = green\nchat_prefix_action = white\nchat_prefix_buffer = brown\nchat_prefix_buffer_inactive_buffer = default\nchat_prefix_error = yellow\nchat_prefix_join = lightgreen\nchat_prefix_more = lightmagenta\nchat_prefix_network = magenta\nchat_prefix_quit = lightred\nchat_prefix_suffix = 245\nchat_read_marker = 245\nchat_read_marker_bg = default\nchat_server = brown\nchat_tags = red\nchat_text_found = yellow\nchat_text_found_bg = lightmagenta\nchat_time = 245\nchat_time_delimiters = 252\nchat_value = cyan\nchat_value_null = blue\nemphasized = yellow\nemphasized_bg = magenta\ninput_actions = lightgreen\ninput_text_not_found = red\nitem_away = yellow\nnicklist_away = cyan\nnicklist_group = green\nseparator = 245\nstatus_count_highlight = magenta\nstatus_count_msg = brown\nstatus_count_other = 245\nstatus_count_private = green\nstatus_data_highlight = lightmagenta\nstatus_data_msg = yellow\nstatus_data_other = 245\nstatus_data_private = lightgreen\nstatus_filter = green\nstatus_more = yellow\nstatus_mouse = green\nstatus_name = white\nstatus_name_ssl = lightgreen\nstatus_nicklist_count = 245\nstatus_number = yellow\nstatus_time = 245\n\n[completion]\nbase_word_until_cursor = on\ncommand_inline = on\ndefault_template = \"%(nicks)|%(irc_channels)\"\nnick_add_space = on\nnick_case_sensitive = off\nnick_completer = \":\"\nnick_first_only = off\nnick_ignore_chars = \"[]`_-^\"\npartial_completion_alert = on\npartial_completion_command = off\npartial_completion_command_arg = off\npartial_completion_count = on\npartial_completion_other = off\npartial_completion_templates = \"config_options\"\n\n[history]\ndisplay_default = 5\nmax_buffer_lines_minutes = 0\nmax_buffer_lines_number = 4096\nmax_commands = 100\nmax_visited_buffers = 50\n\n[proxy]\n\n[network]\nconnection_timeout = 60\ngnutls_ca_file = \"/etc/ssl/certs/ca-certificates.crt\"\ngnutls_handshake_timeout = 30\nproxy_curl = \"\"\n\n[plugin]\nautoload = \"*,!xfer,!perl,!ruby,!python,!aspell\"\ndebug = off\nextension = \".so,.dll\"\npath = \"%h/plugins\"\nsave_config_on_unload = on\n\n[bar]\nbuflist.color_bg = default\nbuflist.color_delim = default\nbuflist.color_fg = default\nbuflist.conditions = \"\"\nbuflist.filling_left_right = vertical\nbuflist.filling_top_bottom = columns_vertical\nbuflist.hidden = off\nbuflist.items = \"buflist\"\nbuflist.position = left\nbuflist.priority = 0\nbuflist.separator = on\nbuflist.size = 0\nbuflist.size_max = 0\nbuflist.type = root\nfset.color_bg = default\nfset.color_delim = cyan\nfset.color_fg = default\nfset.conditions = \"${buffer.full_name} == fset.fset\"\nfset.filling_left_right = vertical\nfset.filling_top_bottom = horizontal\nfset.hidden = off\nfset.items = \"fset\"\nfset.position = top\nfset.priority = 0\nfset.separator = on\nfset.size = 3\nfset.size_max = 3\nfset.type = window\ninput.color_bg = default\ninput.color_delim = 245\ninput.color_fg = default\ninput.conditions = \"\"\ninput.filling_left_right = vertical\ninput.filling_top_bottom = horizontal\ninput.hidden = off\ninput.items = \"[input_prompt]+(away),[input_search],[input_paste],input_text\"\ninput.position = bottom\ninput.priority = 1000\ninput.separator = off\ninput.size = 1\ninput.size_max = 0\ninput.type = window\nnicklist.color_bg = default\nnicklist.color_delim = cyan\nnicklist.color_fg = 245\nnicklist.conditions = \"${nicklist}\"\nnicklist.filling_left_right = vertical\nnicklist.filling_top_bottom = columns_vertical\nnicklist.hidden = on\nnicklist.items = \"buffer_nicklist\"\nnicklist.position = right\nnicklist.priority = 200\nnicklist.separator = on\nnicklist.size = 0\nnicklist.size_max = 0\nnicklist.type = window\nstatus.color_bg = black\nstatus.color_delim = 241\nstatus.color_fg = 231\nstatus.conditions = \"\"\nstatus.filling_left_right = vertical\nstatus.filling_top_bottom = horizontal\nstatus.hidden = off\nstatus.items = \"buffer_plugin> +buffer_name +buffer_modes +buffer_zoom,scroll,[lag],completion\"\nstatus.position = bottom\nstatus.priority = 500\nstatus.separator = off\nstatus.size = 1\nstatus.size_max = 0\nstatus.type = window\ntitle.color_bg = black\ntitle.color_delim = cyan\ntitle.color_fg = 231\ntitle.conditions = \"\"\ntitle.filling_left_right = vertical\ntitle.filling_top_bottom = horizontal\ntitle.hidden = off\ntitle.items = \"buffer_title\"\ntitle.position = top\ntitle.priority = 500\ntitle.separator = off\ntitle.size = 1\ntitle.size_max = 0\ntitle.type = window\n\n[layout]\n\n[notify]\n\n[filter]\nirc_smart = on;*;irc_smart_filter;*\n\n[key]\nctrl-? = \"/input delete_previous_char\"\nctrl-A = \"/input move_beginning_of_line\"\nctrl-B = \"/input move_previous_char\"\nctrl-C_ = \"/input insert \\x1F\"\nctrl-Cb = \"/input insert \\x02\"\nctrl-Cc = \"/input insert \\x03\"\nctrl-Ci = \"/input insert \\x1D\"\nctrl-Co = \"/input insert \\x0F\"\nctrl-Cv = \"/input insert \\x16\"\nctrl-D = \"/input delete_next_char\"\nctrl-E = \"/input move_end_of_line\"\nctrl-F = \"/input move_next_char\"\nctrl-H = \"/input delete_previous_char\"\nctrl-I = \"/input complete_next\"\nctrl-J = \"/input return\"\nctrl-K = \"/input delete_end_of_line\"\nctrl-L = \"/window refresh\"\nctrl-M = \"/input return\"\nctrl-N = \"/buffer +1\"\nctrl-P = \"/buffer -1\"\nctrl-R = \"/input search_text_here\"\nctrl-Sctrl-U = \"/input set_unread\"\nctrl-T = \"/input transpose_chars\"\nctrl-U = \"/input delete_beginning_of_line\"\nctrl-W = \"/input delete_previous_word\"\nctrl-X = \"/input switch_active_buffer\"\nctrl-Y = \"/input clipboard_paste\"\nmeta-meta-OP = \"/bar scroll buflist * b\"\nmeta-meta-OQ = \"/bar scroll buflist * e\"\nmeta-meta2-11~ = \"/bar scroll buflist * b\"\nmeta-meta2-12~ = \"/bar scroll buflist * e\"\nmeta-meta2-1~ = \"/window scroll_top\"\nmeta-meta2-23~ = \"/bar scroll nicklist * b\"\nmeta-meta2-24~ = \"/bar scroll nicklist * e\"\nmeta-meta2-4~ = \"/window scroll_bottom\"\nmeta-meta2-5~ = \"/window scroll_up\"\nmeta-meta2-6~ = \"/window scroll_down\"\nmeta-meta2-7~ = \"/window scroll_top\"\nmeta-meta2-8~ = \"/window scroll_bottom\"\nmeta-meta2-A = \"/buffer -1\"\nmeta-meta2-B = \"/buffer +1\"\nmeta-meta2-C = \"/buffer +1\"\nmeta-meta2-D = \"/buffer -1\"\nmeta-- = \"/filter toggle @\"\nmeta-/ = \"/input jump_last_buffer_displayed\"\nmeta-0 = \"/buffer *10\"\nmeta-1 = \"/buffer *1\"\nmeta-2 = \"/buffer *2\"\nmeta-3 = \"/buffer *3\"\nmeta-4 = \"/buffer *4\"\nmeta-5 = \"/buffer *5\"\nmeta-6 = \"/buffer *6\"\nmeta-7 = \"/buffer *7\"\nmeta-8 = \"/buffer *8\"\nmeta-9 = \"/buffer *9\"\nmeta-< = \"/input jump_previously_visited_buffer\"\nmeta-= = \"/filter toggle\"\nmeta-> = \"/input jump_next_visited_buffer\"\nmeta-OA = \"/input history_global_previous\"\nmeta-OB = \"/input history_global_next\"\nmeta-OC = \"/input move_next_word\"\nmeta-OD = \"/input move_previous_word\"\nmeta-OF = \"/input move_end_of_line\"\nmeta-OH = \"/input move_beginning_of_line\"\nmeta-OP = \"/bar scroll buflist * -100%\"\nmeta-OQ = \"/bar scroll buflist * +100%\"\nmeta-Oa = \"/input history_global_previous\"\nmeta-Ob = \"/input history_global_next\"\nmeta-Oc = \"/input move_next_word\"\nmeta-Od = \"/input move_previous_word\"\nmeta2-11^ = \"/bar scroll buflist * -100%\"\nmeta2-11~ = \"/bar scroll buflist * -100%\"\nmeta2-12^ = \"/bar scroll buflist * +100%\"\nmeta2-12~ = \"/bar scroll buflist * +100%\"\nmeta2-15~ = \"/buffer -1\"\nmeta2-17~ = \"/buffer +1\"\nmeta2-18~ = \"/window -1\"\nmeta2-19~ = \"/window +1\"\nmeta2-1;3A = \"/buffer -1\"\nmeta2-1;3B = \"/buffer +1\"\nmeta2-1;3C = \"/buffer +1\"\nmeta2-1;3D = \"/buffer -1\"\nmeta2-1;3F = \"/window scroll_bottom\"\nmeta2-1;3H = \"/window scroll_top\"\nmeta2-1;3P = \"/bar scroll buflist * b\"\nmeta2-1;3Q = \"/bar scroll buflist * e\"\nmeta2-1;5A = \"/input history_global_previous\"\nmeta2-1;5B = \"/input history_global_next\"\nmeta2-1;5C = \"/input move_next_word\"\nmeta2-1;5D = \"/input move_previous_word\"\nmeta2-1;5P = \"/bar scroll buflist * -100%\"\nmeta2-1;5Q = \"/bar scroll buflist * +100%\"\nmeta2-1~ = \"/input move_beginning_of_line\"\nmeta2-200~ = \"/input paste_start\"\nmeta2-201~ = \"/input paste_stop\"\nmeta2-20~ = \"/bar scroll title * -30%\"\nmeta2-21~ = \"/bar scroll title * +30%\"\nmeta2-23;3~ = \"/bar scroll nicklist * b\"\nmeta2-23~ = \"/bar scroll nicklist * -100%\"\nmeta2-24;3~ = \"/bar scroll nicklist * e\"\nmeta2-24~ = \"/bar scroll nicklist * +100%\"\nmeta2-3~ = \"/input delete_next_char\"\nmeta2-4~ = \"/input move_end_of_line\"\nmeta2-5;3~ = \"/window scroll_up\"\nmeta2-5~ = \"/window page_up\"\nmeta2-6;3~ = \"/window scroll_down\"\nmeta2-6~ = \"/window page_down\"\nmeta2-7~ = \"/input move_beginning_of_line\"\nmeta2-8~ = \"/input move_end_of_line\"\nmeta2-A = \"/input history_previous\"\nmeta2-B = \"/input history_next\"\nmeta2-C = \"/input move_next_char\"\nmeta2-D = \"/input move_previous_char\"\nmeta2-F = \"/input move_end_of_line\"\nmeta2-G = \"/window page_down\"\nmeta2-H = \"/input move_beginning_of_line\"\nmeta2-I = \"/window page_up\"\nmeta2-Z = \"/input complete_previous\"\nmeta2-[E = \"/buffer -1\"\nmeta-_ = \"/input redo\"\nmeta-a = \"/input jump_smart\"\nmeta-b = \"/input move_previous_word\"\nmeta-d = \"/input delete_next_word\"\nmeta-f = \"/input move_next_word\"\nmeta-h = \"/input hotlist_clear\"\nmeta-jmeta-f = \"/buffer -\"\nmeta-jmeta-l = \"/buffer +\"\nmeta-jmeta-r = \"/server raw\"\nmeta-jmeta-s = \"/server jump\"\nmeta-j01 = \"/buffer *1\"\nmeta-j02 = \"/buffer *2\"\nmeta-j03 = \"/buffer *3\"\nmeta-j04 = \"/buffer *4\"\nmeta-j05 = \"/buffer *5\"\nmeta-j06 = \"/buffer *6\"\nmeta-j07 = \"/buffer *7\"\nmeta-j08 = \"/buffer *8\"\nmeta-j09 = \"/buffer *9\"\nmeta-j10 = \"/buffer *10\"\nmeta-j11 = \"/buffer *11\"\nmeta-j12 = \"/buffer *12\"\nmeta-j13 = \"/buffer *13\"\nmeta-j14 = \"/buffer *14\"\nmeta-j15 = \"/buffer *15\"\nmeta-j16 = \"/buffer *16\"\nmeta-j17 = \"/buffer *17\"\nmeta-j18 = \"/buffer *18\"\nmeta-j19 = \"/buffer *19\"\nmeta-j20 = \"/buffer *20\"\nmeta-j21 = \"/buffer *21\"\nmeta-j22 = \"/buffer *22\"\nmeta-j23 = \"/buffer *23\"\nmeta-j24 = \"/buffer *24\"\nmeta-j25 = \"/buffer *25\"\nmeta-j26 = \"/buffer *26\"\nmeta-j27 = \"/buffer *27\"\nmeta-j28 = \"/buffer *28\"\nmeta-j29 = \"/buffer *29\"\nmeta-j30 = \"/buffer *30\"\nmeta-j31 = \"/buffer *31\"\nmeta-j32 = \"/buffer *32\"\nmeta-j33 = \"/buffer *33\"\nmeta-j34 = \"/buffer *34\"\nmeta-j35 = \"/buffer *35\"\nmeta-j36 = \"/buffer *36\"\nmeta-j37 = \"/buffer *37\"\nmeta-j38 = \"/buffer *38\"\nmeta-j39 = \"/buffer *39\"\nmeta-j40 = \"/buffer *40\"\nmeta-j41 = \"/buffer *41\"\nmeta-j42 = \"/buffer *42\"\nmeta-j43 = \"/buffer *43\"\nmeta-j44 = \"/buffer *44\"\nmeta-j45 = \"/buffer *45\"\nmeta-j46 = \"/buffer *46\"\nmeta-j47 = \"/buffer *47\"\nmeta-j48 = \"/buffer *48\"\nmeta-j49 = \"/buffer *49\"\nmeta-j50 = \"/buffer *50\"\nmeta-j51 = \"/buffer *51\"\nmeta-j52 = \"/buffer *52\"\nmeta-j53 = \"/buffer *53\"\nmeta-j54 = \"/buffer *54\"\nmeta-j55 = \"/buffer *55\"\nmeta-j56 = \"/buffer *56\"\nmeta-j57 = \"/buffer *57\"\nmeta-j58 = \"/buffer *58\"\nmeta-j59 = \"/buffer *59\"\nmeta-j60 = \"/buffer *60\"\nmeta-j61 = \"/buffer *61\"\nmeta-j62 = \"/buffer *62\"\nmeta-j63 = \"/buffer *63\"\nmeta-j64 = \"/buffer *64\"\nmeta-j65 = \"/buffer *65\"\nmeta-j66 = \"/buffer *66\"\nmeta-j67 = \"/buffer *67\"\nmeta-j68 = \"/buffer *68\"\nmeta-j69 = \"/buffer *69\"\nmeta-j70 = \"/buffer *70\"\nmeta-j71 = \"/buffer *71\"\nmeta-j72 = \"/buffer *72\"\nmeta-j73 = \"/buffer *73\"\nmeta-j74 = \"/buffer *74\"\nmeta-j75 = \"/buffer *75\"\nmeta-j76 = \"/buffer *76\"\nmeta-j77 = \"/buffer *77\"\nmeta-j78 = \"/buffer *78\"\nmeta-j79 = \"/buffer *79\"\nmeta-j80 = \"/buffer *80\"\nmeta-j81 = \"/buffer *81\"\nmeta-j82 = \"/buffer *82\"\nmeta-j83 = \"/buffer *83\"\nmeta-j84 = \"/buffer *84\"\nmeta-j85 = \"/buffer *85\"\nmeta-j86 = \"/buffer *86\"\nmeta-j87 = \"/buffer *87\"\nmeta-j88 = \"/buffer *88\"\nmeta-j89 = \"/buffer *89\"\nmeta-j90 = \"/buffer *90\"\nmeta-j91 = \"/buffer *91\"\nmeta-j92 = \"/buffer *92\"\nmeta-j93 = \"/buffer *93\"\nmeta-j94 = \"/buffer *94\"\nmeta-j95 = \"/buffer *95\"\nmeta-j96 = \"/buffer *96\"\nmeta-j97 = \"/buffer *97\"\nmeta-j98 = \"/buffer *98\"\nmeta-j99 = \"/buffer *99\"\nmeta-k = \"/input grab_key_command\"\nmeta-l = \"/window bare\"\nmeta-m = \"/mute mouse toggle\"\nmeta-n = \"/window scroll_next_highlight\"\nmeta-p = \"/window scroll_previous_highlight\"\nmeta-r = \"/input delete_line\"\nmeta-s = \"/mute aspell toggle\"\nmeta-u = \"/window scroll_unread\"\nmeta-wmeta-meta2-A = \"/window up\"\nmeta-wmeta-meta2-B = \"/window down\"\nmeta-wmeta-meta2-C = \"/window right\"\nmeta-wmeta-meta2-D = \"/window left\"\nmeta-wmeta2-1;3A = \"/window up\"\nmeta-wmeta2-1;3B = \"/window down\"\nmeta-wmeta2-1;3C = \"/window right\"\nmeta-wmeta2-1;3D = \"/window left\"\nmeta-wmeta-b = \"/window balance\"\nmeta-wmeta-s = \"/window swap\"\nmeta-x = \"/input zoom_merged_buffer\"\nmeta-z = \"/window zoom\"\nctrl-_ = \"/input undo\"\n\n[key_search]\nctrl-I = \"/input search_switch_where\"\nctrl-J = \"/input search_stop_here\"\nctrl-M = \"/input search_stop_here\"\nctrl-Q = \"/input search_stop\"\nctrl-R = \"/input search_switch_regex\"\nmeta2-A = \"/input search_previous\"\nmeta2-B = \"/input search_next\"\nmeta-c = \"/input search_switch_case\"\n\n[key_cursor]\nctrl-J = \"/cursor stop\"\nctrl-M = \"/cursor stop\"\nmeta-meta2-A = \"/cursor move area_up\"\nmeta-meta2-B = \"/cursor move area_down\"\nmeta-meta2-C = \"/cursor move area_right\"\nmeta-meta2-D = \"/cursor move area_left\"\nmeta2-1;3A = \"/cursor move area_up\"\nmeta2-1;3B = \"/cursor move area_down\"\nmeta2-1;3C = \"/cursor move area_right\"\nmeta2-1;3D = \"/cursor move area_left\"\nmeta2-A = \"/cursor move up\"\nmeta2-B = \"/cursor move down\"\nmeta2-C = \"/cursor move right\"\nmeta2-D = \"/cursor move left\"\n@item(buffer_nicklist):K = \"/window ${_window_number};/kickban ${nick}\"\n@item(buffer_nicklist):b = \"/window ${_window_number};/ban ${nick}\"\n@item(buffer_nicklist):k = \"/window ${_window_number};/kick ${nick}\"\n@item(buffer_nicklist):q = \"/window ${_window_number};/query ${nick};/cursor stop\"\n@item(buffer_nicklist):w = \"/window ${_window_number};/whois ${nick}\"\n@chat:Q = \"hsignal:chat_quote_time_prefix_message;/cursor stop\"\n@chat:m = \"hsignal:chat_quote_message;/cursor stop\"\n@chat:q = \"hsignal:chat_quote_prefix_message;/cursor stop\"\n\n[key_mouse]\n@bar(buflist):ctrl-wheeldown = \"hsignal:buflist_mouse\"\n@bar(buflist):ctrl-wheelup = \"hsignal:buflist_mouse\"\n@bar(input):button2 = \"/input grab_mouse_area\"\n@bar(nicklist):button1-gesture-down = \"/bar scroll nicklist ${_window_number} +100%\"\n@bar(nicklist):button1-gesture-down-long = \"/bar scroll nicklist ${_window_number} e\"\n@bar(nicklist):button1-gesture-up = \"/bar scroll nicklist ${_window_number} -100%\"\n@bar(nicklist):button1-gesture-up-long = \"/bar scroll nicklist ${_window_number} b\"\n@chat(fset.fset):button1 = \"/window ${_window_number};/fset -go ${_chat_line_y}\"\n@chat(fset.fset):button2* = \"hsignal:fset_mouse\"\n@chat(fset.fset):wheeldown = \"/fset -down 5\"\n@chat(fset.fset):wheelup = \"/fset -up 5\"\n@chat(script.scripts):button1 = \"/window ${_window_number};/script go ${_chat_line_y}\"\n@chat(script.scripts):button2 = \"/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}\"\n@chat(script.scripts):wheeldown = \"/script down 5\"\n@chat(script.scripts):wheelup = \"/script up 5\"\n@item(buffer_nicklist):button1 = \"/window ${_window_number};/query ${nick}\"\n@item(buffer_nicklist):button1-gesture-left = \"/window ${_window_number};/kick ${nick}\"\n@item(buffer_nicklist):button1-gesture-left-long = \"/window ${_window_number};/kickban ${nick}\"\n@item(buffer_nicklist):button2 = \"/window ${_window_number};/whois ${nick}\"\n@item(buffer_nicklist):button2-gesture-left = \"/window ${_window_number};/ban ${nick}\"\n@item(buflist):button1* = \"hsignal:buflist_mouse\"\n@item(buflist):button2* = \"hsignal:buflist_mouse\"\n@item(buflist2):button1* = \"hsignal:buflist_mouse\"\n@item(buflist2):button2* = \"hsignal:buflist_mouse\"\n@item(buflist3):button1* = \"hsignal:buflist_mouse\"\n@item(buflist3):button2* = \"hsignal:buflist_mouse\"\n@bar:wheeldown = \"/bar scroll ${_bar_name} ${_window_number} +20%\"\n@bar:wheelup = \"/bar scroll ${_bar_name} ${_window_number} -20%\"\n@chat:button1 = \"/window ${_window_number}\"\n@chat:button1-gesture-left = \"/window ${_window_number};/buffer -1\"\n@chat:button1-gesture-left-long = \"/window ${_window_number};/buffer 1\"\n@chat:button1-gesture-right = \"/window ${_window_number};/buffer +1\"\n@chat:button1-gesture-right-long = \"/window ${_window_number};/input jump_last_buffer\"\n@chat:ctrl-wheeldown = \"/window scroll_horiz -window ${_window_number} +10%\"\n@chat:ctrl-wheelup = \"/window scroll_horiz -window ${_window_number} -10%\"\n@chat:wheeldown = \"/window scroll_down -window ${_window_number}\"\n@chat:wheelup = \"/window scroll_up -window ${_window_number}\"\n@*:button3 = \"/cursor go ${_x},${_y}\"\n"
  },
  {
    "path": ".xinitrc",
    "content": "#!/bin/sh\n\nfailsafe=\"xterm -ls -T failsafe -geometry 80x24-0-0\"\n\ntrap \"exec $failsafe\" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO\n\ntest -r ~/.Xdefaults  && xrdb ~/.Xdefaults\ntest -r ~/.Xresources && xrdb ~/.Xresources\ntest -r ~/.Xmodmap    && xmodmap ~/.Xmodmap\n\nxset b off\nxset m 2 5\n\n#feh --bg-max /data/pics/wallpapers/github/octowhite.png\n#feh --bg-max /data/pics/wallpapers/trigonometry.jpg\n#feh --bg-max /data/pics/wallpapers/fp_is_the_right_way.jpg\n#feh --bg-max /data/pics/wallpapers/steampunk2.jpg\nfeh --bg-fill /data/pics/wallpapers/haskell.png\n\npgrep urxvtd || urxvtd -f -q -o\npgrep ssh-agent || eval $(ssh-agent) && SSH_ASKPASS=ssh-askpass ssh-add < /dev/null\n\nautocutsel -selection CLIPBOARD -fork &\nautocutsel -selection PRIMRARY  -fork &\n\n# Java Swing fix\nwmname LG3D\n\nwhile true; do\n    xsetroot -name \"$(date +'%d %b %R')\"\n    sleep 1m\ndone &\n\nexec dwm\n#xmonad\n"
  },
  {
    "path": ".yarnrc",
    "content": "# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n# yarn lockfile v1\n\n\ncache-folder \"/Users/mhi/.yarn/cache\"\ndisable-self-update-check true\nglobal-folder \"/Users/mhi/.yarn/global\"\nprefix \"/Users/mhi/.yarn\"\n"
  },
  {
    "path": ".zsh/.zlogout",
    "content": "#!/usr/bin/zsh\n\nwhich sudo &>/dev/null && sudo -k\nclear\n\n[[ -n $SSH_CONNECTION ]] && echo -n \"Connection closed:  \"; date\n"
  },
  {
    "path": ".zsh/.zprofile",
    "content": "# Opposed to Bash, Zsh doesn't source ~/.profile on its own.\n\nif [[ -r ~/.profile ]]; then\n  emulate sh -c 'source ~/.profile'\nelse\n  echo 'No ~/.profile found.'\nfi\n"
  },
  {
    "path": ".zsh/.zshrc",
    "content": "#!/usr/bin/env zsh\n\nif [[ -r ~/.shrc ]]; then\n    source ~/.shrc\nelse\n    echo 'No .shrc found.'\nfi\n\n[[ -d $ZDOTDIR/completion ]] && fpath=($ZDOTDIR/completion $fpath)\n\nzmodload -i zsh/complist\n\nautoload -Uz compinit && compinit\nautoload -Uz edit-command-line\nautoload -Uz run-help\n\nbindkey -e\numask 077\n\nwatch=all\nlogcheck=60\nWATCHFMT=\"%n from %M has %a tty%l at %T %W\"\n\nalias -g G='| grep -i'\nalias -g L='| less -r'\nalias -g N='>/dev/null'\nalias -g E='2>/dev/null'\n\nalias j='ls -lhd -- *(D-/)'\nalias k='ls -lhX -- *(D-^/)'\nalias n='ls -lhS -- *(DOL[1,5]^/)'\n\n# options {{{1\n\nsetopt cdablevars\nsetopt checkjobs\nsetopt completeinword\nsetopt correct\nsetopt globcomplete\nsetopt interactivecomments\nsetopt listpacked\nsetopt longlistjobs\nsetopt menucomplete\nsetopt no_autocd\nsetopt no_beep\nsetopt no_hist_beep\nsetopt no_listrowsfirst\nsetopt no_nomatch\nsetopt no_print_exit_value\nsetopt no_rm_star_silent\nsetopt nohup\nsetopt nolistambiguous\nsetopt nolog\nsetopt notify\nsetopt numericglobsort\nsetopt promptsubst\n# setopt extendedglob\n\n# history {{{1\n\nHISTFILE=~/.zsh/history\nHISTSIZE=2048\nSAVEHIST=2048\n\nsetopt append_history\nsetopt bang_hist\nsetopt hist_ignore_all_dups\nsetopt hist_ignore_space\nsetopt hist_reduce_blanks\nsetopt hist_verify\nsetopt inc_append_history   # add commands as they're typed\nsetopt share_history        # share history between sessions\n\n# prompt {{{1\n\nautoload -U colors && colors\n\nprecmd() { _prompt }\nSPROMPT=\"%R -> %r:%f \"\nPROMPT2=\"+%f \"\nPROMPT3=\"Select:%f \"\n\n# bindings {{{1\n\n_zle_backward_kill_word() {\n    LBUFFER=\"$({ sed -E 's#[^ _/\\-]+[ _/\\-]+$##' | sed -E 's#[^ _/\\-]+$##' } <<< $LBUFFER)\"\n}\n\n_zle_ctrl_z() {\n    if [[ $#BUFFER -eq 0 ]]; then\n        BUFFER=fg\n        zle accept-line\n    else\n        zle push-input\n        zle clear-screen\n    fi\n}\n\n_zle_fancy_dot() {\n    local -a split\n    split=( ${=LBUFFER} )\n    local dir=$split[-1]\n    case $LBUFFER in\n        .)\n            LBUFFER='cd ../'\n            RBUFFER=' && l'\n            [[ -d $dir ]] && zle -M $dir(:a:h)\n            ;;\n        *.)\n            zle self-insert\n            LBUFFER+=/\n            [[ -d $dir ]] && zle -M $dir(:a:h)\n            ;;\n        *../)\n            zle self-insert\n            zle self-insert\n            LBUFFER+=/\n            [[ -d $dir ]] && zle -M $dir(:a:h)\n            ;;\n        *)\n            zle self-insert\n    esac\n}\n\n_zle_insert_last_typed_word() {\n        zle insert-last-word -- 0 -1\n}\n\n_zle_jump_after_first_word() {\n    CURSOR=$#BUFFER[(w)1]\n}\n\n_zle_sudo() {\n    LBUFFER=\"sudo $LBUFFER\"\n}\n\nzle -N _zle_backward_kill_word\nzle -N _zle_ctrl_z\nzle -N _zle_fancy_dot\nzle -N _zle_insert_last_typed_word\nzle -N _zle_jump_after_first_word\nzle -N _zle_sudo\nzle -N edit-command-line\n\nbindkey '\u0010'   up-line-or-search\nbindkey '\u000b'   up-line-or-search\nbindkey '\u000e'   down-line-or-search\nbindkey '\u0017'   _zle_backward_kill_word\nbindkey '\u0018e'  edit-command-line\nbindkey '\u0018m'  expand-word\nbindkey '\u0018n'  list-expand\nbindkey '\u001a'   _zle_ctrl_z\nbindkey '.'    _zle_fancy_dot\nbindkey ';f'   _zle_jump_after_first_word\nbindkey ';g'   _zle_insert_last_typed_word\nbindkey ';s'   _zle_sudo\n\nbindkey -M menuselect 'h' backward-char\nbindkey -M menuselect 'i' accept-and-menu-complete\nbindkey -M menuselect 'j' down-line-or-history\nbindkey -M menuselect 'k' up-line-or-history\nbindkey -M menuselect 'l' forward-char\n\n# completion {{{1\n\nzstyle ':completion:*'                    matcher-list 'm:{a-z}={A-Z} r:|[-_.+,]=** r:|=*'\nzstyle ':completion:*:default'            list-colors  ${(s.:.)LS_COLORS} 'ma=01;38;05;255;48;05;161'\nzstyle ':completion:*:descriptions'       format       '→ %B%d%b%'\nzstyle ':completion:*:approximate:*'      max-errors   '(( reply=($#PREFIX+$#SUFFIX)/3 ))'\nzstyle ':completion::complete:*'          use-cache    true\nzstyle ':completion:*'                    cache-path   ~/.zsh/cache\nzstyle ':completion:*'                    verbose      true\nzstyle ':completion:*'                    menu         select=2\nzstyle ':completion:*'                    special-dirs ..\nzstyle ':completion:*'                    group-name   ''\n\n# zstyle ':completion:*:kill:*'             command      'ps f -u $USER -wo pid,ppid,state,%cpu,%mem,tty,cmd'\n# zstyle ':completion:*:*:kill:*:processes' list-colors  '=(#b) #([0-9]#)*=0=01;31'\n\ncompctl -g '*.class'      java\ncompctl -g '*.(c|o|a)':   cc gcc\ncompctl -g '*.el'         erl erlc\ncompctl -g '*.(hs|hls)'   hugs ghci\ncompctl -g '*.java'       javac\ncompctl -g '*.pl'         perl\ncompctl -g '*.py'         python\ncompctl -g '*.rb'         ruby\n\ncompctl -g '*.pdf'        acrorad xpdf zathura z\ncompctl -g '*.chm'        chmsee c\ncompctl -g '*.djvu'       djview\ncompctl -g '*.lyx'        lyx\ncompctl -g '*.ps'         gs ghostview ps2pdf ps2ascii\ncompctl -g '*.tex'        tex latex slitex pdflatex\ncompctl -g '*.dvi'        dvips dvipdf xdvi dviselect dvitype\n\ncompctl -g '*.(bz2|tbz2)' tar bzip2 bunzip2\ncompctl -g '*.(gz|tgz)'   tar gzip gunzip\ncompctl -g '*.pax'        pax\ncompctl -g '*.rar'        rar unrar\ncompctl -g '*.zip'        zip unzip\n\ncompctl -g '*.(htm|html|php)' firefox iceweasel opera lynx w3m link2 dillo uzbl surf\n\ncompctl -fg '*.(avi|mp*g|mp4|wmv|ogm|mkv|xvid|divx)' mplayer gmplayer vlc\ncompctl -g '*.(jp*g|gif|xpm|png|bmp)'                display gimp feh geeqie fbsetbg\ncompctl -g '*.(mp3|m4a|ogg|au|wav)'                  cmus cmus-remote xmms cr\n\ncompctl -g '*.(rar|zip)' unbook\n\n_completion_tmux_sessions() {\n    local -a sessions=( ${(f)\"$(command tmux list-sessions)\"} )\n    _describe -t sessions '' sessions \"$@\"\n}\n\ncompdef _completion_tmux_sessions tm\n\n# }}}\n\ncommand_not_found_handler() { ~/bin/shell_function_missing $* }\n\n# http://mika.l3ib.org/code/zsh-functions/backdoor\nbackdoor() {\n    if [[ $1 == -f ]]; then\n        shift\n        local fifo\n        exec {fifo}<>$1\n        backdoor -i $fifo\n    elif [[ $1 == -i ]]; then\n        shift\n        zle -F $1 backdoor\n    elif [[ $1 == <-> ]]; then\n        local line\n        # can get DoSed by someone writing data without a newline,\n        # but obviously that's the least of your problems if the\n        # other end is not trusted\n        if ! IFS= read -r line <&$1; then\n            zle -F $1\n            return 1\n        fi\n        eval $line\n    else\n        echo >&2 \"Usage: backdoor -f [fifo]\"\n        echo >&2 \"       backdoor -i [fd]\"\n        echo >&2\n        echo >&2 \"Will read lines from given fifo and eval them in the zle -F context\"\n        echo >&2 \"You can also attach it to an fd yourself with backdoor -i fd, and\"\n        echo >&2 \"it will run all lines read from FD.\"\n    fi\n}\n\n# vim: fdm=marker\n"
  },
  {
    "path": ".zsh/completion/_mix",
    "content": "#compdef mix\n\n_arguments \\\n  '1:task names:->tasks' \\\n  '*:task arguments:->arguments'\n\nlocal candidates\n\ncase $state in\n  tasks)\n    candidates=(${(f)\"$(mix help | tail -n+2 | grep '^mix ' | cut -b5-)\"})\n    candidates=(${candidates/ *\\# /:})\n    _describe 'tasks' candidates\n    return\nesac\n\ncase $words[2] in\n  archive.install)\n    case $words[3] in\n      hex)\n        if [[ -z $words[4] ]]; then\n          _message 'enter query for searching remote hex packges'\n        else\n          candidates=(${(f)\"$(mix hex.search $words[4] | tail -n+2 | sed 's/  http.*$//')\"})\n          candidates=(${candidates/[[:space:]]##/:})\n          _describe 'remote hex archives' candidates\n        fi\n        ;;\n    esac\n    ;;\n  archive.uninstall)\n    candidates=(${(f)\"$(mix archive | grep '^* ' | cut -b3-)\"})\n    _describe 'local archives' candidates\n    ;;\n  help)\n    candidates=(${(f)\"$(mix help | tail -n+2 | grep '^mix ' | cut -b5-)\"})\n    candidates=(${candidates/ *\\# /:})\n    _describe 'tasks' candidates\n    ;;\n  *)\n    _files\n    ;;\nesac\n"
  },
  {
    "path": ".zsh/dircolors.dark",
    "content": "# Thanks, https://github.com/trapd00r/LS_COLORS/blob/master/LS_COLORS\n\n# core {{{1\nBLK                   38;5;68\nCAPABILITY            38;5;17\nCHR                   38;5;113;1\nDIR                   38;5;117;1\nDOOR                  38;5;127\nEXEC                  38;5;208;1\nFIFO                  38;5;126\nFILE                  0\nLINK                  target\nMULTIHARDLINK         38;5;222;1\n# \"NORMAL don't reset the bold attribute -\n# https://github.com/trapd00r/LS_COLORS/issues/11\n#NORMAL                38;5;254\nNORMAL                0\nORPHAN                48;5;196;38;5;232;1\nOTHER_WRITABLE        38;5;220;1\nSETGID                48;5;3;38;5;0\nSETUID                38;5;220;1;3;100;1\nSOCK                  38;5;197\nSTICKY                38;5;86;48;5;234\nSTICKY_OTHER_WRITABLE 48;5;235;38;5;139;3\n\n*LS_COLORS 48;5;89;38;5;197;1;3;4;7 # :-)\n# }}}\n# documents {{{1\n*README               38;5;220;1\n*README.rst           38;5;220;1\n*README.md            38;5;220;1\n*LICENSE              38;5;220;1\n*COPYING              38;5;220;1\n*INSTALL              38;5;220;1\n*COPYRIGHT            38;5;220;1\n*AUTHORS              38;5;220;1\n*HISTORY              38;5;220;1\n*CONTRIBUTORS         38;5;220;1\n*PATENTS              38;5;220;1\n*VERSION              38;5;220;1\n*NOTICE               38;5;220;1\n*CHANGES              38;5;220;1\n.log                  38;5;190\n# plain-text {{{2\n.txt                  38;5;253\n# markup {{{2\n.adoc                 38;5;184\n.asciidoc             38;5;184\n.etx                  38;5;184\n.info                 38;5;184\n.markdown             38;5;184\n.md                   38;5;184\n.mkd                  38;5;184\n.nfo                  38;5;184\n.pod                  38;5;184\n.rst                  38;5;184\n.tex                  38;5;184\n.textile              38;5;184\n# key-value, non-relational data {{{2\n.bib                  38;5;178\n.json                 38;5;178\n.jsonl                38;5;178\n.jsonnet              38;5;178\n.libsonnet            38;5;142\n.ndjson               38;5;178\n.msg                  38;5;178\n.pgn                  38;5;178\n.rss                  38;5;178\n.xml                  38;5;178\n.fxml                 38;5;178\n.toml                 38;5;178\n.yaml                 38;5;178\n.yml                  38;5;178\n.RData                38;5;178\n.rdata                38;5;178\n.xsd                  38;5;178\n.dtd                  38;5;178\n.sgml                 38;5;178\n.rng                  38;5;178\n.rnc                  38;5;178\n# }}}\n# binary {{{2\n.cbr                  38;5;141\n.cbz                  38;5;141\n.chm                  38;5;141\n.djvu                 38;5;141\n.pdf                  38;5;141\n.PDF                  38;5;141\n.mobi                 38;5;141\n.epub                 38;5;141\n# words {{{3\n.docm                 38;5;111;4\n.doc                  38;5;111\n.docx                 38;5;111\n.odb                  38;5;111\n.odt                  38;5;111\n.rtf                  38;5;111\n# presentation {{{3\n.odp                  38;5;166\n.pps                  38;5;166\n.ppt                  38;5;166\n.pptx                 38;5;166\n#   Powerpoint show\n.ppts                 38;5;166\n#   Powerpoint with enabled macros\n.pptxm                38;5;166;4\n#   Powerpoint show with enabled macros\n.pptsm                38;5;166;4\n# spreadsheet {{{3\n.csv                  38;5;78\n.tsv                  38;5;78\n#   Open document spreadsheet\n.ods                  38;5;112\n.xla                  38;5;76\n#   Excel spreadsheet\n.xls                  38;5;112\n.xlsx                 38;5;112\n#   Excel spreadsheet with macros\n.xlsxm                38;5;112;4\n#   Excel module\n.xltm                 38;5;73;4\n.xltx                 38;5;73\n#   macOS office suite {{{3\n.pages                38;5;111\n.numbers              38;5;112\n.key                  38;5;166\n# }}}\n# }}}\n# configs {{{2\n*config               1\n*cfg                  1\n*conf                 1\n*rc                   1\n*authorized_keys      1\n*known_hosts          1\n.ini                  1\n.plist                1\n#   vim\n.viminfo              1\n#   cisco VPN client configuration\n.pcf                  1\n#   adobe photoshop proof settings file\n.psf                  1\n#   Sublime Text config\n.hidden-color-scheme  1\n.hidden-tmTheme       1\n.last-run             1\n.merged-ca-bundle     1\n.sublime-build        1\n.sublime-commands     1\n.sublime-keymap       1\n.sublime-settings     1\n.sublime-snippet      1\n.sublime-project      1\n.sublime-workspace    1\n.tmTheme              1\n.user-ca-bundle       1\n# eclipse\n.epf                  1\n# }}}\n# }}}\n# code {{{1\n# version control {{{2\n.git                  38;5;197\n.gitignore            38;5;240\n.gitattributes        38;5;240\n.gitmodules           38;5;240\n\n# shell {{{2\n.awk                  38;5;172\n.bash                 38;5;172\n.bat                  38;5;172\n.BAT                  38;5;172\n.sed                  38;5;172\n.sh                   38;5;172\n.zsh                  38;5;172\n.vim                  38;5;172\n.kak                  38;5;172\n\n# interpreted {{{2\n.ahk                  38;5;41\n# python\n.py                   38;5;41\n.ipynb                38;5;41\n# ruby\n.rb                   38;5;41\n.gemspec              38;5;41\n# perl\n.pl                   38;5;208\n.PL                   38;5;160\n.t                    38;5;114\n# sql\n.msql                 38;5;222\n.mysql                38;5;222\n.pgsql                38;5;222\n.sql                  38;5;222\n#   Tool Command Language\n.tcl                  38;5;64;1\n# R language\n.r                    38;5;49\n.R                    38;5;49\n# GrADS script\n.gs                   38;5;81\n# Clojure\n.clj                  38;5;41\n.cljs                 38;5;41\n.cljc                 38;5;41\n# Clojure gorilla REPL worksheet\n.cljw                 38;5;41\n# Scala\n.scala                38;5;41\n.sc                   38;5;41\n# Dart\n.dart                 38;5;51\n\n# compiled {{{2\n#\n#   assembly language\n.asm                  38;5;81\n#   LISP\n.cl                   38;5;81\n.lisp                 38;5;81\n.rkt                  38;5;81\n#   lua\n.lua                  38;5;81\n#   Moonscript\n.moon                 38;5;81\n#   C\n.c                    38;5;81\n.C                    38;5;81\n.h                    38;5;110\n.H                    38;5;110\n.tcc                  38;5;110\n#   C++\n.c++                  38;5;81\n.h++                  38;5;110\n.hpp                  38;5;110\n.hxx                  38;5;110\n.ii                   38;5;110\n#   method file for Objective C\n.M                    38;5;110\n.m                    38;5;110\n#   Csharp\n.cc                   38;5;81\n.cs                   38;5;81\n.cp                   38;5;81\n.cpp                  38;5;81\n.cxx                  38;5;81\n#   Crystal\n.cr                   38;5;81\n#   Google golang\n.go                   38;5;81\n#   fortran\n.f                    38;5;81\n.F                    38;5;81\n.for                  38;5;81\n.ftn                  38;5;81\n.f90                  38;5;81\n.F90                  38;5;81\n.f95                  38;5;81\n.F95                  38;5;81\n.f03                  38;5;81\n.F03                  38;5;81\n.f08                  38;5;81\n.F08                  38;5;81\n# Nim\n.nim                  38;5;81\n.nimble               38;5;81\n#   pascal\n.s                    38;5;110\n.S                    38;5;110\n#   Rust\n.rs                   38;5;81\n#   AppleScript\n.scpt                 38;5;219\n#   Swift\n.swift                38;5;219\n#   ?\n.sx                   38;5;81\n# Vala\n.vala                 38;5;81\n.vapi                 38;5;81\n#   interface file in GHC - https://github.com/trapd00r/LS_COLORS/pull/9\n.hi                   38;5;110\n#   haskell\n.hs                   38;5;81\n.lhs                  38;5;81\n#   agda\n.agda                 38;5;81\n.lagda                38;5;81\n.lagda.tex            38;5;81\n.lagda.rst            38;5;81\n.lagda.md             38;5;81\n.agdai                38;5;110\n#   Zig\n.zig                  38;5;81\n# V\n.v                    38;5;81\n\n# binaries {{{2\n# compiled apps for interpreted languages\n.pyc                  38;5;240\n# }}}\n# orchestration {{{2\n.tf                   38;5;168\n.tfstate              38;5;168\n.tfvars               38;5;168\n# orchestration 2}}}\n# html {{{2\n.css                  38;5;125;1\n.less                 38;5;125;1\n.sass                 38;5;125;1\n.scss                 38;5;125;1\n.htm                  38;5;125;1\n.html                 38;5;125;1\n.jhtm                 38;5;125;1\n.mht                  38;5;125;1\n.eml                  38;5;125;1\n.mustache             38;5;125;1\n# }}}\n# java {{{2\n.coffee               38;5;074;1\n.java                 38;5;074;1\n.js                   38;5;074;1\n.mjs                  38;5;074;1\n.jsm                  38;5;074;1\n.jsp                  38;5;074;1\n# }}}\n# php {{{2\n.php                  38;5;81\n#   CakePHP view scripts and helpers\n.ctp                  38;5;81\n#   Twig template engine\n.twig                 38;5;81\n# }}}\n# vb/a {{{2\n.vb                   38;5;81\n.vba                  38;5;81\n.vbs                  38;5;81\n# 2}}}\n# Build stuff {{{2\n*Dockerfile           38;5;155\n.dockerignore         38;5;240\n*Makefile             38;5;155\n*MANIFEST             38;5;243\n*pm_to_blib           38;5;240\n# Functional Configuration\n.nix                  38;5;155\n.dhall                38;5;178\n# ruby rake\n.rake                 38;5;155\n# automake\n.am                   38;5;242\n.in                   38;5;242\n.hin                  38;5;242\n.scan                 38;5;242\n.m4                   38;5;242\n.old                  38;5;242\n.out                  38;5;242\n.SKIP                 38;5;244\n# }}}\n# patch files {{{2\n.diff                 48;5;197;38;5;232\n.patch                48;5;197;38;5;232;1\n#}}}\n# graphics {{{1\n.bmp                  38;5;97\n.dicom                38;5;97\n.tiff                 38;5;97\n.tif                  38;5;97\n.TIFF                 38;5;97\n.cdr                  38;5;97\n.flif                 38;5;97\n.gif                  38;5;97\n.icns                 38;5;97\n.ico                  38;5;97\n.jpeg                 38;5;97\n.JPG                  38;5;97\n.jpg                  38;5;97\n.nth                  38;5;97\n.png                  38;5;97\n.psd                  38;5;97\n.pxd                  38;5;97\n.pxm                  38;5;97\n.xpm                  38;5;97\n.webp                 38;5;97\n# }}}\n# vector {{{1\n.ai                   38;5;99\n.eps                  38;5;99\n.epsf                 38;5;99\n.drw                  38;5;99\n.ps                   38;5;99\n.svg                  38;5;99\n# }}}\n# video {{{1\n.avi                  38;5;114\n.divx                 38;5;114\n.IFO                  38;5;114\n.m2v                  38;5;114\n.m4v                  38;5;114\n.mkv                  38;5;114\n.MOV                  38;5;114\n.mov                  38;5;114\n.mp4                  38;5;114\n.mpeg                 38;5;114\n.mpg                  38;5;114\n.ogm                  38;5;114\n.rmvb                 38;5;114\n.sample               38;5;114\n.wmv                  38;5;114\n  # mobile/streaming {{{2\n.3g2                  38;5;115\n.3gp                  38;5;115\n.gp3                  38;5;115\n.webm                 38;5;115\n.gp4                  38;5;115\n.asf                  38;5;115\n.flv                  38;5;115\n.ts                   38;5;115\n.ogv                  38;5;115\n.f4v                  38;5;115\n  # }}}\n  # lossless {{{2\n.VOB                  38;5;115;1\n.vob                  38;5;115;1\n# }}}\n# subtitles {{{1\n.ass                  38;5;117\n.srt                  38;5;117\n.ssa                  38;5;117\n.sub                  38;5;117\n.sup                  38;5;117 # bitmap image track\n.vtt                  38;5;117\n#}}}\n# audio {{{1\n.3ga                  38;5;137;1\n.S3M                  38;5;137;1\n.aac                  38;5;137;1\n.amr                  38;5;137;1\n.au                   38;5;137;1\n.caf                  38;5;137;1\n.dat                  38;5;137;1\n.dts                  38;5;137;1\n.fcm                  38;5;137;1\n.m4a                  38;5;137;1\n.mod                  38;5;137;1\n.mp3                  38;5;137;1\n.mp4a                 38;5;137;1\n.oga                  38;5;137;1\n.ogg                  38;5;137;1\n.opus                 38;5;137;1\n.s3m                  38;5;137;1\n.sid                  38;5;137;1\n.wma                  38;5;137;1\n# lossless\n.ape                  38;5;136;1\n.aiff                 38;5;136;1\n.cda                  38;5;136;1\n.flac                 38;5;136;1\n.alac                 38;5;136;1\n.mid                  38;5;136;1\n.midi                 38;5;136;1\n.pcm                  38;5;136;1\n.wav                  38;5;136;1\n.wv                   38;5;136;1\n.wvc                  38;5;136;1\n\n# }}}\n# fonts {{{1\n.afm                  38;5;66\n.fon                  38;5;66\n.fnt                  38;5;66\n.pfb                  38;5;66\n.pfm                  38;5;66\n.ttf                  38;5;66\n.otf                  38;5;66\n# Web Open Font Format\n.woff                 38;5;66\n.woff2                38;5;66\n#   postscript fonts\n.PFA                  38;5;66\n.pfa                  38;5;66\n# }}}\n# archives {{{1\n.7z                   38;5;40\n.a                    38;5;40\n.arj                  38;5;40\n.bz2                  38;5;40\n.cpio                 38;5;40\n.gz                   38;5;40\n.lrz                  38;5;40\n.lz                   38;5;40\n.lzma                 38;5;40\n.lzo                  38;5;40\n.rar                  38;5;40\n.s7z                  38;5;40\n.sz                   38;5;40\n.tar                  38;5;40\n.tgz                  38;5;40\n.warc                 38;5;40\n.WARC                 38;5;40\n.xz                   38;5;40\n.z                    38;5;40\n.zip                  38;5;40\n.zipx                 38;5;40\n.zoo                  38;5;40\n.zpaq                 38;5;40\n.zst                  38;5;40\n.zstd                 38;5;40\n.zz                   38;5;40\n  # packaged apps {{{2\n.apk                  38;5;215\n.ipa                  38;5;215\n.deb                  38;5;215\n.rpm                  38;5;215\n.jad                  38;5;215\n.jar                  38;5;215\n.cab                  38;5;215\n.pak                  38;5;215\n.pk3                  38;5;215\n.vdf                  38;5;215\n.vpk                  38;5;215\n.bsp                  38;5;215\n.dmg                  38;5;215\n.crx                  38;5;215 # Google Chrome extension\n.xpi                  38;5;215 # Mozilla Firefox extension\n  # }}}\n  # segments from 0 to three digits after first extension letter {{{2\n.r[0-9]{0,2}          38;5;239\n.zx[0-9]{0,2}         38;5;239\n.z[0-9]{0,2}          38;5;239\n# partial files\n.part                 38;5;239\n  # }}}\n# partition images {{{2\n.iso                  38;5;124\n.bin                  38;5;124\n.nrg                  38;5;124\n.qcow                 38;5;124\n.sparseimage          38;5;124\n.toast                38;5;124\n.vcd                  38;5;124\n.vmdk                 38;5;124\n# }}}\n# databases {{{2\n.accdb                38;5;60\n.accde                38;5;60\n.accdr                38;5;60\n.accdt                38;5;60\n.db                   38;5;60\n.fmp12                38;5;60\n.fp7                  38;5;60\n.localstorage         38;5;60\n.mdb                  38;5;60\n.mde                  38;5;60\n.sqlite               38;5;60\n.typelib              38;5;60\n# NetCDF database\n.nc                   38;5;60\n# }}}\n# tempfiles {{{1\n# undo files\n.pacnew               38;5;33\n.un~                  38;5;241\n.orig                 38;5;241\n# backups\n.BUP                  38;5;241\n.bak                  38;5;241\n.o                    38;5;241 #   *nix Object file (shared libraries, core dumps etc)\n*core                 38;5;241 #   Linux user core dump file (from /proc/sys/kernel/core_pattern)\n.mdump                38;5;241 #   Mini DuMP crash report\n.rlib                 38;5;241 #   Static rust library\n.dll                  38;5;241 #   dynamic linked library\n# temporary files\n.swp                  38;5;244\n.swo                  38;5;244\n.tmp                  38;5;244\n.sassc                38;5;244\n# state files\n.pid                  38;5;248\n.state                38;5;248\n*lockfile             38;5;248\n*lock                 38;5;248\n# error logs\n.err                  38;5;160;1\n.error                38;5;160;1\n.stderr               38;5;160;1\n# state dumps\n.aria2                38;5;241\n.dump                 38;5;241\n.stackdump            38;5;241\n.zcompdump            38;5;241\n.zwc                  38;5;241\n# tcpdump, network traffic capture\n.pcap                 38;5;29\n.cap                  38;5;29\n.dmp                  38;5;29\n# macOS\n.DS_Store             38;5;239\n.localized            38;5;239\n.CFUserTextEncoding   38;5;239\n# }}}\n# hosts {{{1\n# /etc/hosts.{deny,allow}\n.allow                38;5;112\n.deny                 38;5;196\n# }}}\n# systemd {{{1\n# http://www.freedesktop.org/software/systemd/man/systemd.unit.html\n.service              38;5;45\n*@.service            38;5;45\n.socket               38;5;45\n.swap                 38;5;45\n.device               38;5;45\n.mount                38;5;45\n.automount            38;5;45\n.target               38;5;45\n.path                 38;5;45\n.timer                38;5;45\n.snapshot             38;5;45\n# }}}\n# metadata {{{1\n.application          38;5;116\n.cue                  38;5;116\n.description          38;5;116\n.directory            38;5;116\n.m3u                  38;5;116\n.m3u8                 38;5;116\n.md5                  38;5;116\n.properties           38;5;116\n.sfv                  38;5;116\n.theme                38;5;116\n.torrent              38;5;116\n.urlview              38;5;116\n.webloc               38;5;116\n.lnk                  38;5;39\n# }}}\n# macOS files {{{1\n*CodeResources        38;5;239 # code signing apps\n*PkgInfo              38;5;239 # app bundle id\n.nib                  38;5;57  # UI\n.car                  38;5;57  # asset catalog\n.dylib                38;5;241 # shared lib\n#   Xcode files {{{2\n.entitlements         1\n.pbxproj              1\n.strings              1\n.storyboard           38;5;196\n.xcconfig             1\n.xcsettings           1\n.xcuserstate          1\n.xcworkspacedata      1\n.xib                  38;5;208\n# }}}\n# }}}\n# encrypted data {{{1\n.asc                  38;5;192;3\n.bfe                  38;5;192;3\n.enc                  38;5;192;3\n.gpg                  38;5;192;3\n.signature            38;5;192;3\n.sig                  38;5;192;3\n.p12                  38;5;192;3\n.pem                  38;5;192;3\n.pgp                  38;5;192;3\n.p7s                  38;5;192;3\n*id_dsa                38;5;192;3\n*id_rsa                38;5;192;3\n*id_ecdsa              38;5;192;3\n*id_ed25519            38;5;192;3\n# 1}}}\n# emulators {{{1\n.32x                  38;5;213\n.cdi                  38;5;213\n.fm2                  38;5;213\n.rom                  38;5;213\n.sav                  38;5;213\n.st                   38;5;213\n  # atari\n.a00                  38;5;213\n.a52                  38;5;213\n.A64                  38;5;213\n.a64                  38;5;213\n.a78                  38;5;213\n.adf                  38;5;213\n.atr                  38;5;213\n  # nintendo\n.gb                   38;5;213\n.gba                  38;5;213\n.gbc                  38;5;213\n.gel                  38;5;213\n.gg                   38;5;213\n.ggl                  38;5;213\n.ipk                  38;5;213 # Nintendo (DS Packed Images)\n.j64                  38;5;213\n.nds                  38;5;213\n.nes                  38;5;213\n  # Sega\n.sms                  38;5;213\n# }}}\n#   Texas Instruments Calculator files {{{1\n# for more see http://tibasicdev.wikidot.com/file-extensions\n.8xp                  38;5;121\n.8eu                  38;5;121\n.82p                  38;5;121\n.83p                  38;5;121\n.8xe                  38;5;121\n# }}}\n# 3D printing {{{1\n.stl                  38;5;216\n.dwg                  38;5;216\n.ply                  38;5;216\n.wrl                  38;5;216\n# }}}\n# unsorted {{{1\n#\n#   Portable Object Translation for GNU Gettext\n.pot                  38;5;7\n#   CAD files for printed circuit boards\n.pcb                  38;5;7\n#   groff (rendering app for texinfo)\n.mm                   38;5;7\n#   GIMP files\n.gbr                  38;5;7\n.scm                  38;5;7\n.xcf                  38;5;7\n# printer spool file\n.spl                  38;5;7\n# RStudio project file\n.Rproj                38;5;11\n#   Nokia Symbian OS files\n.sis                  38;5;7\n\n.1p                   38;5;7\n.3p                   38;5;7\n.cnc                  38;5;7\n.def                  38;5;7\n.ex                   38;5;7\n.example              38;5;7\n.feature              38;5;7\n.ger                  38;5;7\n.ics                  38;5;7 # calendar information\n.map                  38;5;7\n.mf                   38;5;7\n.mfasl                38;5;7\n.mi                   38;5;7\n.mtx                  38;5;7\n.pc                   38;5;7\n.pi                   38;5;7\n.plt                  38;5;7\n.pm                   38;5;7\n.rdf                  38;5;7\n.ru                   38;5;7\n.sch                  38;5;7\n.sty                  38;5;7\n.sug                  38;5;7\n.tdy                  38;5;7\n.tfm                  38;5;7\n.tfnt                 38;5;7\n.tg                   38;5;7\n.vcard                38;5;7\n.vcf                  38;5;7 #contact information\n.xln                  38;5;7\n#   AppCode files\n.iml                  38;5;166\n# }}}\n# termcap {{{1\nTERM ansi\nTERM color-xterm\nTERM con132x25\nTERM con132x30\nTERM con132x43\nTERM con132x60\nTERM con80x25\nTERM con80x28\nTERM con80x30\nTERM con80x43\nTERM con80x50\nTERM con80x60\nTERM cons25\nTERM console\nTERM cygwin\nTERM dtterm\nTERM Eterm\nTERM eterm-color\nTERM gnome\nTERM gnome-256color\nTERM jfbterm\nTERM konsole\nTERM kterm\nTERM linux\nTERM linux-c\nTERM mach-color\nTERM mlterm\nTERM putty\nTERM rxvt\nTERM rxvt-256color\nTERM rxvt-cygwin\nTERM rxvt-cygwin-native\nTERM rxvt-unicode\nTERM rxvt-unicode-256color\nTERM rxvt-unicode256\nTERM screen\nTERM screen-256color\nTERM screen-256color-bce\nTERM screen-bce\nTERM screen-w\nTERM screen.linux\nTERM screen.rxvt\nTERM terminator\nTERM vt100\nTERM xterm\nTERM xterm-16color\nTERM xterm-256color\nTERM xterm-88color\nTERM xterm-color\nTERM xterm-debian\nTERM xterm-kitty\n# }}}\n\n# vim: ft=dircolors fdm=marker\n"
  },
  {
    "path": ".zsh/dircolors.light",
    "content": "# Configuration file for dircolors, a utility to help you set the\n# LS_COLORS environment variable used by GNU ls with the --color option.\n# Copyright (C) 1996-2014 Free Software Foundation, Inc.\n# Copying and distribution of this file, with or without modification,\n# are permitted provided the copyright notice and this notice are preserved.\n# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the\n# slackware version of dircolors) are recognized but ignored.\n# Below, there should be one TERM entry for each termtype that is colorizable\nTERM Eterm\nTERM ansi\nTERM color-xterm\nTERM con132x25\nTERM con132x30\nTERM con132x43\nTERM con132x60\nTERM con80x25\nTERM con80x28\nTERM con80x30\nTERM con80x43\nTERM con80x50\nTERM con80x60\nTERM cons25\nTERM console\nTERM cygwin\nTERM dtterm\nTERM eterm-color\nTERM gnome\nTERM gnome-256color\nTERM hurd\nTERM jfbterm\nTERM konsole\nTERM kterm\nTERM linux\nTERM linux-c\nTERM mach-color\nTERM mach-gnu-color\nTERM mlterm\nTERM putty\nTERM putty-256color\nTERM rxvt\nTERM rxvt-256color\nTERM rxvt-cygwin\nTERM rxvt-cygwin-native\nTERM rxvt-unicode\nTERM rxvt-unicode-256color\nTERM rxvt-unicode256\nTERM screen\nTERM screen-256color\nTERM screen-256color-bce\nTERM screen-bce\nTERM screen-w\nTERM screen.Eterm\nTERM screen.rxvt\nTERM screen.linux\nTERM st\nTERM st-256color\nTERM terminator\nTERM tmux-256color\nTERM vt100\nTERM xterm\nTERM xterm-16color\nTERM xterm-256color\nTERM xterm-88color\nTERM xterm-color\nTERM xterm-debian\n# Below are the color init strings for the basic file types. A color init\n# string consists of one or more of the following numeric codes:\n# Attribute codes:\n# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed\n# Text color codes:\n# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white\n# Background color codes:\n# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white\n#NORMAL 00 # no color code at all\n#FILE 00 # regular file: use no color at all\nRESET 0 # reset to \"normal\" color\n# DIR 38;5;150 # directory\nDIR 38;5;31;1 # directory\n# LINK 38;5;174 # symbolic link. (If you set this to 'target' instead of a\nLINK 38;5;24 # symbolic link. (If you set this to 'target' instead of a\n# ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file\nORPHAN 7 # symlink to nonexistent file, or non-stat'able file\nMULTIHARDLINK 41;38;5;15 # regular file with more than one link\nFIFO 01;38;5;161 # pipe\nSOCK 01;38;5;161 # socket\nDOOR 01;35 # door\nBLK 01;38;5;161 # block device driver\nCHR 01;38;5;161 # character device driver\nSETUID 38;5;7;48;5;160 # file that is setuid (u+s)\nSETGID 38;5;7;48;5;160 # file that is setgid (g+s)\nCAPABILITY 38;5;7;26 # file with capability\nSTICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)\nOTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky\nSTICKY 37;44 # dir with the sticky bit set (+t) and not other-writable\n# This is for files with execute permission:\nEXEC 4;38;5;16\n# List any file extensions like '.gz' or '.tar' that you would like ls\n# to colorize below. Put the extension, a space, and the color init string.\n# (and any comments you want to add after a '#')\n# If you use DOS-style suffixes, you may want to uncomment the following:\n#.cmd 01;32 # executables (bright green)\n#.exe 01;32\n#.com 01;32\n#.btm 01;32\n#.bat 01;32\n# Or if you want to colorize scripts even if they do not have the\n# executable bit actually set.\n#.sh 01;32\n#.csh 01;32\n # archives or compressed (bright red)\n.tar 01;31\n.tgz 01;31\n.arc 01;31\n.arj 01;31\n.taz 01;31\n.lha 01;31\n.lz4 01;31\n.lzh 01;31\n.lzma 01;31\n.tlz 01;31\n.txz 01;31\n.tzo 01;31\n.t7z 01;31\n.zip 01;31\n.z 01;31\n.Z 01;31\n.dz 01;31\n.gz 01;31\n.lrz 01;31\n.lz 01;31\n.lzo 01;31\n.xz 01;31\n.bz2 01;31\n.bz 01;31\n.tbz 01;31\n.tbz2 01;31\n.tz 01;31\n.deb 01;31\n.rpm 01;31\n.jar 01;31\n.war 01;31\n.ear 01;31\n.sar 01;31\n.rar 38;05;164\n.alz 01;31\n.ace 01;31\n.zoo 01;31\n.cpio 01;31\n.7z 01;31\n.rz 01;31\n.cab 01;31\n# image formats\n.jpg  38;5;29\n.jpeg 38;5;29\n.gif  38;5;29\n.bmp  38;5;29\n.pbm  38;5;29\n.pgm  38;5;29\n.ppm  38;5;29\n.tga  38;5;29\n.xbm  38;5;29\n.xpm  38;5;29\n.tif  38;5;29\n.tiff 38;5;29\n.png  38;5;29\n.svg  38;5;29\n.svgz 38;5;115\n.mng  38;5;115\n.pcx  38;5;115\n.mov  38;5;115\n.mpg  38;5;115\n.mpeg 38;5;115\n.m2v  38;5;115\n.mkv  38;5;115\n.webm 38;5;115\n.ogm  38;5;115\n.mp4  38;5;115\n.m4v  38;5;115\n.mp4v 38;5;115\n.vob  38;5;115\n.qt   38;5;115\n.nuv  38;5;115\n.wmv  38;5;115\n.asf  38;5;115\n.rm   38;5;115\n.rmvb 38;5;115\n.flc  38;5;115\n.avi  38;5;115\n.fli  38;5;115\n.flv  38;5;115\n.gl   38;5;115\n.dl   38;5;115\n.xcf  38;5;115\n.xwd  38;5;115\n.yuv  38;5;115\n.cgm  38;5;115\n.emf  38;5;115\n# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions\n.axv  38;5;115\n.anx  38;5;115\n.ogv  38;5;115\n.ogx  38;5;115\n# audio formats\n.aac 00;36\n.au 00;36\n.flac 00;36\n.m4a 00;36\n.mid 00;36\n.midi 00;36\n.mka 00;36\n.mp3 00;36\n.mpc 00;36\n.ogg 00;36\n.ra 00;36\n.wav 00;36\n# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions\n.axa 00;36\n.oga 00;36\n.spx 00;36\n.xspf 00;36\n# misc\n.conf 38;05;161\n.log 38;05;161\n"
  },
  {
    "path": ".zshenv",
    "content": "#!/usr/bin/env zsh\n\n# Always sourced first.\n\nexport ZDOTDIR=~/.zsh\n"
  },
  {
    "path": "README.md",
    "content": "[![Build Status](https://travis-ci.org/mhinz/dotfiles.svg?branch=master)](https://travis-ci.org/mhinz/dotfiles)\n\nA few years ago I switched from Linux to macOS, but my workflow didn't change a\nlot. I just need a browser and a terminal emulator. The majority of my work is\ndone in a shell with a handful of tools.\n\nEveryday, I use [Nvim](.vim/vimrc), [git](.config/git/config),\n[tmux](.tmux.conf), and [zsh](.zsh/.zshrc) ([profile](.profile), [shrc](.shrc))\nand thus these config files are the most customized.\n\nHave fun reading them and steal what you need.\n\n_Disclaimer: No Reddit users were hurt during the creation of these\nconfiguration files._\n\n![Screenshot](https://raw.githubusercontent.com/mhinz/dotfiles/master/.github/screenshot.png)\n"
  },
  {
    "path": "bin/battery",
    "content": "#!/bin/sh\n\nos=\"$(uname -o)\"\n\nif [ \"$os\" = Darwin ]; then\n    pmset -g batt | awk 'NR==2 { gsub(/;/, \"\"); print $3 }'\n    exit 0\nfi\n\nexit 1\n"
  },
  {
    "path": "bin/book",
    "content": "#!/usr/bin/env ruby\n\nrequire 'find'\n\nmodule Find\n  def populate(*paths)\n    matched = {}\n    find(*paths) do |path|\n      if File.file?(path) && yield(path)\n        matched[File.basename(path, File.extname(path))] = path\n      end\n    end\n    matched\n  end\n  module_function :populate\nend\n\nclass Books\n  def initialize(path, term = '')\n    @books = find(path, term)\n    if @books.empty?\n      puts \"No matches.\"\n      return\n    end\n    select\n  end\n\n  def find(path, term)\n    Find.populate(path) do |p|\n      p =~ /#{term}/i\n    end.sort\n  end\n\n  def select\n    @books.each_with_index do |book, i|\n      puts \"\\e[32m %-4d \\e[33m%s\" % [ i, book.flatten.first ]\n    end\n\n    print \"\\e[31m Select:\\e[0m \"\n    begin\n      choice = STDIN.gets\n    rescue Interrupt\n      # Catch CTRL-C.\n    end\n    return if choice.nil?\n    choice = choice.chomp.to_i\n\n    open @books[choice].flatten.last\n  end\n\n  def open(path)\n    exec 'open', path\n  end\nend\n\nBooks.new('/data/books', ARGV.join(' '))\n"
  },
  {
    "path": "bin/book.erl",
    "content": "#!/usr/bin/env escript\n\n-define(BOOKPATH, '/data/books').\n\nlist_files(RegExp) ->\n    filelib:fold_files(?BOOKPATH, \"((?i)\" ++ RegExp ++ \")\", true,\n                       fun(File, Acc) -> [File|Acc] end, []).\n\n% Returns [{Index, {File, Path}}]\nprocess_paths(Paths) ->\n    Sorted = lists:sort(fun({A,_}, {B,_}) -> A < B end,\n                        [{filename:basename(P), P} || P <- Paths]),\n    lists:zip(lists:seq(1, length(Sorted)), Sorted).\n\nmain(Args) ->\n    Paths = process_paths(case length(Args) of\n                              0 -> list_files(\"\");\n                              _ -> list_files(hd(Args))\n                          end),\n    case length(Paths) of\n        0 ->\n            io:format(\"Nothing found!~n\");\n        _ ->\n            [io:format(\"\\e[32m~3w \\e[33m~s\\n\",\n                       [Index, File]) || {Index, {File, _}} <- Paths],\n            {ok, [Choice|_]} = io:fread(\"\\e[32mOpen>\\e[0m \", \"~d\"),\n            {_, {_, Path}} = lists:nth(Choice, Paths),\n            open_port({spawn_executable, \"/usr/bin/open\"}, [{args, [Path]}])\n    end.\n"
  },
  {
    "path": "bin/book.go",
    "content": "//usr/bin/env go run $0 $@; exit\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"sort\"\n)\n\ntype byBase []string\n\n// Implement sort.Interface {{{1\nfunc (b byBase) Len() int {\n\treturn len(b)\n}\n\nfunc (b byBase) Less(i, j int) bool {\n\treturn filepath.Base(b[i]) < filepath.Base(b[j])\n}\n\nfunc (b byBase) Swap(i, j int) {\n\tb[i], b[j] = b[j], b[i]\n}\n\n// scanDir() {{{1\nfunc scanDir(fnames *[]string, arg string) {\n\tdir, err := os.Open(arg)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer dir.Close()\n\n\tfis, err := dir.Readdir(-1)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tr, err := regexp.Compile(\"(?i)\" + os.Args[1])\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfor _, fi := range fis {\n\t\tfname := fi.Name()\n\n\t\tif !fi.IsDir() && r.MatchString(fname) {\n\t\t\t*fnames = append(*fnames, arg+\"/\"+fname)\n\t\t} else if fi.IsDir() {\n\t\t\tscanDir(fnames, arg+\"/\"+fname)\n\t\t}\n\t}\n}\n\n// run() {{{1\nfunc run(prog, bookpath string) {\n\tcmd := exec.Command(prog, bookpath)\n\terr := cmd.Start()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n\n// main() {{{1\nfunc main() {\n\tif len(os.Args) < 2 {\n\t\tfmt.Printf(\"usage: %s <regex>\\n\", os.Args[0])\n\t\tos.Exit(0)\n\t}\n\n\tvar fnames []string\n\tscanDir(&fnames, \"/data/books\")\n\n\tif len(fnames) == 0 {\n\t\tfmt.Println(\"\\033[31mNothing found!\")\n\t\treturn\n\t}\n\n\tsort.Sort(byBase(fnames))\n\tfor i, v := range fnames {\n\t\tfmt.Printf(\" \\033[32m%-5d \\033[33m%s\\n\", i, filepath.Base(v))\n\t}\n\n\tvar input int\n\tfmt.Print(\"\\033[32mSelect>\\033[0m \")\n\t_, err := fmt.Scanf(\"%d\", &input)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\trun(\"open\", fnames[input])\n\t// switch filepath.Ext(fnames[input]) {\n\t// case \".pdf\":\n\t// \trun(\"zathura\", fnames[input])\n\t// case \".chm\":\n\t// \trun(\"xchm\", fnames[input])\n\t// case \".djvu\":\n\t// \trun(\"djview\", fnames[input])\n\t// default:\n\t// \tfmt.Println(\"\\033[31mI can't handle that file!\")\n\t// }\n}\n"
  },
  {
    "path": "bin/bootstrap-homebrew",
    "content": "#!/usr/bin/env bash\n\nxcode-select --install\n\nif ! command -v brew &>/dev/null; then\n    ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\nfi\n\nbrew analytics off\n\nformulae=(\n    asdf\n    automake\n    bash\n    cmake\n    coreutils\n    curl-openssl\n    git\n    gnupg\n    go\n    jq\n    libtool\n    ncdu\n    neovim\n    netcat\n    ninja\n    nmap\n    node\n    openssl\n    pinentry-mac\n    pkg-config\n    postgresql\n    python\n    ripgrep\n    shellcheck\n    socat\n    sqlite\n    ssh-copy-id\n    tmux\n    tree\n    unbound\n    wget\n    youtube-dl\n    zsh\n)\n\nbrew install \"${formulae[@]}\"\n\nbrew install --HEAD universal-ctags/universal-ctags/universal-ctags\n\nbrew tap caskroom/cask\nbrew tap homebrew/services\nbrew tap homebrew/cask-fonts\nbrew tap homebrew/cask-versions\n\nformulae=(\n    brave-browser\n    calibre\n    dbeaver-community\n    docker-edge\n    flux\n    font-dejavu\n    font-fira-code\n    font-juliamono\n    gifox\n    gimp\n    iterm2\n    karabiner-elements\n    kitty\n    magicavoxel\n    rar\n    tor-browser\n    vienna\n    virtualbox\n    virtualbox-extension-pack\n    vlc\n    wireshark\n\n    blockblock\n    lulu\n)\n\nbrew install --cask \"${formulae[@]}\"\n"
  },
  {
    "path": "bin/bootstrap-host",
    "content": "#!/bin/sh\n\nlist_ssh_hosts() {\n    awk '$1 == \"HostName\" { print $2 }' ~/.ssh/config | \\\n        cut -d. -f1 | \\\n        sort\n}\n\nbootstrap() {\n    cd || exit 1\n    if [ ! -d .git ]; then\n        git init\n        git remote add -f origin https://github.com/mhinz/dotfiles\n    fi\n    # shellcheck disable=SC2006\n    if sh=`grep '\\<zsh\\>' /etc/shells` && [ \"$SHELL\" != \"$sh\" ]; then\n        chsh -s \"$sh\"\n    fi\n}\n\nbootstrap_to_host() {\n    ssh -T \"$1\" 'bash -s' < ~/bin/bootstrap-host .\n}\n\nif ! command -v git 1>/dev/null; then\n    echo 'Install git.'\n    exit 1\nfi\n\n\nif [ $# -eq 0 ]; then\n    list_ssh_hosts\nelse\n    if [ \"$1\" = . ]; then\n        bootstrap\n    elif list_ssh_hosts | grep -q \"\\\\<$1\\\\>\"; then\n        bootstrap_to_host \"$1\"\n    else\n        list_ssh_hosts\n    fi\nfi\n"
  },
  {
    "path": "bin/bootstrap-ruby",
    "content": "#!/usr/bin/env bash\n\ngem install rbenv gem-ctags\ngem ctags\n\nmkdir -p ~/.rbenv/plugins\ngit clone https://github.com/tpope/rbenv-ctags.git    ~/.rbenv/plugins/rbenv-ctags\ngit clone https://github.com/ianheggie/rbenv-binstubs ~/.rbenv/plugins/rbenv-binstubs\nrbenv ctags\n"
  },
  {
    "path": "bin/bootstrap-vim",
    "content": "#!/usr/bin/env bash\n\nset -ex\n\nmkdir -p ~/.vim/files/{backup,info,swap,undo}\nmkdir -p ~/.vim/bundle\nmkdir -p ~/.config\n\ngit clone https://github.com/junegunn/vim-plug.git ~/.vim/bundle/vim-plug || true\nln -sf ~/.vim/bundle/vim-plug/plug.vim ~/.vim/autoload\n\nvim +PlugInstall +qall\n\nln -sf ~/.vim ~/.config/nvim\ncd ~/.vim && ln -sf vimrc init.vim\n"
  },
  {
    "path": "bin/build-angband",
    "content": "#!/usr/bin/env bash\n\nrepo='https://github.com/angband/angband'\ndir=\"${ME}/repo/angband\"\n\ncd \"$dir\" 2>/dev/null || {\n    cd \"${dir%/*}\" || exit 1\n    git clone \"$repo\"\n    cd \"${repo##*/}\" || exit 1\n}\n\necho '[*] Cleaning directory..'\nmake distclean &>/dev/null\n\nif [[ $1 = '-f' ]]; then\n    echo '[!] Force building..'\nelse\n    echo '[*] Pulling changes..'\n    if git pull | grep 'Already up[ -]to[ -]date.' &>/dev/null; then\n        echo '[!] No changes found.'\n        exit 1\n    fi\nfi\n\nexport NCURSES_CONFIG=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/bin/ncurses5.4-config\n\n./autogen.sh\n./configure \\\n    --prefix=\"${HOME}/local/angband\" \\\n    --bindir=\"${HOME}/local/angband/bin\" \\\n    --with-ncurses-prefix=/usr/lib \\\n    --disable-ncursestest \\\n    --disable-x11\nmake\nmake install\n"
  },
  {
    "path": "bin/build-elixir",
    "content": "#!/usr/bin/env bash\n\nset -e\n\ndir=\"${ME}/github/elixir-lang/elixir\"\n\nif [[ ! -d $dir ]]; then\n    mkdir -p \"${ME}/github/elixir-lang\"\n    git clone https://github.com/elixir-lang/elixir \"$dir\"\nfi\n\ncd \"$dir\"\n\nif [[ $1 != -f ]]; then\n    git pull | grep 'Already up[ -]to[ -]date.' && exit 1\nfi\n\nmake clean\nmake\n"
  },
  {
    "path": "bin/build-erlang",
    "content": "#!/usr/bin/env bash\n\nset -e\n\ndir=\"${ME}/github/erlang/otp\"\nprefix=\"${HOME}/local/erlang\"\n\nflags=(\n    \"--prefix=${prefix}\"\n    '--with-ssl=/usr/local/opt/openssl'\n    '--without-javac'\n)\n\ncd \"$dir\"\n\nif [[ $1 != -f ]]; then\n    git pull | grep 'Already up[ -]to[ -]date.' && exit 1\nfi\n\nexport LANG=C\n\nif [[ ! -f ./configure ]]; then\n    ./otp_build autoconf\n    ./configure \"${flags[@]}\"\nfi\n\nmake install\n"
  },
  {
    "path": "bin/build-git",
    "content": "#!/usr/bin/env bash\n\nset -e\nset -x\n\ndir=\"${ME}/repo/git\"\nprefix=\"${HOME}/local/git\"\n\n# avoid \"Document /<path>/git/Documentation/git-add.xml does not validate\" errors\nexport XML_CATALOG_FILES=/usr/local/etc/xml/catalog\nexport CPPFLAGS=-I/usr/local/opt/openssl/include\nexport LDFLAGS=-L/usr/local/opt/openssl/lib\n\ncd \"$dir\" || exit\n\nif [[ $1 != -f ]]; then\n    git pull | grep 'Already up[ -]to[ -]date.' && exit 1\nfi\n\nmake distclean 1>/dev/null\nmake configure 1>/dev/null\n\n./configure --prefix=\"${prefix}\"\nmake install install-man\n\ncd contrib/subtree\nmake install\n"
  },
  {
    "path": "bin/build-go",
    "content": "#!/usr/bin/env bash\n\nset -e\nset -x\n\n[[ -z ${GOROOT:+nope} ]] && { echo \"Export \\$GOROOT first.\"; exit 1; }\n[[ -z ${GOARCH:+nope} ]] && { echo \"Export \\$GOARCH first.\"; exit 1; }\n[[ -z ${GOOS:+nope}   ]] && { echo \"Export \\$GOOS first.\";   exit 1; }\n\nif ! cd \"${GOROOT}/src\"; then\n    mkdir -p \"${GOROOT}/..\"\n    git clone https://github.com/golang/go.git \"$GOROOT\"\n    cd \"${GOROOT}/src\"\nelse\n    if [[ $1 != -f ]]; then\n        git pull | grep 'Already up[ -]to[ -]date.' && exit 1\n    fi\nfi\n\n# shellcheck disable=SC2155\nexport GOROOT_BOOTSTRAP=$(mktemp -dt go-bootstrap-XXX)\n\nif [[ -x $GOROOT/bin/go ]]; then\n    rsync -a \"$GOROOT\"/ \"$GOROOT_BOOTSTRAP\" --exclude .git\nelse\n    echo '[*] No go binary found. Downloading Go 1.7.3..'\n    curl -#L \"https://storage.googleapis.com/golang/go1.7.3.${GOOS}-${GOARCH}.tar.gz\" \\\n        | tar -C \"$GOROOT_BOOTSTRAP\" --strip-components=1 -x\nfi\n\nif [[ -z ${GOROOT_BOOTSTRAP+nope} ]]; then\n    echo '[*] Building master..'\nelse\n    echo \"[*] Building master using bootstrap: $GOROOT_BOOTSTRAP\"\nfi\n\n./make.bash\n"
  },
  {
    "path": "bin/build-htop",
    "content": "#!/usr/bin/env bash\n\ndir=\"${ME}/repo/htop\"\nprefix=\"${HOME}/local/htop\"\n\ncd \"$dir\" || exit\n\nif [[ $1 != -f ]]; then\n    git pull | grep 'Already up[ -]to[ -]date.' && exit 1\nfi\n\nsh autogen.sh\n./configure --prefix=\"${prefix}\"\nmake install\n"
  },
  {
    "path": "bin/build-tmux",
    "content": "#!/usr/bin/env bash\n\ncd \"${ME}/repo/tmux\" || exit\n\nif git pull | grep 'Already up[ -]to[ -]date.' && [ \"$1\" != -f ]; then\n    exit 0\nfi\n\nsh autogen.sh\n./configure --prefix=\"${HOME}/local/tmux\"\nmake install\n"
  },
  {
    "path": "bin/build-vim",
    "content": "#!/usr/bin/env bash\n\ndir=\"${ME}/github/vim/vim\"\nprefix=\"${HOME}/local/vim\"\n\n# python3-config --configdir\nflags=(\n    \"--prefix=${prefix}\"\n    '--with-compiledby=mhi'\n    '--enable-rubyinterp=dynamic'\n    '--enable-python3interp'\n    '--with-python3-config-dir=/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-darwin'\n)\n\n[[ $(uname) == Linux ]] && flags+=('--with-x')\n\ncurrent_vim_version() {\n    local version patchlevel\n    version=$(vim --version | head -1 | cut -d' ' -f5)\n    patchlevel=$(vim --version | head -3 | tail -1 | cut -d'-' -f2)\n    echo \"${version}.${patchlevel}\"\n}\n\ncd \"$dir\" || exit 1\nif [[ $1 != -f ]]; then\n    git pull | grep 'Already up[ -]to[ -]date.' && exit 1\nfi\n\nold_version=$(current_vim_version)\n\necho \"Build log: ${dir}/build.log\"\n\necho 'Cleaning...'\nmake distclean 1>/dev/null\n\necho 'Configure...'\n./configure \"${flags[@]}\" >build.log\n\necho 'Compile...'\nmake >>build.log\n\necho 'Install...'\nmake install >>build.log\n\necho \"New version: $old_version => $(current_vim_version)\"\n"
  },
  {
    "path": "bin/build-zsh",
    "content": "#!/usr/bin/env bash\n\ndir=\"${ME}/repo/zsh\"\nprefix=\"${HOME}/local/zsh\"\n\ncd \"$dir\" || exit\necho '[*] Cleaning directory..'\nmake distclean &>/dev/null\n\nif [[ $1 = '-f' ]]; then\n    echo '[!] Force building..'\nelse\n    echo '[*] Pulling changes..'\n    if git pull | grep 'Already up[ -]to[ -]date.' &>/dev/null; then\n        echo '[!] No changes found.'\n        exit 1\n    fi\nfi\n\necho \"[*] Build log: ${dir}/build.log\"\n\necho '[*] Run preconfig..'\n./Util/preconfig >build.log\n\necho '[*] Configure..'\n./configure --prefix=\"${prefix}\" >>build.log\n\necho '[*] Compile sources..'\nmake >>build.log\n\necho '[*] Install..'\nmake install >>build.log\n"
  },
  {
    "path": "bin/busy",
    "content": "#!/usr/bin/env bash\n\n# Just a hack to keep macOS from sleeping without having to fiddle with the\n# energy saver settings or using apps like caffeine and amphetamine.\n\n[[ $(uname -s) == Darwin ]] || exit 1\n\ndeclare -A map=(\n    [Apple_Terminal]=Terminal\n    [iTerm.app]=iTerm\n)\n\nterm=${map[$TERM_PROGRAM]}\n[[ -z $term ]] && exit 2\n\ntime osascript <<EOF\ntell application \"System Events\"\n    keystroke \"cat\\n\"\nend tell\nrepeat\n    tell application \"$term\"\n        activate\n        tell application \"System Events\"\n            keystroke \"yay\\n\"\n        end tell\n    end tell\n    delay 10\nend repeat\nEOF\n"
  },
  {
    "path": "bin/c_rocks",
    "content": "#!/bin/bash\n\nheader[0]='      o__ __o                                            o                '\nheader[1]='     /v     v\\                                          <|>               '\nheader[2]='    />       <\\                                         / \\               '\nheader[3]='  o/                 \\o__ __o     o__ __o        __o__  \\o/  o/      __o__'\nheader[4]=' <|                   |     |>   /v     v\\      />  \\    |  /v      />  \\ '\nheader[5]='  \\\\                 / \\   < >  />       <\\   o/        / \\/>       \\o    '\nheader[6]='    \\         /      \\o/        \\         /  <|         \\o/\\o        v\\   '\nheader[7]='     o       o        |          o       o    \\\\         |  v\\        <\\  '\nheader[8]='     <\\__ __/>       / \\         <\\__ __/>     _\\o__</  / \\  <\\  _\\o__</  '\n\ndraw_char()\n{\n    local voff_x=$1\n    local voff_y=$2\n\n    tput cup $[off_y + voff_y] $[off_x + voff_x]\n    printf %c ${header[voff_y]:voff_x:1}\n}\n\n#\n# check color support\n#\nif [[ $(tput colors) -ne 256 ]]; then\n    echo \"$0: This terminal does not support 256 colors.\" 2>&1\n    exit 1\nfi\n\n#\n# set trap handlers\n#\ntrap 'tput cnorm; tput clear' EXIT\ntrap 'exit 1' INT TERM\n\n#\n# calculate header position\n#\nwhile getopts ':x:y:' opt; do\n    [[ $opt =~ [\\?:] ]] && continue\n    case $opt in\n        x)\n            cols=$OPTARG\n            ;;\n        y)\n            rows=$OPTARG\n            ;;\n        *)\n            echo \"usage: $0 [-t] [-x \\$cols] [-y \\$rows]\" 2>&1\n            exit 1\n    esac\ndone\n\n#\n# if no cols or rows were set:\n#   - try to determine them\n#   - set default values otherwise\n#\n[[ -z $cols ]] && { cols=$(tput cols)  || cols=80; }\n[[ -z $rows ]] && { rows=$(tput lines) || rows=24; }\n\n#\n# get width and height of the header\n#\nheader_width=${#header[0]}\nheader_height=${#header[@]}\n\n#\n# check if header is bigger than the actual terminal size; truncate otherwise\n#\n[[ $cols -lt $header_width  ]] && { off_x=0; header_width=$cols;  } || off_x=$[ (cols - header_width)  / 2 ]\n[[ $rows -lt $header_height ]] && { off_y=0; header_height=$rows; } || off_y=$[ (rows - header_height) / 2 ]\n\n#\n# prepare screen\n#\ntput civis\nclear\n\n#\n# main loop\n#\nwhile :; do\n    for c in {136..166}; do\n        tput setaf $c\n        for ((x = 0; x < $header_width; x++)); do\n            for ((y = 0; y < $header_height; y++)); do\n                draw_char $x $y\n            done\n        done\n    done\ndone\n"
  },
  {
    "path": "bin/dotfiles",
    "content": "#!/bin/sh\n\nred=\"\\033[31m\"\ngreen=\"\\033[32m\"\nyellow=\"\\033[33m\"\nblue=\"\\033[34m\"\nreset=\"\\033[0m\"\n\ncheck_file() {\n    if ! which \"$1\" >/dev/null; then\n        echo \" ${yellow}${1}${reset} % ${red}is not available${reset}\"\n    elif [ -e \"$2\" ]; then\n        if [ -L \"$2\" ]; then\n            echo \" ${yellow}${2}${reset} % ${blue}is already symlinked${reset}\"\n        else\n            echo \" ${yellow}${2}${reset} % ${red}is no symlink${reset}\"\n        fi\n    else\n        ln -s \"$3\" \"$2\"\n        echo \" ${yellow}${2}${reset} % ${green}-> ${3}${reset}\"\n    fi\n}\n\n{\n    check_file  bochs     ~/.bochsrc                       .dotfiles/bochs/bochsrc\n    check_file  cmus      ~/.cmus/kuku.theme               ~/.dotfiles/cmus/kuku.theme\n    check_file  conky     ~/.conkyrc                       .dotfiles/conky/conkyrc\n    check_file  emacs     ~/.emacs.d                       .dotfiles/emacs.d\n    check_file  firefox   ~/.mozilla                       .dotfiles/mozilla\n    check_file  gdb       ~/.gdbinit                       .dotfiles/gdb/gdbinit\n    check_file  gem       ~/.gemrc                         .dotfiles/gem/gemrc\n    check_file  getmail   ~/.getmail                       .dotfiles/getmail\n    check_file  git       ~/.git                           .dotfiles/git\n    check_file  git       ~/.gitconfig                     .dotfiles/git/gitconfig\n    check_file  gitk      ~/.gitk                          .dotfiles/git/gitk\n    check_file  gpg       ~/.gnupg                         .dotfiles/gnupg\n    check_file  hg        ~/.hgrc                          .dotfiles/hg/hgrc\n    check_file  irssi     ~/.irssi                         .dotfiles/irssi\n    check_file  liferea   ~/.liferea_1.8                   .dotfiles/liferea/liferea_1.8\n    check_file  liferea   ~/feedlist.opml                  .dotfiles/liferea/feedlist.opml\n    check_file  msmtp     ~/.msmtprc                       .dotfiles/msmtp/msmtprc\n    check_file  mutt      ~/.muttrc                        .dotfiles/mutt/muttrc\n    check_file  procmail  ~/.procmailrc                    .dotfiles/procmail/procmailrc\n    check_file  rtorrent  ~/.rtorrent.rc                   .dotfiles/rtorrent/rtorrent.rc\n    check_file  skype     ~/.Skype                         .dotfiles/skype\n    check_file  slrn      ~/.slrn                          .dotfiles/slrn\n    check_file  slrn      ~/.slrnrc                        .dotfiles/slrn/slrnrc\n    check_file  ssh       ~/.ssh                           .dotfiles/ssh\n    check_file  startx    ~/.Xdefaults                     .dotfiles/x/Xdefaults\n    check_file  startx    ~/.Xmodmap                       .dotfiles/x/Xmodmap\n    check_file  startx    ~/.config/fontconfig/fonts.conf  .dotfiles/fonts/fonts.conf\n    check_file  startx    ~/.fonts                         .dotfiles/fonts/fonts\n    check_file  startx    ~/.icons                         .dotfiles/icons\n    check_file  startx    ~/.xinitrc                       .dotfiles/x/xinitrc\n    check_file  tmux      ~/.tmux.conf                     .dotfiles/tmux/tmux.conf\n    check_file  true      ~/.pentadactyl                   .dotfiles/pentadactyl\n    check_file  true      ~/.pentadactylrc                 .dotfiles/pentadactyl/pentadactylrc\n    check_file  true      ~/.terminfo                      .dotfiles/terminfo\n    check_file  true      ~/bin                            .dotfiles/bin\n    check_file  true      ~/mail                           /data/mail\n    check_file  vim       ~/.vim                           .dotfiles/vim\n    check_file  xmonad    ~/.xmonad                        .dotfiles/xmonad\n    check_file  zsh       ~/.zsh                           .dotfiles/zsh\n    check_file  zsh       ~/.zshenv                        .dotfiles/zsh/.zshenv\n} | column -t -s %\n"
  },
  {
    "path": "bin/ec",
    "content": "#!/usr/bin/env bash\n\nif emacsclient --eval t &>/dev/null; then\n    if [[ -z $@ ]]; then\n        emacsclient --eval \"(dired \\\"${PWD}\\\")\"\n    else\n        emacsclient --no-wait \"$@\"\n    fi\nelse\n    if [[ -z $@ ]]; then\n        emacs --chdir \"$PWD\" --eval \"(dired \\\"${PWD}\\\")\" &\n    else\n        emacs --chdir \"$PWD\" \"$@\" &\n    fi\nfi\n"
  },
  {
    "path": "bin/english",
    "content": "#!/usr/bin/env ruby\n\nrequire 'yaml'\n\nwords = YAML.load_file(File.expand_path('~/english.yaml'))\n\nwhile words.any?\n  word = words.keys.sample\n  print \"\\n\\x1b[1;36m#{word}\\x1b[0m \"\n  begin\n    gets\n  rescue Interrupt\n    exit\n  end\n  puts words[word]\n  words.delete(word)\nend\n"
  },
  {
    "path": "bin/english-notification",
    "content": "#!/usr/bin/env ruby\n\nrequire 'YAML'\n\nwords = YAML.load_file(File.expand_path('~/english.yaml'))\n\nenglish = words.keys.sample\ngerman  = words[english].gsub('\"', '\\\"').gsub(\"'\", \"''\\\\'''\")\n\n%x{ osascript <<< 'display notification \"#{german}\" with title \"#{english}\"' }\n"
  },
  {
    "path": "bin/fix-term",
    "content": "#!/bin/sh\n\n# kbs        backspace key\n# sitm/ritm  italic\n# smso/rmso  standout\n# smxx/rmxx  strikethrough\n# Smulx      undercurl (https://sw.kovidgoyal.net/kitty/protocol-extensions.html#colored-and-styled-underlines)\n\nos=\"$(uname -s)\"\ntinfo=\"$(mktemp)\"\n\nif [ \"$os\" = Darwin ]; then\n    export TERMINFO=/usr/share/terminfo\nfi\n\ncat > \"$tinfo\" <<EOF\nxterm-256color|xterm with 256 colors and italic,\n    kbs=\\177,\n    sitm=\\E[3m, ritm=\\E[23m,\n    smxx=\\E[9m, rmxx=\\E[29m,\n    Smulx=\\E[4\\:%p1%dm,\n    use=xterm-256color,\ntmux-256color|tmux with 256 colors and italic,\n    kbs=\\177,\n    sitm=\\E[3m, ritm=\\E[23m,\n    smso=\\E[7m, rmso=\\E[27m,\n    smxx=\\E[9m, rmxx=\\E[29m,\n    Smulx=\\E[4\\:%p1%dm,\n    use=screen-256color,\nEOF\n\nif [ \"$os\" = FreeBSD ]; then\n    tcap=\"$(mktemp)\"\n    tic -CKr0x \"$tinfo\" > \"$tcap\"\n    cap_mkdb -f ~/.termcap \"$tcap\"\nelse\n    rm -rf ~/.terminfo\n    tic -xo ~/.terminfo \"$tinfo\"\nfi\n\n# vim: nowrap\n"
  },
  {
    "path": "bin/gem-info",
    "content": "#!/bin/sh\n\ncurl -s https://rubygems.org/api/v1/gems/\"${1}\".json | jq\n"
  },
  {
    "path": "bin/git-ctags",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nblacklist=(~ /usr/local/Homebrew)\n\nfor dir in \"${blacklist[@]}\"; do\n    if [[ $PWD = $dir ]]; then\n        echo 'nö' 1>&2\n        exit 1\n    fi\ndone\n\ncd \"$(git rev-parse --show-toplevel)\"\n\necho 'Creating tags...'\ngit ls-files | ctags -L - --tag-relative=yes --fields=+S -f .git/tags.$$\nmv .git/tags.$$ .git/tags\n"
  },
  {
    "path": "bin/git-neck",
    "content": "#!/bin/sh -e\n\n# git neck [-r] [COMMIT] - show commits until first branching point\n#\n# Stolen from http://chneukirchen.org/blog/archive/2013/01/a-grab-bag-of-git-tricks.html\n\n[ \"$1\" = -r ] && shift && R=-r\nCOMMIT=$(git rev-parse --no-flags --default HEAD \"$@\")\n# skip first elements of trail\nTORSO=$(git trail $R $COMMIT | cut -d' ' -f2 | uniq | sed -n 2p)\n# fall back to initial commit on empty trail\n: ${TORSO:=$(git rev-list --max-parents=0 HEAD)}\ngit log --oneline $(git rev-parse --no-revs \"$@\") $COMMIT...$TORSO\n"
  },
  {
    "path": "bin/git-standup",
    "content": "#!/usr/bin/env bash\n\nstandup() {\n    dir=$1\n    shift\n    if git -C \"$dir\" rev-parse --git-dir &>/dev/null; then\n        changes=\"$(git -C \"$dir\" log --all --author='Marco Hinz' --since='6am yesterday' --format=%s \"$@\")\"\n        if [[ -n $changes ]]; then\n            echo -e \"\\e[31;3m⇒ ${dir}\\e[0m\"\n            echo \"$changes\"\n        fi\n    fi\n}\n\nif git rev-parse --git-dir &>/dev/null; then\n    standup \"$PWD\" \"$@\"\nelse\n    for dir in *; do\n        standup \"$dir\" \"$@\"\n    done\nfi\n"
  },
  {
    "path": "bin/git-to",
    "content": "#!/usr/bin/env bash\n#\n# usage: git to [ref]\n#\n# The number of commits between a given ref and HEAD. If no ref is given, the\n# last tag (lightweight or annotated) is used.\n#\n# This works in both directions (the ref can appear before or after HEAD),\n# hence \"to\" and not \"since\".\n\nlast_tag() {\n    git describe --tags --exact-match \"$(git rev-list --tags --max-count=1)\"\n}\n\nnumber_of_commits_relative_to() {\n    git log --oneline --no-merges ...\"$1\" | wc -l\n}\n\nref=\"${1:-\"$(last_tag)\"}\"\n\necho \"$(number_of_commits_relative_to \"$ref\") commits to $ref\"\n"
  },
  {
    "path": "bin/git-trail",
    "content": "#!/bin/sh -e\n\n# git trail [-r] [-t] [COMMIT] - show all branching points in Git history\n#\n# Stolen from http://chneukirchen.org/blog/archive/2013/01/a-grab-bag-of-git-tricks.html\n\n[ \"$1\" = -r ] && shift || REMOTES=\"-e refs/remotes/\"\n[ \"$1\" = -t ] && shift || TAGS=\"-e refs/tags/\"\nCOMMIT=$(git rev-parse --no-flags --default HEAD \"$@\")\n\n{ git for-each-ref | grep -v -e '^$' $TAGS $REMOTES\n  git log --date=short --format=\"%cd %h %H\" \"$@\"\n} | awk '\n    $2 == \"commit\" || $2 == \"tag\" {\n      \"git merge-base '$COMMIT' \" $1 | getline mb\n      merge[mb] = merge[mb] \" \" $3\n    }\n    {\n      if ($3 in merge) {\n        split(merge[$3], mbs, \" \")\n        for (i in mbs) {\n          \"git name-rev --name-only --refs=\\\"\" mbs[i] \"\\\" \" $3 | getline nr\n          if (nr != \"undefined\") print $1, $2, nr   # skip unreachable commits\n        }\n      }\n    }' | git -p column   # paginate output\n"
  },
  {
    "path": "bin/git-whereami",
    "content": "#!/usr/bin/env ruby\n#\n# frozen_string_literal: true\n\n# usage: git whereami [HEAD]\n#\n# Show next and previous tags from ref and their distance.\n\nref = !ARGV.empty? ? ARGV[0] : 'HEAD'\n\ndef out(title, tag, distance)\n  printf(\"%-20s %-20s %d commits away\\n\", title, tag, distance)\nend\n\ndef distance(tag)\n  `git log --oneline --no-merges ...#{tag}`.lines.count\nend\n\nexact = `git describe --abbrev=0 --exact-match #{ref} 2>/dev/null`.rstrip\n\ncase $?.exitstatus\nwhen 0\n  prev_anno  = `git describe --abbrev=0        #{ref}^ 2>/dev/null`.rstrip\n  prev_light = `git describe --abbrev=0 --tags #{ref}^ 2>/dev/null`.rstrip\n  out('exact',            exact,      0)\n  out('prev annotated',   prev_anno,  distance(prev_anno))  unless prev_anno.empty?\n  out('prev lightweight', prev_light, distance(prev_light)) unless prev_light.empty?\nelse\n  next_light = `git describe --contains        #{ref} 2>/dev/null`.rstrip\n  prev_anno  = `git describe --abbrev=0        #{ref} 2>/dev/null`.rstrip\n  prev_light = `git describe --abbrev=0 --tags #{ref} 2>/dev/null`.rstrip\n  out('next',             *next_light.split('~'))           unless next_light.empty?\n  out('prev annotated',   prev_anno,  distance(prev_anno))  unless prev_anno.empty?\n  out('prev lightweight', prev_light, distance(prev_light)) unless prev_light.empty?\nend\n"
  },
  {
    "path": "bin/itb",
    "content": "#!/usr/bin/env ruby\n\nclass ITBooks\n  def initialize(args)\n    menu(lookup(args))\n  end\n\n  private\n\n  def lookup(args)\n    require 'net/http'\n    require 'json'\n\n    books = []\n    page  = 1\n    query = URI.encode(args.join(' '))\n\n    loop do\n      response = Net::HTTP.get(URI(\"http://it-ebooks-api.info/v1/search/#{query}/page/#{page}\"))\n      # Fix unescaped double quotes in JSON response.\n      response.gsub!(/([^,:{])\"([^,:}])/, '\\1\\\"\\2')\n      response = JSON.parse(response, {symbolize_names: true})\n      break if response[:Total].to_i == 0\n      books += response[:Books]\n      page += 1\n    end\n\n    if books.empty?\n      puts 'No matches.'\n      exit 1\n    end\n\n    books.sort! { |a,b| a[:Title] <=> b[:Title] }\n  end\n\n  def menu(books)\n    loop do\n      books.each_with_index do |book, i|\n        puts \"\\e[32m %-4d \\e[33m%s\" % [ i, book[:Title] ]\n      end\n\n      print \"\\e[31m Select:\\e[0m \"\n      begin\n        choice = STDIN.gets.chomp.to_i\n      rescue Interrupt\n        break\n      end\n\n      show(books[choice][:ID])\n\n      print \"\\e[31m Select another? [Yn]\\e[0m \"\n      begin\n        choice = STDIN.gets.chomp\n      rescue Interrupt\n        break\n      end\n      break if choice == 'n'\n    end\n  end\n\n  def show(book_id)\n    book = Net::HTTP.get(URI(\"http://it-ebooks-api.info/v1/book/#{book_id}\"))\n    book.gsub!(/([^,:{])\"([^,:}])/, '\\1\\\"\\2')\n    book = JSON.parse(book, {symbolize_names: true})\n\n    begin\n      require 'lisbn'\n      isbn = Lisbn.new(book[:ISBN]).isbn10\n    rescue LoadError\n      isbn = nil\n    end\n\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Title',       book[:Title]      ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Subtitle',    book[:SubTitle]   ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Author',      book[:Author]     ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Year',        book[:Year]       ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Publisher',   book[:Publisher]  ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['ISBN',        book[:ISBN]       ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Amazon',\n                                  \"http://www.amazon.de/gp/product/#{isbn}\" ] if isbn\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Download',    book[:Download]   ]\n    puts \"\\e[32m %-14s\\e[0m%s\" % ['Description', book[:Description]]\n  end\nend\n\nif ARGV.empty?\n  $stderr.puts \"usage: #{File.basename($0)} <query>\"\n  exit 1\nend\n\nITBooks.new(ARGV)\n"
  },
  {
    "path": "bin/man",
    "content": "#!/usr/bin/env bash\n\n# On :Man, Nvim uses `MANWIDTH=999 man` for the purpose of soft wrapping the\n# resulting long lines afterwards. This works for all window sizes and supports\n# resizing. But my eyes are too used to the manpager always giving me 80\n# columns, so this wrapper forces $MANWIDTH to be set again.\n\nMANWIDTH=80 exec /usr/bin/man \"$@\"\n"
  },
  {
    "path": "bin/markov",
    "content": "#!/usr/bin/env python\n\nimport sys\nimport fileinput\nimport random\n\nclass Markov:\n    def __init__(self):\n        self.suffixes = {}\n        self.build_table()\n\n    def read_input(self):\n        lines = []\n        for line in fileinput.input():\n            lines.append(line)\n        return ''.join(lines).split()\n\n    def build_table(self):\n        prefix1 = '\\n'\n        prefix2 = '\\n'\n        for suffix in self.read_input():\n            self.suffixes.setdefault((prefix1, prefix2), []).append(suffix)\n            prefix1, prefix2 = prefix2, suffix\n        self.suffixes.setdefault((prefix1, prefix2), []).append('\\n')\n\n    def generate_output(self, maxwords=500):\n        prefix1 = '\\n'\n        prefix2 = '\\n'\n        for i in xrange(maxwords):\n            new = random.choice(self.suffixes[prefix1, prefix2])\n            if new == '\\n':\n                sys.exit()\n            sys.stdout.write(new + ' ')\n            prefix1, prefix2 = prefix2, new\n\nif __name__ == '__main__':\n    m = Markov()\n    m.generate_output()\n"
  },
  {
    "path": "bin/mhi",
    "content": "#!/usr/bin/env bash\n\n# Configuration {{{1\nmhi=\"$(readlink \"$0\")\"\nmhi=${mhi:=$0}\nmhi=\"${mhi%/*}\"\n\n# Helpers {{{1\nlist_files() {\n  local path=\"$1\"\n  for file in \"$path\"/*; do\n    file=\"${file##*/}\"  # basename\n    echo \"${file%.*}\"   # strip ext\n  done\n}\n\ncase $1 in\n  colors) # {{{1\n    for i in {0..255}; do\n      tput setab $i && echo -n \" $i \"\n    done\n    tput sgr0\n    echo\n    ;;\n\n  conf|c) # {{{1\n    arg=$2\n    declare -A configs=(\n      [g]=~/.config/git/config\n      [l]=~/.vim/lua/mhi.lua\n      [m]=~/.vim/magic.vim\n      [t]=~/.tmux.conf\n      [v]=~/.vim/vimrc\n      [ze]=~/.zsh/.zshenv\n      [zp]=~/.zsh/.zprofile\n      [zr]=~/.zsh/.zshrc\n    )\n    if [[ -n $arg && -n ${configs[$arg]} ]]; then\n      exec \"$EDITOR\" \"${configs[$arg]}\"\n    else\n      for conf in \"${!configs[@]}\"; do\n        printf '%-6s %s\\n' \"$conf\" \"${configs[$conf]}\"\n      done | sort\n    fi\n    ;;\n\n  fix) # {{{1\n    shift\n    exec \"${mhi}/mhi-fix\" \"$@\"\n    ;;\n\n  net|n) # {{{1\n    shift\n    exec \"${mhi}/mhi-net\" \"$@\"\n    ;;\n\n  path|p) # {{{1\n    IFS=:\n    if (( $# == 1 )); then\n      # shellcheck disable=SC2086\n      printf '%s\\n' $PATH\n    else\n      shift\n      # shellcheck disable=SC2086\n      find $PATH -iname \"$@\" -exec ls -hl --time-style=long-iso {} + 2>/dev/null\n    fi\n    ;;\n\n  *) # {{{1\n    cat <<MSG\ncolors\nconf|c\nfix\nnet|n\npath|p\nMSG\n    ;;\nesac\n\n# vim: sts=2 sw=2\n"
  },
  {
    "path": "bin/mhi-fix",
    "content": "#!/usr/bin/env bash\n\ncase $1 in\n  spotlight) # {{{1\n    hash brew 2>/dev/null || exit 1\n    brew linkapps\n    find /Applications -type l -maxdepth 1 | while read -r file; do\n      [[ -f \"${HOME}${file}\" ]] || osascript -e 'on run {f}\n        set dir to path to applications folder from user domain\n        tell application \"Finder\" to make alias at dir to f as POSIX file\n      end' \"$file\"\n    done\n    ;;\n\n  *) # {{{1\n    cat <<MSG\nspotlight\nMSG\n    ;;\nesac\n\n# vim: sts=2 sw=2\n"
  },
  {
    "path": "bin/mhi-net",
    "content": "#!/usr/bin/env bash\n\ncase $1 in\n  hosts) # {{{1\n    awk '$1 == \"Host\" { print $2 }' ~/.ssh/config | sort\n    ;;\n\n  irc) # {{{1\n    [[ -n $TMUX ]] && tmux rename-window irc\n    exec ssh vimmer.net -t 'tmux attach -t irc'\n    ;;\n\n  *) # {{{1\n    cat <<MSG\nhosts\nirc\nMSG\n    ;;\nesac\n\n# vim: sts=2 sw=2\n"
  },
  {
    "path": "bin/numsys",
    "content": "#!/usr/bin/env ruby\n\nclass NumSys\n  # initalize {{{1\n  def initialize(args)\n    @Input = args.dup.freeze\n\n    if args.empty?\n      $stderr.puts \"usage: #{__FILE__} <number>\"\n      exit 1\n    end\n  end\n\n  # validate_input {{{1\n  def validate_input(arg)\n    case arg\n    when /^([01]+)(?:b)?$/               then { sys: 'bin', val: $1 }\n    when /^(\\d+)(?:d)?$/                 then { sys: 'dec', val: $1 }\n    when /^(?:0x)?([0-9a-fA-F]+)(?:h)?$/ then { sys: 'hex', val: $1 }\n    else\n      $stderr.puts \"Wait, what? What is '#{arg}' supposed to mean?\"\n      nil\n    end\n  end\n\n  # converting {{{1\n  def c2to16(val)\n    lookup = {\n      '0000' => :'0', '0001' => :'1', '0010' => :'2', '0011' => :'3',\n      '0100' => :'4', '0101' => :'5', '0110' => :'6', '0111' => :'7',\n      '1000' => :'8', '1001' => :'9', '1010' => :'a', '1011' => :'b',\n      '1100' => :'c', '1101' => :'d', '1110' => :'e', '1111' => :'f',\n    }\n    ret = []\n    val = val.scan(/./)\n    ret.unshift(lookup[val.pop(4).join.rjust(4, '0')]) while not val.empty?\n    ret.join\n  end\n\n  def c16to2(val)\n    lookup = {\n      :'0' => 0,    :'1' => 1,    :'2' => 10,   :'3' => 11,\n      :'4' => 100,  :'5' => 101,  :'6' => 110,  :'7' => 111,\n      :'8' => 1000, :'9' => 1001, :'a' => 1010, :'b' => 1011,\n      :'c' => 1100, :'d' => 1101, :'e' => 1110, :'f' => 1111,\n    }\n    ret = ''\n    val.downcase.each_char do |char|\n      ret << '%.4d' % lookup[char.to_sym]\n    end\n    ret\n  end\n\n  def c10to16(val)\n    new   = val\n    queue = []\n\n    while val != 0\n      new = (val / 16).floor\n      rem = val % 16\n      queue.unshift('%x' % rem)\n      val = new\n    end\n\n    queue.join\n  end\n\n  def c2to10(val)\n    i   = 0\n    ret = 0\n    val.reverse.each_char do |char|\n      ret += (1 << i) if char.to_i == 1\n      i += 1\n    end\n    ret.to_s\n  end\n\n  # pretty_print {{{1\n  def pretty_print(results)\n    results.each do |res|\n      res.each_key do |sys|\n        res[sys].gsub!(/^0+/, '')\n        res[sys] = '0' if res[sys].empty?\n      end\n\n      printf \"%-24s | 0x%-12s | %s\\n\", res[:bin], res[:hex], res[:dec]\n    end\n  end\n\n  # handle_base {{{1\n  def handle_base_02(bin)\n    hex = c2to16(bin)\n    dec = c2to10(bin)\n    { bin: bin, dec: dec, hex: hex }\n  end\n\n  def handle_base_10(dec)\n    hex = c10to16(dec.to_i)\n    bin = c16to2(hex)\n    { bin: bin, dec: dec, hex: hex }\n  end\n\n  def handle_base_16(hex)\n    bin = c16to2(hex)\n    dec = c2to10(bin)\n    { bin: bin, dec: dec, hex: hex }\n  end\n\n  # run {{{1\n  def run\n    @Input.each do |arg|\n      tmp     = validate_input(arg)\n      results = []\n\n      if tmp\n        case tmp[:sys]\n        when 'bin' then results << handle_base_02(tmp[:val])\n        when 'dec' then results << handle_base_10(tmp[:val])\n        when 'hex' then results << handle_base_16(tmp[:val])\n        end\n      end\n\n      pretty_print results\n    end\n  end\n\nend\n# }}}\n\nNumSys.new(ARGV).run\n"
  },
  {
    "path": "bin/s3cp",
    "content": "#!/usr/bin/env bash\n\nif [[ $# -lt 1 ]]; then\n    echo \"usage: s3cp <local path> [s3 path] [options]\"\n    echo \"See 'aws s3 cp help' for available options.\"\n    exit 1\nfi\n\ntarget=\"${2:-\"$(basename $1)\"}\"\naws s3 cp \"$1\" \"s3://foobarquux/${target}\" --acl public-read \"${@:3}\"\necho \"https://s3.eu-west-2.amazonaws.com/foobarquux/${target}\" | tee >(pbcopy)\n"
  },
  {
    "path": "bin/s3ls",
    "content": "#!/usr/bin/env bash\n\naws s3 ls foobarquux --recursive\n"
  },
  {
    "path": "bin/s3rm",
    "content": "#!/usr/bin/env bash\n\nif [[ $# -lt 1 ]]; then\n    echo \"usage: s3rm <s3 path> [options]\"\n    echo \"See 'aws s3 rm help' for available options.\"\n    exit 1\nfi\n\naws s3 rm \"s3://foobarquux/$1\" \"${@:2}\"\n"
  },
  {
    "path": "bin/s3screenshot",
    "content": "#!/usr/bin/env bash\n\nif [[ $# -lt 1 ]]; then\n    echo \"usage: s3screenshot <filename>\"\n    echo \"Use <space> to toggle between window selection and interactive selection.\"\n    exit 1\nfi\n\ntarget=\"${1%.png}.png\"\n\n# -W  start in window selection mode\n# -o  no shadow\nif screencapture -Wo \"/tmp/${target}\"; then\n    aws s3 cp \"/tmp/${target}\" \"s3://foobarquux/screenshots/${target}\" --acl public-read\n    echo -n \"Copied to pasteboard: \"\n    echo \"https://s3.eu-west-2.amazonaws.com/foobarquux/screenshots/${target}\" | tee >(pbcopy)\nfi\n"
  },
  {
    "path": "bin/shell_function_missing",
    "content": "#!/usr/bin/env ruby\n\ncommand = ARGV\n\n# Prints and runs a command.\n#\n# @param [String, Array] cmd Command to run.\n#   Automatically joins Arrays with &&.\n\ndef run(*cmd)\n  $stderr.puts \"Running '#{cmd.join(' ')}' instead\"\n  system(*cmd)\nend\n\ndef echo(message)\n  $stderr.puts(\"\\n\" + message)\nend\n\ncase command.join(' ')\nwhen /^git(@|:\\/\\/).*\\.git$/\n  # Clone any full git repo URL.\n  # @example\n  #   git://github.com/crafterm/jd.git\n  #\n  # TODO: Doesn't work with zsh. It never gets called.\n  # TODO: Take a second argument for the destination name.\n\n  run(\"git\", \"clone\", command)\n\nwhen /^(.*) (.*)\\.git$/\n  # Clone a user and project from GitHub.\n  # Does the right thing when cloning your own projects.\n  #\n  # @example\n  #   bjeanes dot-files.git\n  git_project_user      = $1\n  git_project_name      = $2\n  destination_directory = \"\"\n  git_url               = \"\"\n\n  if git_project_user == ENV['USER']\n    destination_directory = git_project_name\n    git_url = \"git@github.com:#{git_project_user}/#{git_project_name}.git\"\n  else\n    destination_directory = [git_project_user, git_project_name].join('-')\n    git_url = \"git://github.com/#{git_project_user}/#{git_project_name}.git\"\n  end\n  # TODO: Would be nice to cd to the project directory afterwards\n  run \"git\", \"clone\", git_url, destination_directory\n  echo \"Cloned as \\'#{destination_directory}\\'\"\n\nwhen /^(?:ftp|https?):\\/\\/.+\\.t(?:ar\\.)?gz$/\n  # Download and unzip a URL\n  run \"curl #{command} | tar xzv\"\n\nwhen /^[a-z0-9_\\-\\/]+\\.feature$/\n  run \"cucumber\", command\n\nwhen /^[A-Za-z0-9_\\-\\/]+\\.gem$/\n  # Install a gem\n  # @example\n  #   haml.gem\n  gem_to_install = command.first.gsub(/\\.gem$/, '')\n  run \"sudo\", \"gem\", \"install\", gem_to_install\n\n\nelse\n  #abort \"Error: No matching action defined in #{__FILE__.inspect}\"\n  puts \"I never heard of such a command, you crazy fool.\"\n  exit 1\n  #ENV['PATH'].split(':').each do |val|\n  #val\n  #end\nend\n\n# Other Ideas:\n# * Open URL in browser\n# * cd to a path\n# * Run a spec by name\n# * Run a rake task by name\n\n"
  },
  {
    "path": "bin/svn-clean",
    "content": "#!/bin/zsh\n\n# Before svn 1.9 there was no:\n# svn cleanup --remove-unversioned\n\nsvn status | awk '/^\\?/ {print $2}' | xargs rm -r --\n"
  },
  {
    "path": "bin/svn-stats",
    "content": "#!/usr/bin/perl\n\nuse warnings;\nuse strict;\n\nuse Term::ANSIColor qw( :constants );\nuse List::MoreUtils qw( uniq );\n\nmy %seen;\nmy @log = `svn log --quiet --xml` or die 'svn log failed!';\n\n# count number of revisions by author\nmy @sorted = sort grep { /<author>(.*)<\\/author>/ && $seen{$1}++ } @log;\n\n# print revision ranking\nforeach my $author (sort { $seen{$a} <=> $seen{$b} } keys %seen) {\n    printf \"%20s  %s\\n\", GREEN.$seen{$author}, YELLOW.$author;\n}\n\nprintf \"\\n%20s  %s\\n\", GREEN.scalar @sorted, YELLOW.\"Number of revisions\";\nprintf \"%20s  %s\\n\", GREEN.scalar (uniq @sorted), YELLOW.\"Number of authors\";\n"
  },
  {
    "path": "bin/task",
    "content": "#!/usr/bin/env bash\n#\n# Simple todo list manager.\n#\n# Tasks will be written to ~/tasks.\n# Finished tasks, plus a timestamp, will be written to ~/tasks.log.\n\nusage() {\n    cat << 'EOF'\n  task ...    add task\n  task        show task #1\n  task -a     show all tasks\n  task -e     edit tasks using $EDITOR\n  task -f     finish task #1\n  task -f 3   finish task #3\n  task 3      finish task #3\n  task -fa    finish all tasks\nEOF\n}\n\ntask_exists() {\n    if [[ -s ~/tasks ]]; then\n        if [[ \"$(uname -s)\" == Linux ]]; then\n            shaprog=sha1sum\n        else\n            shaprog='shasum -a 1'\n        fi\n        newline_sha=\"$($shaprog <<< \"$*\" | cut -d' ' -f1)\"\n        while read -r line; do\n            line_sha=\"$($shaprog <<< \"$line\" | cut -d' ' -f1)\"\n            if [ \"$line_sha\" = \"$newline_sha\" ]; then\n                return 0\n            fi\n        done < ~/tasks\n    fi\n    return 1\n}\n\nlist_tasks() {\n    if [[ -s ~/tasks ]]; then\n        if (( $# == 0 )); then\n            nl -w2 -s'  ' ~/tasks\n        else\n            sed -n \"${1}p\" < ~/tasks\n        fi\n    else\n        echo -e \"\\e[1mLAZY TIME\\e[0m\"\n    fi\n}\n\nadd_task() {\n    if [[ \"$*\" =~ ^[0-9]+$ ]]; then\n        remove_task \"$@\"\n    elif task_exists \"$@\"; then\n        echo \"Task exists already.\"\n    else\n        echo \"$@\" >> ~/tasks\n    fi\n}\n\nremove_task() {\n    if (( $# == 0 )); then\n        read -rp \"Really? [yN] \" answer\n        [[ \"$answer\" != y ]] && return\n    fi\n    line=\"$(2>/dev/null sed -i '' -e \"${1}w /dev/stdout\" -e \"${1}d\" ~/tasks)\"\n    if [[ -n $line ]]; then\n        while IFS= read -r task; do\n            echo \"$(date +'%F %R') $task\" >> ~/tasks.log\n            echo \"Finished: $task\"\n            printf 'Next:     '\n            list_tasks 1\n        done <<< \"$line\"\n    fi\n}\n\ntask() {\n    if (( $# )); then\n        add_task \"$@\"\n    else\n        list_tasks 1\n    fi\n}\n\ncase \"$1\" in\n    -a)\n        list_tasks\n        ;;\n    -e)\n        $EDITOR ~/tasks\n        ;;\n    -f)\n        shift\n        if (( $# == 0 )); then\n            remove_task 1\n        else\n            remove_task \"$1\"\n        fi\n        ;;\n    -fa)\n        remove_task\n        ;;\n    -h)\n        usage\n        ;;\n    *)\n        task \"$@\"\n        ;;\nesac\n"
  },
  {
    "path": "bin/tips",
    "content": "#!/usr/bin/env ruby\n\ntips = [\n  \"I would rather die of passion than of boredom.  — Vincent Van Gogh\",\n  \"If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual.\",\n  \"I think a lot of new programmers like to use advanced data structures and advanced language features as a way of demonstrating their ability.  I call it the lion-tamer syndrome.  Such demonstrations are impressive, but unless they actually translate into real wins for the project, avoid them.  — Glyn Williams\",\n  \"The computing scientist’s main challenge is not to get confused by the complexities of his own making.  — E. W. Dijkstra\",\n  \"Progress in a fixed context is almost always a form of optimization. Creative acts generally don't stay in the context that they are in.  — Alan Kay\",\n  \"The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.  — Phil Wadler\",\n  \"A good programmer is someone who always looks both ways before crossing a one-way street.  — Doug Linder\",\n  \"Patterns mean \\\"I have run out of language.\\\"  — Rich Hickey\",\n  \"Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.  — John Woods\",\n  \"Unix was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things.\",\n  \"Contrary to popular belief, Unix is user friendly. It just happens to be very selective about who it decides to make friends with.\",\n  \"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.  — Antoine de Saint-Exupéry\",\n  \"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.  — C.A.R. Hoare\",\n  \"Gott existiert, weil die Mathematik widerspruchsfrei ist, und der Teufel existiert, weil wir das nicht beweisen können.  — Andre Weil\",\n  \"If you don't make mistakes, you're not working on hard enough problems.  — Frank Wilczek\",\n  \"If you don't start with a spec, every piece of code you write is a patch.  — Leslie Lamport\",\n  \"Caches are bugs waiting to happen.  — Rob Pike\",\n  \"Abstraction is not about vagueness, it is about being precise at a new semantic level.  — Dijkstra\",\n  \"dd is horrible on purpose. It's a joke about OS/360 JCL. But today it's an internationally standardized joke. I guess that says it all.  — Rob Pike\",\n  \"All loops are infinite ones for faulty RAM modules.  — graphitemaster\",\n  \"All idioms must be learned. Good idioms only need to be learned once.  — Alan Cooper\",\n  \"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.  — Richard Feynman\",\n  \"If programmers were electricians, parallel programmers would be bomb disposal experts. Both cut wires.  — Bartosz Milewski\",\n  \"Computers are harder to maintain at high altitude. Thinner air means less cushion between disk heads and platters. Also more radiation.\",\n  \"Almost every programming language is overrated by its practitioners.  — Larry Wall\",\n  \"Fancy algorithms are slow when n is small, and n is usually small.  — Rob Pike\",\n  \"If C++ and Java are about type hierarchies and the taxonomy of types, Go is about composition.  — Rob Pike\",\n  \"Methods are just functions with a special first argument.  — Andrew Gerrand\",\n\n  \"Care About Your Craft\\n\\nWhy spend your life developing software unless you care about doing it well?\",\n  \"Provide Options, Don’t Make Lame Excuses\\n\\nInstead of excuses, provide options. Don’t say it can’t be done; explain what can be done.\",\n  \"Be a Catalyst for Change\\n\\nYou can’t force change on people. Instead, show them how the future might be and help them participate in creating it.\",\n  \"Make Quality a Requirements Issue\\n\\nInvolve your users in determining the project’s real quality requirements.\",\n  \"Critically Analyze What You Read and Hear\\n\\nDon’t be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project.\",\n  \"DRY—Don’t Repeat Yourself\\n\\nEvery piece of knowledge must have a single, unambiguous, authoritative representation within a system.\",\n  \"Eliminate Effects Between Unrelated Things\\n\\nDesign components that are self-contained, independent, and have a single, well-defined purpose.\",\n  \"Use Tracer Bullets to Find the Target\\n\\nTracer bullets let you home in on your target by trying things and seeing how close they land.\",\n  \"Program Close to the Problem Domain\\n\\nDesign and code in your user’s language.\",\n  \"Iterate the Schedule with the Code\\n\\nUse experience you gain as you implement to refine the project time scales.\",\n  \"Use the Power of Command Shells\\n\\nUse the shell when graphical user interfaces don’t cut it.\",\n  \"Always Use Source Code Control\\n\\nSource code control is a time machine for your work—you can go back.\",\n  \"Don’t Panic When Debugging\\n\\nTake a deep breath and THINK! about what could be causing the bug.\",\n  \"Don’t Assume It—Prove It\\n\\nProve your assumptions in the actual environment—with real data and boundary conditions.\",\n  \"Write Code That Writes Code\\n\\nCode generators increase your productivity and help avoid duplication.\",\n  \"Design with Contracts\\n\\nUse contracts to document and verify that code does no more and no less than it claims to do.\",\n  \"Use Assertions to Prevent the Impossible\\n\\nAssertions validate your assumptions. Use them to protect your code from an uncertain world.\",\n  \"Finish What You Start\\n\\nWhere possible, the routine or object that allocates a resource should be responsible for deallocating it.\",\n  \"Configure, Don’t Integrate\\n\\nImplement technology choices for an application as configuration options, not through integration or engineering.\",\n  \"Analyze Workflow to Improve Concurrency\\n\\nExploit concurrency in your user’s workflow.\",\n  \"Always Design for Concurrency\\n\\nAllow for concurrency, and you’ll design cleaner interfaces with fewer assumptions.\",\n  \"Use Blackboards to Coordinate Workflow\\n\\nUse blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants.\",\n  \"Estimate the Order of Your Algorithms\\n\\nGet a feel for how long things are likely to take before you write code.\",\n  \"Refactor Early, Refactor Often\\n\\nJust as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.\",\n  \"Test Your Software, or Your Users Will\\n\\nTest ruthlessly. Don’t make your users find bugs for you.\",\n  \"Don’t Gather Requirements—Dig for Them\\n\\nRequirements rarely lie on the surface. They’re buried deep beneath layers of assumptions, misconceptions, and politics.\",\n  \"Abstractions Live Longer than Details\\n\\nInvest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies.\",\n  \"Don’t Think Outside the Box—Find the Box\\n\\nWhen faced with an impossible problem, identify the real constraints. Ask yourself: \\\"Does it have to be done this way? Does it have to be done at all?\\\"\",\n  \"Some Things Are Better Done than Described\\n\\nDon’t fall into the specification spiral—at some point you need to start coding.\",\n  \"Costly Tools Don’t Produce Better Designs\\n\\nBeware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.\",\n  \"Don’t Use Manual Procedures\\n\\nA shell script or batch file will execute the same instructions, in the same order, time after time.\",\n  \"Coding Ain’t Done ‘Til All the Tests Run\\n\\n‘Nuff said.\",\n  \"Test State Coverage, Not Code Coverage\\n\\nIdentify and test significant program states. Just testing lines of code isn’t enough.\",\n  \"English is Just a Programming Language\\n\\nWrite documents as you would write code: honor the DRY principle, use metadata, MVC, automatic generation, and so on.\",\n  \"Gently Exceed Your Users’ Expectations\\n\\nCome to understand your users’ expectations, then deliver just that little bit more.\",\n  \"Think! About Your Work\\n\\nTurn off the autopilot and take control. Constantly critique and appraise your work.\",\n  \"Don’t Live with Broken Windows\\n\\nFix bad designs, wrong decisions, and poor code when you see them.\",\n  \"Remember the Big Picture\\n\\nDon’t get so engrossed in the details that you forget to check what’s happening around you.\",\n  \"Invest Regularly in Your Knowledge Portfolio\\n\\nMake learning a habit.\",\n  \"It’s Both What You Say and the Way You Say It\\n\\nThere’s no point in having great ideas if you don’t communicate them effectively.\",\n  \"Make It Easy to Reuse\\n\\nIf it’s easy to reuse, people will. Create an environment that supports reuse.\",\n  \"There Are No Final Decisions\\n\\nNo decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.\",\n  \"Prototype to Learn\\n\\nPrototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn.\",\n  \"Estimate to Avoid Surprises\\n\\nEstimate before you start. You’ll spot potential problems up front.\",\n  \"Keep Knowledge in Plain Text\\n\\nPlain text won’t become obsolete. It helps leverage your work and simplifies debugging and testing.\",\n  \"Use a Single Editor Well\\n\\nThe editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.\",\n  \"Fix the Problem, Not the Blame\\n\\nIt doesn’t really matter whether the bug is your fault or someone else’s—it is still your problem, and it still needs to be fixed.\",\n  \"“select” Isn’t Broken\\n\\nIt is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.\",\n  \"Learn a Text Manipulation Language\\n\\nYou spend a large part of each day working with text. Why not have the computer do some of it for you?\",\n  \"You Can’t Write Perfect Software\\n\\nSoftware can’t be perfect. Protect your code and users from the inevitable errors.\",\n  \"Crash Early\\n\\nA dead program normally does a lot less damage than a crippled one.\",\n  \"Use Exceptions for Exceptional Problems\\n\\nExceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.\",\n  \"Minimize Coupling Between Modules\\n\\nAvoid coupling by writing “shy” code and applying the Law of Demeter.\",\n  \"Put Abstractions in Code, Details in Metadata\\n\\nProgram for the general case, and put the specifics outside the compiled code base.\",\n  \"Design Using Services\\n\\nDesign in terms of services—independent, concurrent objects behind well-defined, consistent interfaces.\",\n  \"Separate Views from Models\\n\\nGain flexibility at low cost by designing your application in terms of models and views.\",\n  \"Don’t Program by Coincidence\\n\\nRely only on reliable things. Beware of accidental complexity, and don’t confuse a happy coincidence with a purposeful plan.\",\n  \"Test Your Estimates\\n\\nMathematical analysis of algorithms doesn’t tell you everything. Try timing your code in its target environment.\",\n  \"Design to Test\\n\\nStart thinking about testing before you write a line of code.\",\n  \"Don’t Use Wizard Code You Don’t Understand\\n\\nWizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project.\",\n  \"Work with a User to Think Like a User\\n\\nIt’s the best way to gain insight into how the system will really be used.\",\n  \"Use a Project Glossary\\n\\nCreate and maintain a single source of all the specific terms and vocabulary for a project.\",\n  \"Start When You’re Ready\\n\\nYou’ve been building experience all your life. Don’t ignore niggling doubts.\",\n  \"Don’t Be a Slave to Formal Methods\\n\\nDon’t blindly adopt any technique without putting it into the context of your development practices and capabilities.\",\n  \"Organize Teams Around Functionality\\n\\nDon’t separate designers from coders, testers from data modelers. Build teams the way you build code.\",\n  \"Test Early. Test Often. Test Automatically.\\n\\nTests that run with every build are much more effective than test plans that sit on a shelf.\",\n  \"Use Saboteurs to Test Your Testing\\n\\nIntroduce bugs on purpose in a separate copy of the source to verify that testing will catch them.\",\n  \"Find Bugs Once\\n\\nOnce a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.\",\n  \"Build Documentation In, Don’t Bolt It On\\n\\nDocumentation created separately from code is less likely to be correct and up to date.\",\n  \"Sign Your Work\\n\\nCraftsmen of an earlier age were proud to sign their work. You should be, too.\"\n]\n\nputs ARGV[0] ? tips[ARGV[0].to_i] : tips.sample\n"
  },
  {
    "path": "bin/twump",
    "content": "#!/usr/bin/env ruby\n\n# Quick'n'dirty way to dump a tweet and its replies. Great for dumping wisdom\n# dropped in a thread.\n#\n# The name stands for \"tweet dump\". It's no pun on a misogynic, homophobic,\n# criminal, orange US president.\n\nrequire 'open-uri'\nrequire 'nokogiri'\n\nif ARGV.length < 1\n  puts \"usage: #{$0[/[^\\/]*$/]} <tweet url>\"\n  exit 1\nend\n\ndoc = Nokogiri::HTML(open(ARGV[0]))\nputs doc.css('p.tweet-text').map { |node| \"#{node.content}\\n\\n\" }\n"
  },
  {
    "path": "bin/unbook",
    "content": "#!/usr/bin/env bash\n\nif [[ -d __unbook ]]; then\n    echo 'Directory \"__unbook\" exists. Remove it manually.' 1>&2\n    exit 1\nfi\n\nif [[ $# -eq 0 ]]; then\n    echo \"usage: $0 <.rar/.zip>\" 1>&2\n    exit 1\nfi\n\nmkdir __unbook && cd __unbook\nmv ../\"$1\" .\n\next=\"${1##*.}\"\n\nif [[ $ext = rar ]]; then\n    unrar x \"$1\"\nelif [[ $ext = zip ]]; then\n    unzip \"$1\"\nfi\n\ndir=\"$(find . -type d | tail -n1)\"\nbooks=\"$(find \"$dir\" -type f \\( -name '*.epub' -o -name '*.pdf' \\))\"\n\nbook=\"$(grep '\\.epub$' <<< \"$books\")\"\n[[ -z $book ]] && book=\"$(grep '\\.pdf$' <<< \"$books\")\"\n\nif [[ -z $book ]]; then\n    echo 'No boook found!' 1>&2\n    exit 1\nfi\n\nif command -v rlwrap 1>/dev/null; then\n    new_name=\"$(rlwrap -pYellow -S 'New name> ' -P \"${book##*/}\" -o cat)\"\n    mv \"$book\" ../\"${new_name}\"\n    echo \"→ ${new_name}\"\nelse\n    mv \"$book\" ..\n    echo \"→ ${book##*/}\"\nfi\n\ncd ..\n\nread -r -n 1 -p 'Remove __unbook? [y/n] ' choice\n[[ $choice == [yY] ]] && rm -r __unbook\n"
  },
  {
    "path": "bin/unixsniff",
    "content": "#!/usr/bin/env bash\n\n# This only works for stream sockets.\n# For datagram sockets use UNIX-RECVFROM/UNIX-RECV.\n\nif [[ $# -lt 1 ]]; then\n    printf \"usage: %s [socat flags] <unix domain socket>\\n\" \"$(basename \"$0\")\" 1>&2\n    exit 1\nfi\n\nflags=\"${*: 1:$#-1}\"\nsocket=\"${*: -1}\"\n\nmv \"$socket\" \"$socket\".tmp\nsocat ${flags:--v} UNIX-LISTEN:\"$socket\",fork UNIX-CONNECT:\"$socket.tmp\"\nmv \"$socket\".tmp \"$socket\"\n"
  },
  {
    "path": "bin/vm",
    "content": "#!/usr/bin/env bash\n\ncmds=(\n    dhcp\n    info\n    list\n    save\n    ssh\n    start\n    stop\n)\n\nusage() {\n    printf 'vm %s\\n' \"${cmds[@]}\"\n    exit 0\n}\n\nlist_vms() {\n    declare -A vms\n\n    while read -r line; do\n        if [[ $line =~ ^\\\"(.*)\\\" ]]; then\n            vms[${BASH_REMATCH[1]}]=\n        fi\n    done < <(VBoxManage list vms)\n\n    while read -r line; do\n        if [[ $line =~ ^\\\"(.*)\\\" ]]; then\n            vms[${BASH_REMATCH[1]}]='[running]'\n        fi\n    done < <(VBoxManage list runningvms)\n\n    for vm in \"${!vms[@]}\"; do\n        if [[ ${vms[$vm]} =~ running ]]; then\n            echo -e \"   -> \\e[1m$vm ${vms[$vm]}\\e[0m\"\n        else\n            echo \"   -> $vm ${vms[$vm]}\"\n        fi\n    done | sort\n}\n\ncase \"$1\" in\n    dhcp)\n        VBoxManage list dhcpservers\n        ;;\n    info)\n        if (( $# < 2 )); then\n            echo 'vm info <vm>'\n            list_vms\n            exit 0\n        fi\n        VBoxManage showvminfo \"$2\"\n        ;;\n    l*)\n        list_vms\n        ;;\n    save)\n        if (( $# < 2 )); then\n            echo 'vm save <vm>'\n            list_vms\n            exit 0\n        fi\n        VBoxManage controlvm \"$2\" savestate\n        ;;\n    ssh)\n        shift\n        # work around SSH banner timeout\n        # ConnectionAttempts/ConnectTimeout won't help here\n        while ! nc localhost 3022 </dev/null; do sleep 1; done\n        exec ssh \\\n            -o UserKnownHostsFile=/dev/null \\\n            -o StrictHostKeyChecking=no \\\n            -p3022 -A \"$@\" mhi@localhost\n        ;;\n    start)\n        if (( $# < 2 )); then\n            echo 'vm start <vm>'\n            list_vms\n            exit 0\n        fi\n        # VBoxManage modifyvm \"$2\" --nic1 bridged\n        VBoxManage modifyvm \"$2\" --nic1 nat\n        VBoxManage modifyvm \"$2\" --natpf1 'ssh,tcp,,3022,,22' 2>/dev/null\n        VBoxHeadless --startvm \"$2\" &\n        vm ssh\n        ;;\n    stop)\n        if (( $# < 2 )); then\n            vm=\"$(VBoxManage list runningvms | head -n1 | cut -d'\"' -f2)\"\n            [[ -z $vm ]] && exit 1\n        else\n            vm=\"$2\"\n        fi\n        VBoxManage controlvm \"$vm\" poweroff\n        ;;\n    *)\n        usage\nesac\n"
  },
  {
    "path": "bin/weasel",
    "content": "#!/bin/bash\nset -eu\n\nweasels=(\n  clearly\n  completely\n  exceedingly\n  excellent\n  extremely\n  fairly\n  few\n  huge\n  interestingly\n  largely\n  many\n  mostly\n  quite\n  relatively\n  remarkably\n  several\n  significantly\n  substantially\n  surprisingly\n  tiny\n  various\n  vast\n  very\n)\n\nif [ -z \"${1:-}\" ]; then\n echo \"usage: `basename $0` <file> ...\" >&2\n exit 1\nfi\n\nIFS='|'\nif egrep -inH --color \"\\\\b(${weasels[*]})\\\\b\" \"$@\"; then\n  echo\n  echo \"ERROR: weasel words detected in source text.\"\n  exit 1\nfi\n"
  },
  {
    "path": "bin/wlan",
    "content": "#!/bin/bash\n\nfunction connect()\n{\n    echo \"[*] Setting up wlan0..\"\n    sudo ifconfig wlan0 up\n    echo \"[*] Connect to router..\"\n    sudo wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -f /etc/wpa_supplicant/wlan.log\n    echo \"[*] Getting local IP address..\"\n    sudo dhclient -q wlan0\n    echo \"[*] Connected to WLAN!\" | osd_cat -c yellow -d 2 -p middle -A center -f -*-terminus-*-r-*-*-32-*-*-*-*-*-iso10646-* &\n}\n\nfunction disconnect()\n{\n    echo \"[-] Terminating wpa_supplicant..\"\n    sudo killall -q -2 wpa_supplicant\n    echo \"[-] Terminating dhclient..\"\n    sudo killall -q -2 dhclient\n    echo \"[-] Shutting down wlan interface..\"\n    sudo ifconfig wlan0 down\n    echo \"[-] Disconnected from WLAN!\" | osd_cat -d 2 -p middle -A center -f -*-terminus-*-r-*-*-32-*-*-*-*-*-iso10646-* &\n}\n\nfunction reconnect()\n{\n    disconnect\n    connect\n}\n\nwhile getopts \"cdr\" opt;\ndo\n    case \"$opt\" in\n        c) connect;;\n        d) disconnect;;\n        r) reconnect;;\n    esac\ndone\n\necho \"[*] ./${0##*/} executed!\"\n"
  },
  {
    "path": "bin/zproc",
    "content": "#!/bin/zsh\n\n#\n# Author: Marco Hinz <mh.codebro@gmail.com>\n# URL:    http://github.com/mhinz\n# Desc:   This script outputs information about processes taken from /proc.\n# Input:  Either a PID or (part of) a process name. Several arguments possible.\n#\n\ntypeset -A stat\nzmodload -ab zsh/stat stat\n\nif [[ $terminfo[colors] -eq 256 ]] {\n    red=$(echoti setaf 167)\n    yellow=$(echoti setaf 215)\n} else {\n    red=$(echoti setaf 1)\n    yellow=$(echoti setaf 3)\n}\ngreen=$(echoti setaf 2)\nreset=$(echoti sgr0)\n\nget_info()\n{\n    builtin stat -H link +link exe\n\n    cd /proc/$1 2>/dev/null || return\n\n    comm=$(< comm)\n    cmdline=(${(0)\"$(< cmdline)\"})\n\n    echo \"${yellow}${comm} ($1)${reset}\"\n    echo \"  ${red}* Status:${reset}\"\n\n    printf \"    ${green}%-10s${reset} %s\\n\" \"Bin:\" $link[link]\n    printf \"    ${green}%-10s${reset} %s\" \"Flags:\" \"${cmdline[2,-1]:-(none)}\"\n\n    # The perl code here does exactly the same\n    # as the following while and for loop.\n    #perl -ne 'use Term::ANSIColor; /^(State|Pid|PPid|Threads):\\s+(.+)/ &&\n        #printf \"\\n    %-19s %s \", colored(\"$1:\", 'green'), $2' status\n\n    while { read k v } {\n        stat[$k]=$v\n    } < status\n\n    for i (State: Pid: PPid: Threads:) {\n        printf \"\\n    ${green}%-10s${reset} %s\" $i \"$stat[$i]\"\n    }\n\n    echo \" (\" task/*(N:t) \")\"\n    echo \"  ${red}* Descriptors:${reset}\"\n\n    for i (fd/*(nN)) {\n        builtin stat -H link +link \"$i\"\n        printf \"    ${green}%-10s${reset} %s\\n\" \"$i:\" \"$link\"\n    }\n}\n\nmain()\n{\n    for i ($@) {\n        [[ $i == <-> ]] && get_info $i && continue\n        main $(pgrep $i)\n    }\n}\n\nmain $@\n"
  },
  {
    "path": "english.yaml",
    "content": "abberation:                  Abweichung, Anomalie\naccomodation:                Unterkunft\naccretion:                   Wertsteigerung, Zuwachs\nacrimoniously:               bitter, verbittert\nadamant:                     hartnäckig\nadmonition:                  Ermahnung, Mahnung\naffect sb.:                  jmd. betreffen\naffectionate:                liebevoll\naffidavit:                   Versicherung (Beteuerung), eidesstattliche Erklärung\naffliction:                  Krankheit, Gebrechen\nagitable:                    erregbar\nagitated:                    erregt (disturbed, upset)\nailment:                     Krankheit, Leiden\nalbeit:                      obgleich, wenngleich, allerdings, jedoch\nambigigous:                  zwei- oder mehrdeutig\nanointing:                   Salbung, Ölung\nanticipation:                Vorfreude, Erwartung\napoplectic:                  rasend (vor Wut)\nappreciation:                Dankbarkeit, Wertschätzung\naptitude:                    Begabung\narid:                        trocken, wasserarm\naskance:                     misstrauisch\naspersion:                   Verleumdung, abfällige Bemerkung, besprühen mit Weihwasser (reli.)\nastonishing:                 erstaunlich\nattenuation:                 Dämpfung, Abschwächung\nattire:                      Kleidung, Anzug, Tracht\nattrition:                   Zermürbung, Abnutzung, Verschleiß\naudacity:                    Dreistigkeit\navid:                        begeistert\nawe:                         Ehrfurcht\nbad-tempered:                schlecht gelaunt\nbaffled:                     erstaunt\nbeguiling:                   betörend (\"beguilingly convenient\")\nbelligerently:               streitlustig\nbenign:                      harmlos, gutartig (med.)\nbland:                       fade\nblanket:                     pauschal, generell\nblazing:                     leuchtend, lodernd\nblunder:                     Patzer, Schnitzer\nblunderbuss:                 Tollpatsch, Donnerbüchse (hist. Schusswaffe)\nblurt smth. out:             mit etw. herausplatzen\nbodacious:                   toll, großartig, aufregend\nbountiful:                   reichlich, reich\nby heart:                    auswendig\ncapricious:                  launisch, unberechenbar\ncharge:                      Anklage\nchastened:                   gedrückt, gedämpft (Stimmung), geläutert (zur Einsicht gelangt)\nclandestine:                 geheim, heimlich\nclumsy:                      holprig, plump, ungeschickt\ncombustible:                 brennbar, entflammbar\ncompartmentalized:           unterteilt\ncomplacency:                 Selbstgefälligkeit, Selbstzufriedenheit\ncompulsive:                  zwanghaft, triebhaft\ncompulsory:                  vorgeschrieben, verpflichtend, zwingend, verbindlich\nconceivably:                 denkbar\ncondescendingly:             herablassend, von oben herab\ncontagious:                  ansteckend\ncontemplating:               betrachted, erwägend\ncontiguous:                  zusammenhängend, angrenzend\nconversely:                  umgekehrt, im Gegenzug\ncosy:                        gemütlich\ncrooked:                     krumm, schief\ncrucial:                     entscheidend\ndeclension:                  Deklination\ndefiant:                     trotzig\ndelight me:                  begeistere mich\ndelightful:                  entzückend, köstlich, erfreulich\ndemeanor:                    Auftreten, Benehmen\ndemonize smth.:              etw. verteufeln\nderogatory:                  abwertend, abfällig\ndesignated:                  dafür bestimmt, vorgesehen\ndeterioration:               Verschlechterung, Verfall, Abnutzung\ndeterrence:                  Abschreckung\ndetrimental:                 schädlich, nachteilig\ndevoted:                     treu ergeben\ndichotomy:                   Zweiteilung, Gegensätzlichkeit\ndiminutive:                  verkleinernd\ndiscernment:                 Urteilsvermögen\ndismal:                      düster, trostlos\ndisparaging:                 abschätzig\ndissolve:                    (sich) auflösen\ndistortion:                  Verfälschung\ndistress:                    Not, Elend, Bedrängnis, Notlage\ndomestically:                im Inland\ndrought:                     Dürre(periode)\nduly:                        ordnungsgemäß, ordentlich, formgerecht\nedible:                      essbar\neerie:                       unheimlich, gruselig\neffigy:                      Nachbildung, oft Puppe oder bildhafte Darstellung einer verhassten Person\neffusive:                    überschwänglich\negregious:                   ungeheuerlich\nemaciated:                   abgemagert\nendearment:                  Zärtlichkeit\nendowment:                   Schenkung (law)\nephemeral:                   vergänglich, kurzlebig\neponymous:                   gleichnamig\nequitable:                   gerecht\nescrow:                      Treuhand, Hinterlegung, Übertragungsurkunde\netymology:                   Wortherkunft\nevitable:                    vermeidbar\nexaltation:                  Begeisterung\nexpat:                       kurz fuer= expatriate, im Ausland lebende/arbeitende Person\nexpulsion:                   Ausschluss, Vertreibung\nexsanguinated:               ausgeblutet\nextensively:                 ausführlich\nfactual:                     sachlich\nfaltering:                   stockend, halbherzig, zögernd, schwankend (faltering economy -> stagnierende Wirtschaft)\nfatuous:                     töricht, albern, einfältig\nfool around:                 herumalbern\nfoothold:                    Standbein\nfraudulent:                  betrügerisch\nfurtive:                     heimlich, verstohlen\nfuss:                        Wirbel, Aufregung\ngarbled:                     verstümmelt\ngarrulous:                   geschwätzig\ngathering:                   Zusammenkunft\ngenuine:                     echt, authentisch, unverfälscht, aufrichtig (sincere)\nget across:                  rüberbringen\nget back on track:           wieder auf die Beine kommen\nglumly:                      bedrückt, niedergeschlagen\ngnarly:                      krass (ugs.), knochig\ngo to (greath) lengths:      sich große Mühe geben\ngorge:                       Schlucht\ngrant:                       Zuschuss\ngreasy:                      fettig\ngrid:                        Raster\ngrieving:                    trauernd\ngrim:                        düster\ngrouch:                      Muffel, Griesgram\nguts:                        Mut\nhaphazardly:                 zufällig, willkürlich\nhawkishness:                 Angriffslust\nheinous:                     abscheulich, schrecklich, verabscheuungswürdig\nheretofore:                  bisher, bislang\nhigh-pitched:                schrill\nhitherto:                    bisher\nhumble:                      bescheiden, einfach\nhurdle:                      Hindernis, Hürde\nhushed:                      gedämpft\ni.e.:                        d.h.\nidiosyncrasy:                Eigenart\nignitable:                   entflammbar\nimminent:                    bevorstehend, drohend (Gewitter, Gefahr, etc.)\nimplication:                 Folge, Auswirkung\nimpunity:                    Straffreiheit\nin a fit of pique:           in plötzlicher Gereiztheit\nin office:                   im Amt\nin perpetuity:               auf Dauer, auf Ewig\nin vain:                     vergebens, umsonst\nincapacitated:               arbeitsunfähig\nincessant:                   unaufhörlich, unablässig\nincessantly:                 unaufhörlich, ständig\nincidentally:                übrigens\nincumbent:                   amtierend, vorherrschend\nindefatigable:               unermüdlich\nindomitable:                 unbeugsam, unbezwingbar\ninept:                       unfähig, untauglich\ninextricably:                untrennbar miteinander verbunden\ninfatuating:                 betörend\ningenuity:                   Einfallsreichtum\ninnocuous:                   harmlos\ninsipid:                     fade, geschmacklos (lacking flavour)\ninterlocking:                ineinandergreifend\nintransigence:               Unnachgiebigkeit\nintrepid:                    kühn, unerschrocken\ninvasive:                    angreifend, eindringend, in die Privatsphäre eingreifend\ninvigorated by:              gestärkt/belebt durch\ninvincible:                  unbesiegbar\nirritated:                   genervt, gereizt, reizbar\njudiciously:                 vernünftig, umsichtig\nkeen to do smth.:            etw. unbedingt tun wollen\nlaconic:                     lakonisch, prägnant, kurz und bündig\nlanded gentry:               Landadel\nlaurels:                     Lorbeeren\nleaping:                     hevorspringend\nlet it marinate for now:     etwas sacken lassen (ugs.)\nlevy:                        Abgabe, Steuer, Gebühr, Erhebung\nliterally:                   wörtlich\nlitigation:                  Rechtsstreit, Prozess\nlittering:                   Vermüllen\nlivestock:                   Viehbestand, Nutztiere\nlollygagging:                Trödeln (Am.)\nloquacious:\nmagnanimous:                 großherzig, großzügig, generious or forgiving (esp. towards a rival or less powerful person)\nmarvellous:                  wunderbar, fabelhaft, wundervoll, herrlich\nmeasure:                     Maßnahme\nmemorable:                   unvergesslich\nmental imagery:              Kopfkino\nmind-numbingly:              öde, todlangweilig\nminiscule:                   unbedeutend, winzig\nmoniker:                     Spitzname\nmoot:                        irrelevant, strittig, fraglich\nmoribund:                    todgeweiht, sterbend\nmustard:                     Senf\nnascent:                     im Entstehen begriffen\nnasty:                       übel, unangenehm\nneatly:                      sauber, ordentlich\nnebulous:                    nebelig, unklar\nnefarious:                   schändlich, ruchlos, verachtenswert\nnewfangled:                  neumodisch\nnothing out of the ordinary: nicht ungewöhnlich\nold hand:                    alter Hase\noutraged:                    empört\noutrageous:                  abscheulich, empörend\npageantry:                   Prunk\npalpable:                    greifbar, fühlbar\npastry:                      Gebäck\npenultimate:                 vorletzter\nperemptoriness:              Endgültigkeit\npernicious:                  schädlich\npetrichor:                   Regengeruch\npile of straw:               Strohballen\npilfering:                   stibitzend, geringfügiger Diebstahl (law)\nplaintiff:                   Kläger\npolling booth:               Wahlkabine\nprecarious:                  unsicher, heikel\nprecocious:                  altklug, frühreif\npreposterous:                absurd, lächerlich, grotesk\nprized:                      geschätzt, wertvoll\nprocurement:                 Beschaffung\nprofit margin:               Profitspanne\nprofound:                    tiefgreifend, tiefgründig\npromiscuous:                 leichtfertig, wahllos\npros and cons:               Vor- und Nachteile\npugnacious:                  kampflustig, streitsüchtig\nputrescent:                  verfaulend\nrambunctious:                ungestüm, wild (tobend)\nrap sb. on the knuckles:     jmd. auf die Finger klopfen\nrapport:                     Übereinstimmung, enge Beziehung (\"eye contact with the audience helps building rapport\")\nravenously:                  ausgehungert\nravine:                      Schlucht, Klamm\nrebuttal:                    Gegenbeweis, Widerlegung\nreckoning:                   Abrechnung\nresuscitate:                 wiederbeleben, reanimieren\nretailer:                    Einzelhändler\nretaliate:                   kontern\nreverberating:               nachhallen, widerhallen\nrumpled:                     zerknittert\nsardonic:                    hämisch, sarkastisch\nsavage:                      wild, brutal, unzivilisiert\nsavory:                      schmackhaft, herzhaft\nscant:                       knapp, gering (improvement, success)\nseabed:                      Meeresboden\nsee eye to eye:              einer Meinung sein\nserenity:                    Gelassenheit\nservile:                     unterwürfig, sklavish\nshelled:                     gepult, geschält\nshortcoming:                 Unzulänglichkeit\nshrewd:                      schlau, gerissen (ugs.)\nsignatory:                   Unterzeichner, Vertragsstaat\nskittishness:                sprunghaftigkeit\nsleight:                     Geschicklichkeit, List\nsmth. has to give:           etwas muss weichen\nso as to:                    so dass, um...zu (\"Put it into a fund, so as to get interested on it\"), [alternativ= in order to]\nsordid:                      schäbig, heruntergekommen (ugs.)\nsqueamish:                   zimperlich\nstark:                       krass\nstilt:                       Pfeiler, Pfahl\nstringent:                   streng, strikt\nstringing together:          aneinanderreihen\nstunned:                     benommen\nsubordinate clause:          Nebensatz\nsubpoena:                    Zwangsvorladung\nsubsidy:                     Subvention\nsuccinct:                    prägnant, knapp, kurz, lapidar\nsumptuous:                   üppig (Ausstattung, Essen)\nsupremacy:                   Vorherrschaft, Obergewalt\nsurface car:                 Straßenbahn\nsurreptitiously:             heimlich\nsustainability:              Nachhaltigkeit\ntacit:                       stillschweigend\ntantalizing:                 verlockend, verführerisch\nteal:                        petrol, blaugrün\ntemerity:                    Frechheit, Dreistigkeit (excessive boldness)\ntenacious:                   hartnäckig, beharrlich\ntenacity:                    Zähigkeit, Beharrlichkeit, Hartnäckigkeit\ntentatively:                 zögernd\nto abound:                   reichlich vorhanden sein (\"a business in which opportunities abound\", \"life abounded in mysteries\")\nto acquire:                  erwerben, bekommen\nto assess:                   beurteilen, bewerten\nto bang shut:                zuschlagen (\"the door banged shut\")\nto bargain:                  (ver)handeln\nto barge in:                 sich einmischen\nto be a goner:               erledigt sein\nto be in a pique with sb:    gegen jmd. einen Groll hegen\nto boast:                    angeben, prahlen\nto bother:                   sich bemühen\nto buttress:                 untermauern\nto commemorate sb./sth.:     jmd./etw. gedenken (\"in commemoration of\")\nto confine:                  beschränken, einsperren, einengen, limitieren\nto convey:                   übermitteln, übertragen\nto croak:                    krächzen, abkratzen (coll.)\nto dazzle:                   blenden\nto demote:                   zurückstufen, herabsetzen\nto devise:                   entwickeln, ausarbeiten\nto digress:                  abschweifen (vom Thema)\nto disdain:                  verachten, geringschätzen\nto evoke:                    heraufbeschwören\nto feast:                    schlemmen, feiern\nto fix:                      festlegen, festmontieren, binden (Preis), Drogen spritzen\nto flash:                    aufblitzen lassen\nto foil sb.:                 jmd. einen Strich durch die Rechnung machen\nto foil smth.:               vereiteln\nto gasp:                     keuchen, nach Luft ringen\nto giggle:                   kichern\nto grouch:                   nörgeln, schimpfen\nto grovel:                   kriechen (to behave in a servile manner)\nto hinder:                   hindern, aufhalten\nto hiss:                     zischen\nto hum and haw:              herumdrucksen\nto hush:                     beschwichtigen, verstummen, still sein, zum Schweigen bringen\nto incinerate smth.:         etw. verbrennen\nto incinerate:               verbrennen, einäschern\nto levy:                     erheben (tax, fine)\nto litter:                   zumüllen\nto lollygag:                 Zeit verplempern (Am.)\nto look askance at sb.:      jmd. missbilligend/misstrauisch ansehen\nto mime:                     pantomimisch darstellen\nto plead:                    bitten (mit Nachdruck)\nto put aside:                beiseitelegen\nto reconcile:                schlichten\nto reimpose:                 wiederauferlegen\nto root for sb.:             jmd. anfeuern\nto roster sb.:               jmd. eintragen (in eine Liste schreiben)\nto scourge sb.:              jmd. auspeitschen, geißeln\nto snort:                    schnauben, prusten\nto spur:                     anstacheln, vorantreiben\nto stack:                    stapeln\nto stamp:                    stampfen\nto surmise:                  vermuten\nto thrive:                   gedeihen, florieren\nto tinker with:              an etw. tüfteln\nto underpin:                 untermauern\nto usurp sb.:                jmd. verdrängen\nto usurp smth.:              sich etw. bemächtigen (\"the white man usurped more and more of the natives' land\")\nto utter:                    äußern, aussprechen, in Umlauf bringen (z.B. Geld)\nto wade:                     waten\nto wind down:                entspannen\ntortuous:                    gewunden, verworren\ntranslucent:                 lichtdurchlässig\ntrench:                      Graben\ntypified:                    versinnbildlicht, verkörpert\nunfazed:                     unbeeindruckt\nunfettered:                  uneingeschränkt\nunprecedented:               beispiellos\nunruffled:                   unerschüttert\nunsolicited:                 unaufgefordert\nunswerving:                  unerschütterlich\nup in the air:               noch offen, in der Schwebe (idiom)\nutter:                       äußerst\nvacuous:                     nichtssagend\nvendor:                      Verkäufer, Lieferant\nvernacular:                  örtlich, volkssprachlich, mundartlich\nvested interest:             Eigeninteresse\nvestigal:                    rudimentär, spärlich\nvigilance:                   Wachsamkeit, Umsicht\nvile:                        abscheulich (schändlich, verwerflich), ekelhaft\nvindication:                 Geltendmachung\nvisceral:                    tief sitzend\nvolatile:                    flüchtig, unbeständig\nvoracious:                   unersättlich\nward:                        Abteilung\nwhiff:                       Hauch\nwistfully:                   wehmütig\nwithdrawal:                  Rückzug\nworthy:                      angemessen, würdig, lobenswert\n"
  }
]