initial commit

This commit is contained in:
Daniel Flanagan 2016-01-06 11:55:04 -06:00
commit 76437e17a4
37 changed files with 1482 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
colors/gen/vendor
colors/gen/tmp

23
aur/arch_setup.bash Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
sudo pacman -S curl openssl perl expac yajl --noconfirm
# receive cower's gpg key
gpg --recv-keys 1EB2638FF56C0C53
mkdir -p "$REPOSITORY_PATH"
git clone https://aur.archlinux.org/cower.git "$REPOSITORY_PATH/cower"
git clone https://aur.archlinux.org/pacaur.git "$REPOSITORY_PATH/pacaur"
cd "$REPOSITORY_PATH/cower"
makepkg -i --noconfirm
cd -
cd "$REPOSITORY_PATH/pacaur"
makepkg -i --noconfirm
cd -

27
colors/gen/gen.bash Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../.." && pwd)
source "$DIR/variables.bash"
mkdir -p "$DOTFILES_PATH/colors/gen/vendor"
B16_DIR="$DOTFILES_PATH/colors/gen/vendor/base16-builder"
if [ -d "$B16_DIR" ]; then
echo "Skipping repo pull down..."
else
git clone https://github.com/lytedev/base16-builder.git "$DOTFILES_PATH/colors/gen/vendor/base16-builder"
fi
cd "$DOTFILES_PATH/colors/gen/schemes"
cp * "$DOTFILES_PATH/colors/gen/vendor/base16-builder/schemes"
cd -
"$DOTFILES_PATH/colors/gen/vendor/base16-builder/base16" -t vim
"$DOTFILES_PATH/colors/gen/vendor/base16-builder/base16" -t xresources
"$DOTFILES_PATH/colors/gen/vendor/base16-builder/base16" -t shell
COLORS_PATH=$DOTFILES_PATH/colors/gen/vendor/base16-builder/output
cp "$COLORS_PATH/xresources/base16-donokai.dark.xresources" "$DOTFILES_PATH/colors/xresources"
cp "$COLORS_PATH/vim/base16-donokai.vim" "$DOTFILES_PATH/colors/vim"
cp "$COLORS_PATH/shell/base16-donokai.dark.sh" "$DOTFILES_PATH/colors/shell"

View file

@ -0,0 +1,19 @@
scheme: "Donokai"
author: "Wimer Hazenberg (http://www.monokai.nl)"
base00: "111111"
base01: "383830"
base02: "49483e"
base03: "75715e"
base04: "a59f85"
base05: "f8f8f2"
base06: "f5f4f1"
base07: "f9f8f5"
base08: "f92672"
base09: "fd971f"
base0A: "f4bf75"
base0B: "a6e22e"
base0C: "a1efe4"
base0D: "66d9ef"
base0E: "ae81ff"
base0F: "cc6633"

12
colors/link.bash Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
rm -f ~/.Xresources.colors
rm -f "$DOTFILES_PATH/vim/config/colors/current.vim"
ln -s "$DOTFILES_PATH/colors/xresources" "$HOME/.Xresources.colors"
ln -s "$DOTFILES_PATH/colors/vim" "$DOTFILES_PATH/vim/config/colors/current.vim"
xrdb ~/.Xresources

125
colors/shell Normal file
View file

@ -0,0 +1,125 @@
#!/bin/sh
# Base16 Donokai - Shell color setup script
# Wimer Hazenberg (http://www.monokai.nl)
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
fi
color00="11/11/11" # Base 00 - Black
color01="f9/26/72" # Base 08 - Red
color02="a6/e2/2e" # Base 0B - Green
color03="f4/bf/75" # Base 0A - Yellow
color04="66/d9/ef" # Base 0D - Blue
color05="ae/81/ff" # Base 0E - Magenta
color06="a1/ef/e4" # Base 0C - Cyan
color07="f8/f8/f2" # Base 05 - White
color08="75/71/5e" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="f9/f8/f5" # Base 07 - Bright White
color16="fd/97/1f" # Base 09
color17="cc/66/33" # Base 0F
color18="38/38/30" # Base 01
color19="49/48/3e" # Base 02
color20="a5/9f/85" # Base 04
color21="f5/f4/f1" # Base 06
color_foreground="f8/f8/f2" # Base 05
color_background="11/11/11" # Base 00
color_cursor="f8/f8/f2" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
# non-interactive
alias printf=/bin/false
else
printf_template="\033]4;%d;rgb:%s\033\\"
printf_template_var="\033]%d;rgb:%s\033\\"
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg f8f8f2 # forground
printf $printf_template_custom Ph 111111 # background
printf $printf_template_custom Pi f8f8f2 # bold color
printf $printf_template_custom Pj 49483e # selection color
printf $printf_template_custom Pk f8f8f2 # selected text color
printf $printf_template_custom Pl f8f8f2 # cursor
printf $printf_template_custom Pm 111111 # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

316
colors/vim Normal file
View file

@ -0,0 +1,316 @@
" Base16 Donokai (https://github.com/chriskempson/base16)
" Scheme: Wimer Hazenberg (http://www.monokai.nl)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/base16-donokai.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "111111"
let s:gui01 = "383830"
let s:gui02 = "49483e"
let s:gui03 = "75715e"
let s:gui04 = "a59f85"
let s:gui05 = "f8f8f2"
let s:gui06 = "f5f4f1"
let s:gui07 = "f9f8f5"
let s:gui08 = "f92672"
let s:gui09 = "fd971f"
let s:gui0A = "f4bf75"
let s:gui0B = "a6e22e"
let s:gui0C = "a1efe4"
let s:gui0D = "66d9ef"
let s:gui0E = "ae81ff"
let s:gui0F = "cc6633"
" Terminal color definitions
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "10"
let s:cterm02 = "11"
let s:cterm04 = "12"
let s:cterm06 = "13"
let s:cterm09 = "09"
let s:cterm0F = "14"
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "base16-donokai"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
if a:color == s:cterm00
return s:cterm07
elseif a:color == s:cterm01
return s:cterm06
elseif a:color == s:cterm02
return s:cterm05
elseif a:color == s:cterm03
return s:cterm04
elseif a:color == s:cterm04
return s:cterm03
elseif a:color == s:cterm05
return s:cterm02
elseif a:color == s:cterm06
return s:cterm01
elseif a:color == s:cterm07
return s:cterm00
endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("htmlTag", s:gui05, "", s:cterm05, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

41
colors/xresources Normal file
View file

@ -0,0 +1,41 @@
! Base16 Donokai
! Scheme: Wimer Hazenberg (http://www.monokai.nl)
#define base00 #111111
#define base01 #383830
#define base02 #49483e
#define base03 #75715e
#define base04 #a59f85
#define base05 #f8f8f2
#define base06 #f5f4f1
#define base07 #f9f8f5
#define base08 #f92672
#define base09 #fd971f
#define base0A #f4bf75
#define base0B #a6e22e
#define base0C #a1efe4
#define base0D #66d9ef
#define base0E #ae81ff
#define base0F #cc6633
*foreground: base05
*background: base00
*cursorColor: base05
*color0: base00
*color1: base08
*color2: base0B
*color3: base0A
*color4: base0D
*color5: base0E
*color6: base0C
*color7: base05
*color8: base03
*color9: base09
*color10: base01
*color11: base02
*color12: base04
*color13: base06
*color14: base0F
*color15: base07

22
de/arch_setup.bash Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
sudo pacman -S xcb-util xcb-util-keysyms xcb-util-wm --noconfirm
mkdir -p "$REPOSITORY_PATH"
git clone https://github.com/baskerville/bspwm.git "$REPOSITORY_PATH/bspwm"
git clone https://github.com/baskerville/sxhkd.git "$REPOSITORY_PATH/sxhkd"
cd "$REPOSITORY_PATH/bspwm"
make
sudo make install
cd -
cd "$REPOSITORY_PATH/sxhkd"
make
sudo make install
cd -

28
de/bspwm_config Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env sh
source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/scripts/get_color.sh"
bspc config normal_border_color "#$(get_color 05)"
bspc config focused_border_color "#$(get_color 0D)"
bspc config active_border_color "#$(get_color 0D)"
bspc config border_width "$BORDER_WIDTH"
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_by_distance true
bspc config window_gap "$WINDOW_GAP"
MONITOR_COUNT=$(bspc query -M | wc -l | awk '{ printf $1 }')
PER_MONITOR=$((10 / MONITOR_COUNT))
i=1
for mon in $(bspc query -M); do
echo $mon
echo $i
max=$((i + PER_MONITOR - 1))
echo $max
bspc monitor "$mon" -d $(seq $i $max)
i=$((max + 1))
done

9
de/bspwmrc Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env sh
source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/de/bspwm_config"
sxhkd &
urxvtd &

10
de/link.bash Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
rm -f "$HOME/.config/bspwm/bspwmrc"
rm -f "$HOME/.config/sxhkd/sxhkdrc"
ln -s "$DOTFILES_PATH/de/bspwmrc" "$HOME/.config/bspwm/bspwmrc"
ln -s "$DOTFILES_PATH/de/sxhkdrc" "$HOME/.config/sxhkd/sxhkdrc"

176
de/sxhkdrc Executable file
View file

@ -0,0 +1,176 @@
# node manager shortcuts
# kill the node manager
super + ctrl + Escape
bspc quit
# kill the current node
super + c
bspc node -c
# swap layouts
#super + y
# bspc desktop -l next
# balance node surface area on current desktop
super + b
bspc desktop -B
# toggle floating/fullscreen modes for current node
super + {s,f}
bspc node -t {floating,fullscreen}
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# swap positions with the previous node
super + apostrophe
bspc node -s last
# swap the current node with the biggest node on the current desktop
super + m
bspc node -s biggest
# move/swap between nodes using vim-style arrows
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# swap previous/next desktops
super + bracket{left,right}
bspc desktop -f {prev,next}
super + {p,n}
bspc desktop -f {prev,next}
# rotate node placement on current desktop
super + r
bspc desktop -R 90
# preselect the splitting area for the current node
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# clear the splitting area
super + ctrl + {_,shift + }space
bspc {node -p cancel,desktop -c}
# expand the current node
super + alt + {h,j,k,l}
bspc node -e {left -10,down +10,up -10,right +10}
# shrink the current node
super + alt + shift + {h,j,k,l}
bspc node -e {right -10,up +10,down -10,left +10}
# set node split ratio
super + ctrl + {1-9,0}
bspc node -r 0.{1-9,10}
# focus/move node to the selected desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} ^{1-9,10}
# focus clicked node
~button1
bspc pointer -g focus
# mouse controls for node movement and resizing
super + button{1-3}
bspc pointer -g {move,resize_side,resize_corner}
# simulate mouse2
shift + super + button1
bspc pointer -g resize_corner
# ???
super + !button{1-3}
bspc pointer -t %i %i
# ???
super + @button{1-3}
bspc pointer -u
# change node gap and desktop padding
super + plus
bspc config -d focused node_gap $((`bspc config -d focused node_gap` + 5 ))
super + equal
bspc config -m $(bspc query -M | head -n 1) top_padding $BAR_HEIGHT; bspc config -d focused node_gap $node_GAP
super + minus
bspc config -d focused node_gap $((`bspc config -d focused node_gap` - 5 ))
super + alt + r
bspc config -m $(bspc query -M | head -n 1) top_padding $BAR_HEIGHT; bspc config -d focused node_gap 0
super + alt + plus
bspwm_padding +5
super + alt + minus
bspwm_padding -5
# wm-independant shortcuts
# spawn a transparent node
super + alt + t
urxvtc && compton-trans -c -o 0
# make current node transparent
super + t
compton-trans -c -o 0
# make current node fully opaque
super + shift + t
compton-trans -c -o 100
# swap sxhkx config with an alternate file and reload the new one
super + shift + alt + ctrl + r
if [ -e ~/.config/sxhkd/altsxhkdrc ]; then mv ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/origsxhkdrc && mv ~/.config/sxhkd/altsxhkdrc ~/.config/sxhkd/sxhkdrc && pkill -USR1 -x sxhkd; fi
# spawn a terminal
super + Return
urxvtc
# spawn the app launcher
super + space
dmenu_run -fn "$PRIMARY_FONT_FAMILY_WITH_SIZE" -i -nb "#$(get_color 00)" -sb "#$(get_color 00)" -sf "#$(get_color 0A)" -nf "#$(get_color 04)" -h "$BAR_HEIGHT"
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
# lock the desktop
super + ctrl + shift + l
slock
# spawn gui file explorer
super + e
thunar
# volumes controls and media navigation for media keys
{_,shift + }XF86AudioLowerVolume
ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%- && amixer -c 1 sset Headphone $ADJ%- && amixer -c 1 sset Master $ADJ%- && update_bar_MasterVolume
{_,shift + }XF86AudioRaiseVolume
ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%+ && amixer -c 1 sset Headphone $ADJ%+ && amixer -c 1 sset Master $ADJ%+ && update_bar_MasterVolume
XF86AudioMute
amixer -c 1 sset Master toggle && update_bar_MasterVolume
XF86AudioPlay
mpc toggle
XF86AudioNext
mpc next
XF86AudioPrev
mpc prev
# monitor brightness controls for monitor birghtness keys
{_,shift + }XF86MonBrightnessUp
add_percent_brightness {0.1,0.01} && update_bar_DisplayBrightness
{_,shift + }XF86MonBrightnessDown
sub_percent_brightness {0.1,0.01} && update_bar_DisplayBrightness

20
fonts/arch_setup.bash Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source $DIR/variables.bash
# sign keys for infinality
sudo pacman-key -r 962DDE58
sudo pacman-key -f 962DDE58
sudo pacman-key --lsign 962DDE58
gpg --recv-keys AE6866C7962DDE58
sudo sh -c 'sed -i -e "/\[infinality-bundle\]/,+6d" /etc/pacman.conf'
sudo sh -c 'echo -e "[infinality-bundle]\nServer = http://bohoomil.com/repo/\$arch\n\n[infinality-bundle-fonts]\nServer = http://bohoomil.com/repo/fonts\n" >> /etc/pacman.conf'
sudo pacman -Syy --noconfirm
sudo pacman -S infinality-bundle
pacaur -S ttf-monaco --noconfirm --noedit
sudo pacman -S ttf-opensans ttf-dejavu --noconfirm

4
git/arch_setup.bash Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo pacman -S git --noconfirm

6
git/gitconfig Normal file
View file

@ -0,0 +1,6 @@
[push]
default = matching
[user]
name = Daniel Flanagan
email = daniel@lytedev.io

8
git/link.bash Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
rm -f "$HOME/.gitconfig"
ln -s "$DOTFILES_PATH/git/gitconfig" "$HOME/.gitconfig"

9
scripts/get_color.sh Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env sh
get_color()
{
XR_COLOR_DEF=$(grep "#define base$1 #" ~/.Xresources.colors)
echo ${XR_COLOR_DEF:16}
}
export -f get_color

8
scripts/set_sh_font.sh Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env sh
set_sh_font()
{
echo "NOT IMPLEMENTED"
}
export -f set_sh_font

0
scripts/sxhkd_helpers.sh Normal file
View file

4
sh/arch_setup.bash Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo pacman -S tmux --noconfirm

6
sh/bash_profile Normal file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

58
sh/bashrc Normal file
View file

@ -0,0 +1,58 @@
export DOTFILES_PATH=$HOME/.dotfiles
BASE16_SHELL="$DOTFILES_PATH/colors/shell"
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
# filesystem aliases
alias l="ls --color=auto"
alias ll="ls -l --color=auto"
alias la="ls -la --color=auto"
# navigation aliases
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
# tmux aliases
alias tmnew="tmux new -s"
alias tmls="tmux list-sessions"
alias tmatt="tmux attach -t"
# git aliases
alias gs="git status"
alias gpl="git pull"
alias gp="git push"
alias gac="git add -A && git commit -m"
# networking aliases
alias p="ping 8.8.8.8"
if command -v nvim >/dev/null 2>&1; then
alias vim="nvim"
alias ovim="\vim"
fi
# prompt
COLOR_RESET='\e[0m'
PROMPT_SUCCESS_COLOR='\e[0;34m'
PROMPT_FAILURE_COLOR='\e[0;31m'
prompt_command_func()
{
RET=$?
if [ $RET -eq 0 ]; then
STATUS_COLOR=$PROMPT_SUCCESS_COLOR
else
STATUS_COLOR=$PROMPT_FAILURE_COLOR
fi;
PS1="$STATUS_COLOR\u@\h$COLOR_RESET \w \n└ "
}
export PROMPT_COMMAND="prompt_command_func"
# allow a per-device script that is pulled in
if [ -a "$HOME/.bashrc_env" ]; then
. "$HOME/.bashrc_env"
fi

16
sh/link.bash Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source $DIR/variables.bash
rm "$HOME/.bashrc"
rm "$HOME/.bash_profile"
rm "$HOME/.tmux.conf"
ln -s "$DOTFILES_PATH/sh/bashrc" "$HOME/.bashrc"
ln -s "$DOTFILES_PATH/sh/bash_profile" "$HOME/.bash_profile"
ln -s "$DOTFILES_PATH/sh/.tmux.conf" "$HOME/.tmux.conf"
sed -i "/export DOTFILES_PATH/c export DOTFILES_PATH=\"$DIR\"" "$HOME/.bashrc"
echo "You should re-source ~/.bashrc ;)"

0
sh/tmux.conf Normal file
View file

4
term/arch_setup.bash Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo pacman -S rxvt-unicode --noconfirm

14
variables.bash Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# This script will seriously nuke your home directory. You should really read each of the scripts that will be executed in those process.
DOTFILES_PATH=$HOME/.dotfiles
REPOSITORY_PATH=$HOME/Documents/Repositories
WINDOW_GAP=20
BORDER_WIDTH=2
# load per-device bashrc_env if it exists
if [ -a "$HOME/.bashrc_env" ]; then
. "$HOME/.bashrc_env"
fi

17
vim/arch_setup.bash Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
sudo pacman -S cmake vim unzip python2 python2-pip python python-pip xsel xclip --noconfirm
sudo pip3 install neovim
sudo pip2 install neovim
git clone https://github.com/neovim/neovim "$REPOSITORY_PATH/neovim"
cd "$REPOSITORY_PATH/neovim"
make
sudo make install
cd -

3
vim/config/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*
!init.vim
!./colors/*.vim

View file

@ -0,0 +1 @@
/home/daniel/.dotfiles/colors/vim

356
vim/config/init.vim Normal file
View file

@ -0,0 +1,356 @@
" Based on dotfiles from @viccuad on GitHub - <3
" Plugins {{{
" Get plugin manager if it doesn't exist
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
endif
" Initialize plugin manager
if has("unix")
call plug#begin('~/.config/nvim/bundle')
endif
" Pretty status line and tabs/buffers
Plug 'bling/vim-airline'
let g:airline_powerline_fonts = 0
let g:airline#extensions#tabline#fnamemod = ':t'
set laststatus=2 " Always show statusline
set noshowmode " Hides default mode
let g:airline#extensions#tabline#enabled = 1 " Automatically displays all buffers when there's only one tab open
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_left_alt_sep= ''
let g:airline_left_sep = ''
" Plugins that make text-wizarding much more fun
Plug 'majutsushi/tagbar' " shows a list of tags (requires ctags)
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
" Plug 'kien/ctrlp.vim'
" " The \| escapes the regex OR operator and is the delimiter
" let g:ctrlp_custom_ignore = 'node_modules\|bower_components'
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'}
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree', {'on': ['NERDTreeToggle', 'NERDTree']}
let g:NERDSpaceDelims = 1
Plug 'nathanaelkane/vim-indent-guides'
Plug 'scrooloose/syntastic'
Plug 'LargeFile'
Plug 'tpope/vim-commentary'
Plug 'junegunn/vim-easy-align'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'tasklist.vim' " <leader>, t will show TODOs and FIXMEs
Plug 'christoomey/vim-tmux-navigator'
Plug 'godlygeek/tabular'
Plug 'jez/vim-superman'
noremap K :SuperMan <cword><CR>
" Plugins for code completion and snippets
Plug 'Shougo/deoplete.nvim'
let g:deoplete#enable_at_startup = 1
" Plug 'Valloric/YouCompleteMe', {'do': './install.sh --clang-completer'} " (NEEDS to be compiled, read the docs!)
" let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
" TODO: Setup snippets? I honestly never use them...
" Plug 'SirVer/ultisnips'
" Plug 'honza/vim-snippets'
" let g:UltiSnipsSnippetDirectories=["snippets_UltiSnips"]
" function! g:UltiSnips_Complete()
" call UltiSnips#ExpandSnippet()
" if g:ulti_expand_res == 0
" if pumvisible()
" return "\<C-n>"
" else
" call UltiSnips#JumpForwards()
" if g:ulti_jump_forwards_res == 0
" return "\<TAB>"
" endif
" endif
" endif
" return ""
" endfunction
" au BufEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
" let g:UltiSnipsJumpForwardTrigger="<tab>"
" let g:UltiSnipsListSnippets="<c-e>"
" " this maps Enter key to <C-y> to chose the current highlight item
" " and close the selection list, same as other IDEs:
" " CONFLICTS with some plugins like tpope/Endwise
" inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Filetype handling
Plug 'kchmck/vim-coffee-script', {'for': ['coffee', 'coffeescript', 'vue']}
Plug 'posva/vim-vue', {'for': ['vue']}
Plug 'elixir-lang/vim-elixir', {'for': ['elixir']}
Plug 'wavded/vim-stylus', {'for': ['styl', 'stylus', 'vue']}
Plug 'rust-lang/rust.vim', {'for': ['rs', 'rust']}
Plug 'plasticboy/vim-markdown', {'for': ['md', 'markdown']}
Plug 'digitaltoad/vim-jade', {'for': ['jade', 'vue']}
Plug 'freitass/todo.txt-vim', {'for': ['todo']}
Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']}
Plug 'c.vim', {'for': 'c'}
let g:C_LocalTemplateFile = $HOME.'/.vim/snippets_Cvim/c-support/templates/Templates' " this allows for the templates to be versioned on .dotfiles
Plug 'hdima/python-syntax', {'for': 'python'}
let python_highlight_all = 1
" you can change between py v2 and v3 with :Python2Syntax and :Python3Syntax
call plug#end()
" }}}
" Filetype & languages {{{
filetype on
filetype indent on
filetype plugin on
" C language
let c_space_errors = 1
let c_comment_strings = 0 " dont highlight strings inside C comments
" Python language
let python_space_errors = 1
autocmd FileType python setl tabstop=2 expandtab shiftwidth=2 softtabstop=2
" HamlC
autocmd BufRead,BufNewFile *.hamlc set ft=haml
" Markdown instead of modula2
autocmd BufNewFile,BufReadPost *.md setl filetype=markdown spell textwidth=0 wrapmargin=0
" TXT files
autocmd BufNewFile,BufReadPost *.txt setl spell textwidth=0 wrapmargin=0
" }}}
" Spaces and tabs {{{
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set autoindent smartindent
set listchars=tab:\ \ ,trail
set list
" }}}
" Line wrap {{{
" let &colorcolumn=join(range(81,400),",") " colors columns past 80
set wrap
set linebreak
set breakindent
set textwidth=80
set formatoptions=tcrql1j
" t autowrap to textwidth
" c autowrap comments to textwidth
" r autoinsert comment leader with <enter>
" q allow formatting of comments with gq
" l Long lines are not broken in insert mode: When a line was longer than 'textwidth' when the insert command started, Vim does not automatically format it.
" 1 Don't break a line after a one-letter word. It's broken before it instead (if possible).
" j Where it makes sense, remove a comment leader when joining lines
" }}}
" Look and feel {{{
set title
set synmaxcol=2048
set number
"set relativenumber
set cursorline
"set cursorcolumn
set showcmd
set nowildmenu
set wildmode=longest,list,full
set cpoptions-=$
set showmatch
set mouse=a
set mousehide
set backspace=indent,eol,start
set ruler
set lazyredraw
set scrolloff=8
set sidescrolloff=8
set splitright
set splitbelow
set noerrorbells
set visualbell
set vb t_vb=
set nobackup
set nowritebackup
set noswapfile
if has('autocmd')
autocmd GUIEnter * set visualbell t_vb=
endif
set timeout
set ttimeoutlen=200
set t_Co=256
let base16colorspace=256
set background=dark
colorscheme current
highlight ColorColumn ctermbg=235 guibg=#262626
highlight clear SignColumn
if &term == 'xterm-256color' || &term == 'screen-256color'
let &t_SI = "\<Esc>[5 q"
let &t_EI = "\<Esc>[1 q"
endif
if &term == 'rxvt-unicode-256color'
let &t_SI = "\<Esc>[3 q"
let &t_EI = "\<Esc>[1 q"
endif
" }}}
" Persistence {{{
" No empty buffer on startup
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
set hidden
set shortmess=I
set history=1000
set undofile
set undodir=$HOME/.config/nvim/undo
set undolevels=1000
set undoreload=10000
" }}}
" Backup, Swap, Spell files {{{
set backupdir=$HOME/.config/nvim/backup
set directory=$HOME/.config/nvim/backup
set spellfile=$HOME/.config/nvim/spell/en.utf-8.add
" }}}
" Searching {{{
set ignorecase
set smartcase
set incsearch
set hlsearch
set wrapscan
" }}}
" Mappings {{{
" make these commonly mistyped commands still work:
command! WQ wq
command! Wq wq
command! Wqa wqa
command! W w
command! Q q
let mapleader = "\<Space>"
" use tab key to cycle through the buffers:
nnoremap <leader><Tab> :bnext<CR>
nnoremap <leader><S-Tab> :bprevious<CR>
" don't kill vim
nnoremap <leader>K <Nop>
" quick paragraph formatting
vmap Q gq
nmap Q gqap
" launch fzf for the current git repo
nnoremap <C-P> :GitFiles<CR>
" use ctrl j and k to switch buffers as well
nnoremap <leader>k :bnext<CR>
nnoremap <leader>j :bprevious<CR>
" fast word change
nnoremap <leader>c ciw
nnoremap <leader>C ciW
" bash-like deletion
inoremap <C-BS> <C-w>
inoremap <A-BS> <C-w>
" clear search higlight
nnoremap <leader>/ :let @/ = ""<CR>
" remap jk to escape in insert mode
inoremap jk <Esc>
inoremap jj <Esc>
" use hjkl-movement between rows when soft wrapping:
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
" workaround for an issue where nvim reads C-H as <BS> in normal mode
if has('nvim')
nmap <bs> :<c-u>TmuxNavigateLeft<cr>
endif
" move between tabs:
nmap <leader>1 <Plug>AirlineSelectTab1
nmap <leader>2 <Plug>AirlineSelectTab2
nmap <leader>3 <Plug>AirlineSelectTab3
nmap <leader>4 <Plug>AirlineSelectTab4
nmap <leader>5 <Plug>AirlineSelectTab5
nmap <leader>6 <Plug>AirlineSelectTab6
nmap <leader>7 <Plug>AirlineSelectTab7
nmap <leader>8 <Plug>AirlineSelectTab8
nmap <leader>9 <Plug>AirlineSelectTab9
" remove trailing whitespace:
map <F3> :%s/\s\+$//<CR>:let @/ = ""<CR>
nnoremap <S-K> <NOP>
" close buffer:
nnoremap <silent> <leader>w <Esc>:bd<CR>
map <silent> <F4> <Esc>:bd<CR>
" toggle spell checking:
map <F5> :setlocal spell!<CR>
" open urls, files, etc. example: http://google.com:
noremap <leader>o :!xdg-open <cfile><CR><CR>
set isfname+=32
" previous c error (c.vim plugin):
map <silent> <F7> <Esc>:cprevious<CR>
" next c error (c.vim plugin)
map <silent> <F8> <Esc>:cnext<CR>
" keep that dumb window from popping up
map q: :q
command! UseFoldMarkers set foldmethod=marker
" compile & link c code (alt+<F9> write + compile, ctrl+<F9> compile + run) (c.vim plugin)
"<F9>
" }}}
" Folding {{{
set foldmethod=syntax
set foldlevel=99
set foldnestmax=10
set nofoldenable
set foldlevelstart=1
" }}}
" Launch {{{
set encoding=utf8
set autowrite
set autochdir
"autocmd BufEnter * silent! lcd %:p:h " automatically cd into the dir of the file. this breaks less
set autoread
set nomodeline
" jump to the last position when reopening a file:
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" }}}

10
vim/link.bash Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
rm -rf "$HOME/.config/nvim"
ln -s "$DOTFILES_PATH/vim/config" "$HOME/.config/nvim"
nvim +PlugInstal +qall

52
x/.xinitrc Normal file
View file

@ -0,0 +1,52 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
sxhkd &
exec bspwm

4
x/arch_setup.bash Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo pacman -S xorg-xinit xorg-server xorg-xrdb --noconfirm

10
x/link.bash Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
rm "$HOME/.xinitrc"
rm "$HOME/.Xresources"
ln -s "$HOME/.dotfiles/x/xinitrc" "$HOME/.xinitrc"
ln -s "$HOME/.dotfiles/x/xresources" "$HOME/.Xresources"

42
x/xinitrc Normal file
View file

@ -0,0 +1,42 @@
#!/bin/sh
userresources=$HOME/.Xresources
usercolors=$HOME/.Xresources.colors
userenv=$HOME/.Xresources.env
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usercolors" ]; then
xrdb -merge "$usercolors"
fi
if [ -f "$userenv" ]; then
xrdb -merge "$userenv"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec bspwm

20
x/xresources Executable file
View file

@ -0,0 +1,20 @@
#define primaryfont xft:Monaco-9
#define secondaryfont xft:Open Sans-9
#define iconfont xft:stlarch-9
#define primaryletterspace -2
*font: primaryfont
*faceName: primaryfont
*boldFont: primaryfont
*letterSpace: primaryletterspace
*scrollBar: false
*cursorUnderline: true
*cursorBlink: true
*termName: rxvt-unicode
*intensityStyles: true
*utf8: 2
*depth: 32
URxvt.internalBorder: 10