From 3db07428897ff05f8a262af5a0f0e04c00de107e Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 27 Apr 2019 20:17:04 -0700 Subject: [PATCH 01/10] Add sqliterc. --- dotfiles/sqliterc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dotfiles/sqliterc diff --git a/dotfiles/sqliterc b/dotfiles/sqliterc new file mode 100644 index 0000000..051f3e0 --- /dev/null +++ b/dotfiles/sqliterc @@ -0,0 +1,2 @@ +.header on +.mode column From 322358b0f01808a253558269c2548605cf7d76d7 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 27 Apr 2019 20:28:28 -0700 Subject: [PATCH 02/10] Add env var to disable zprezto. --- dotfiles/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 6a90144..320013c 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -27,7 +27,7 @@ PS1="%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])% zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # Load prezto -if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then +if [[ -z "${NO_ZPREZTO}" && -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi From 006188e07d59de06ae8e03e53f671fcaed02a995 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sun, 28 Apr 2019 18:54:07 -0700 Subject: [PATCH 03/10] Add xiwibg function. --- dotfiles/zshrc.d/crouton.zsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 dotfiles/zshrc.d/crouton.zsh diff --git a/dotfiles/zshrc.d/crouton.zsh b/dotfiles/zshrc.d/crouton.zsh new file mode 100644 index 0000000..ff38ce4 --- /dev/null +++ b/dotfiles/zshrc.d/crouton.zsh @@ -0,0 +1,7 @@ +if command -v xiwi >/dev/null 2>&1; then + function xiwibg { + local tmpf=$(mktemp) + echo Logging to ${tmpf} + nohup xiwi "$@" >${tmpf} 2>&1 & + } +fi From 17c2767de5d4ee154034b98482c022f1d7838283 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 12:58:44 -0700 Subject: [PATCH 04/10] Add syntastic for vim. --- .gitmodules | 3 +++ dotfiles/vim/pack/matir/start/syntastic | 1 + 2 files changed, 4 insertions(+) create mode 160000 dotfiles/vim/pack/matir/start/syntastic diff --git a/.gitmodules b/.gitmodules index 0a479c5..a58d471 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,3 +30,6 @@ path = dotfiles/tmux/tmux-logging url = https://github.com/tmux-plugins/tmux-logging.git fetchRecurseSubmodules = true +[submodule "dotfiles/vim/pack/matir/start/syntastic"] + path = dotfiles/vim/pack/matir/start/syntastic + url = https://github.com/vim-syntastic/syntastic.git diff --git a/dotfiles/vim/pack/matir/start/syntastic b/dotfiles/vim/pack/matir/start/syntastic new file mode 160000 index 0000000..9f43dcb --- /dev/null +++ b/dotfiles/vim/pack/matir/start/syntastic @@ -0,0 +1 @@ +Subproject commit 9f43dcb5a244faba6aedb6879b75a56c7de4b8ff From 05c2ef7848e26520cac3f0792820ff68e7e1ed99 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 13:09:39 -0700 Subject: [PATCH 05/10] Fix double equals in posix shell comparison. --- dotfiles/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/profile b/dotfiles/profile index 3e5fa5b..522556b 100755 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -19,7 +19,7 @@ else LS_COLORS='no=00:fi=00:di=34:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.hpp=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.cl=32:*.sh=32:*.bash=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.go=32:*.sql=32:*.csv=32:*.sv=32:*.svh=32:*.v=32:*.vh=32:*.vhd=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.PNG=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.m4a=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.opus=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.MOV=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.webm=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.odt=31:*.dot=31:*.dotx=31:*.ott=31:*.xls=31:*.xlsx=31:*.ods=31:*.ots=31:*.ppt=31:*.pptx=31:*.odp=31:*.otp=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*,v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:*.sqlite=34:'; export LS_COLORS fi -if [ "$(uname)" == "Darwin" ] ; then +if [ "$(uname)" = "Darwin" ] ; then LSCOLORS="gxfxbEaEBxxEhEhBaDaCaD" export LSCOLORS CLICOLOR=1 From 19d78117cbfddec4cb1cc38783368f890b68816b Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 15:59:58 -0700 Subject: [PATCH 06/10] Symlink submodules as a whole instead of each file. Fixes #6. --- install.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 461cf12..726eb3e 100755 --- a/install.sh +++ b/install.sh @@ -48,17 +48,39 @@ prerequisites() { install_dotfile_dir() { local SRCDIR="${1}" local dotfile + local submodule_prune="$(git submodule status -- "${SRCDIR}" 2>/dev/null | \ + awk '{print $2}' | \ + while read submod ; do + echo -n " -o -path ${BASEDIR}/${submod}" + done)" find "${SRCDIR}" \( -name .git -o \ -path "${SRCDIR}/private_dotfiles" -o \ -name install.sh -o \ -name README.md -o \ - -name .gitignore \) \ + -name .gitignore \ + ${submodule_prune} \) \ -prune -o ${FINDTYPE} f -print | \ while read dotfile ; do local TARGET="${HOME}/.${dotfile#${SRCDIR}/}" - mkdir -p `dirname "${TARGET}"` + mkdir -p $(dirname "${TARGET}") ln -s -f "${dotfile}" "${TARGET}" done + git submodule status -- "${SRCDIR}" 2>/dev/null | \ + awk '{print $2}' | \ + while read submodule ; do + local FULLNAME="${BASEDIR}/${submodule}" + local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}" + mkdir -p $(dirname "${TARGET}") + if test -L "${TARGET}" ; then + if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then + echo "${TARGET} points to $(readlink "${TARGET}") not ${FULLNAME}!" >/dev/stderr + fi + elif test -d "${TARGET}" ; then + echo "rm -rf ${TARGET}" >/dev/stderr + else + ln -s -f "${FULLNAME}" "${TARGET}" + fi + done } install_basic_dir() { From 03a12e509ece47d2fbfb1a68f9d4c9df1ca92861 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 16:33:17 -0700 Subject: [PATCH 07/10] Add a bash/zsh compatibility option. --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 726eb3e..f8dd337 100755 --- a/install.sh +++ b/install.sh @@ -2,6 +2,7 @@ set -o nounset set -o errexit +set -o shwordsplit 2>/dev/null # Make zsh behave like bash case $(uname) in Linux) From f96ad7773fb4fb89175555812f529d06a78a7bce Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 18:06:14 -0700 Subject: [PATCH 08/10] Fix xiwibg. --- dotfiles/zshrc.d/crouton.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/zshrc.d/crouton.zsh b/dotfiles/zshrc.d/crouton.zsh index ff38ce4..243dbab 100644 --- a/dotfiles/zshrc.d/crouton.zsh +++ b/dotfiles/zshrc.d/crouton.zsh @@ -2,6 +2,6 @@ if command -v xiwi >/dev/null 2>&1; then function xiwibg { local tmpf=$(mktemp) echo Logging to ${tmpf} - nohup xiwi "$@" >${tmpf} 2>&1 & + nohup xiwi "$@" >!${tmpf} 2>&1 & } fi From 379ab1c375d83db473449e3de89d18175349a397 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 29 Apr 2019 18:27:19 -0700 Subject: [PATCH 09/10] Fix install on bash. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f8dd337..72415d0 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ set -o nounset set -o errexit -set -o shwordsplit 2>/dev/null # Make zsh behave like bash +set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash case $(uname) in Linux) From 24c7171a73d34420fc69fba4cf19fbed0a8ed06c Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Tue, 30 Apr 2019 16:36:08 -0700 Subject: [PATCH 10/10] Rearrange vimrc. --- dotfiles/vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 25b2178..69fac7b 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -45,8 +45,6 @@ if $TERM ==? 'rxvt-unicode-256color' let g:solarized_use16=1 endif silent! colorscheme solarized8 -" Enable filetype support -filetype plugin indent on " Default ASM syntax for ft support let asmsyntax="nasm" " Allow file modelines @@ -142,3 +140,7 @@ command Unsmartquote %s/“\|”/"/g " Markdown options autocmd Filetype markdown set expandtab shiftwidth=4 + +" Enable filetype support +" Needs to be at end of vimrc +filetype plugin indent on