aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--.gitmodules27
-rw-r--r--Makefile28
-rwxr-xr-xcleanup.sh29
-rwxr-xr-xdeploy.sh117
-rwxr-xr-xstow/console-utils/.local/bin/color_test (renamed from bin/all/color_test)0
-rwxr-xr-xstow/console-utils/.local/bin/utf8_demo (renamed from bin/all/utf8_demo)0
-rw-r--r--stow/dircolors/.config/dircolors.conf (renamed from config/all/dircolors.conf)0
-rwxr-xr-xstow/duplicity/.local/bin/backup (renamed from bin/linux/backup)0
-rw-r--r--stow/duplicity/.local/share/systemd/user/backup.service (renamed from systemd/linux/backup.service)0
-rw-r--r--stow/duplicity/.local/share/systemd/user/backup.timer (renamed from systemd/linux/backup.timer)0
-rw-r--r--stow/git/.config/git/config (renamed from config/all/git/config)0
-rw-r--r--stow/git/.config/git/ignore (renamed from config/all/git/ignore)0
-rw-r--r--stow/vim/.vim/autoload/airline/themes/tempus.vim (renamed from vim/airline/themes/tempus.vim)0
m---------stow/vim/.vim/pack/my-plugins/start/ale0
m---------stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip0
m---------stow/vim/.vim/pack/my-plugins/start/ctrlp.vim0
m---------stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim0
m---------stow/vim/.vim/pack/my-plugins/start/vim-airline0
m---------stow/vim/.vim/pack/my-plugins/start/vim-dirvish0
m---------stow/vim/.vim/pack/my-plugins/start/vim-eunuch0
m---------stow/vim/.vim/pack/my-plugins/start/vim-gitgutter0
m---------stow/vim/.vim/pack/my-plugins/start/vim-sensible0
-rw-r--r--stow/vim/.vimrc (renamed from home/vimrc)21
-rw-r--r--stow/zsh/.config/zsh/.zprofile (renamed from config/all/zsh/.zprofile)0
-rw-r--r--stow/zsh/.config/zsh/.zshrc (renamed from config/all/zsh/.zshrc)0
-rw-r--r--stow/zsh/.config/zsh/20-appearance.zsh (renamed from config/all/zsh/20-appearance.zsh)0
-rw-r--r--stow/zsh/.config/zsh/30-behavior.zsh (renamed from config/all/zsh/30-behavior.zsh)0
-rw-r--r--stow/zsh/.config/zsh/40-key-bindings.zsh (renamed from config/all/zsh/40-key-bindings.zsh)0
-rw-r--r--stow/zsh/.config/zsh/50-completion.zsh (renamed from config/all/zsh/50-completion.zsh)0
-rw-r--r--stow/zsh/.config/zsh/60-graphical-session.zsh (renamed from config/all/zsh/60-graphical-session.zsh)0
-rw-r--r--stow/zsh/.config/zsh/99-function-overrides.zsh (renamed from config/all/zsh/99-function-overrides.zsh)0
-rw-r--r--stow/zsh/.zshenv (renamed from home/zshenv)0
33 files changed, 91 insertions, 140 deletions
diff --git a/.gitignore b/.gitignore
index d9500f4..fd22466 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-config/all/git/config-local
-config/all/zsh/00-local.zsh
-config/all/zsh/99-local.zsh
-config/linux/kitty/local.conf
-dotfiles-backup
+stow/zsh/.config/zsh/00-local.zsh
+stow/git/.config/git/config-local
+stow/duplicity/.config/duplicity/config
+stow/duplicity/.config/duplicity/excludes
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e775b7d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,27 @@
+[submodule "stow/vim/.vim/pack/my-plugins/start/vim-sensible"]
+ path = stow/vim/.vim/pack/my-plugins/start/vim-sensible
+ url = https://github.com/tpope/vim-sensible
+[submodule "stow/vim/.vim/pack/my-plugins/start/vim-dirvish"]
+ path = stow/vim/.vim/pack/my-plugins/start/vim-dirvish
+ url = https://github.com/justinmk/vim-dirvish
+[submodule "stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip"]
+ path = stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip
+ url = https://github.com/vim-scripts/bufexplorer.zip
+[submodule "stow/vim/.vim/pack/my-plugins/start/ctrlp.vim"]
+ path = stow/vim/.vim/pack/my-plugins/start/ctrlp.vim
+ url = https://github.com/ctrlpvim/ctrlp.vim
+[submodule "stow/vim/.vim/pack/my-plugins/start/vim-gitgutter"]
+ path = stow/vim/.vim/pack/my-plugins/start/vim-gitgutter
+ url = https://github.com/airblade/vim-gitgutter
+[submodule "stow/vim/.vim/pack/my-plugins/start/vim-airline"]
+ path = stow/vim/.vim/pack/my-plugins/start/vim-airline
+ url = https://github.com/vim-airline/vim-airline
+[submodule "stow/vim/.vim/pack/my-plugins/start/vim-eunuch"]
+ path = stow/vim/.vim/pack/my-plugins/start/vim-eunuch
+ url = https://github.com/tpope/vim-eunuch
+[submodule "stow/vim/.vim/pack/my-plugins/start/ale"]
+ path = stow/vim/.vim/pack/my-plugins/start/ale
+ url = https://github.com/dense-analysis/ale
+[submodule "stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim"]
+ path = stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim
+ url = https://gitlab.com/protesilaos/tempus-themes-vim.git
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bbdaf73
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+REPO_CHANGES := $(shell git status --porcelain | wc -l)
+
+.PHONY: .initialize
+.initialize:
+ifneq ($(REPO_CHANGES),0)
+ $(error cannot run with a dirty repo. stash or commit changes.)
+endif
+ git submodule update --init --recursive
+
+.PHONY: .local
+.local:
+ mkdir -p stow/duplicity/.config/duplicity
+ cp --update=none local/duplicity-config stow/duplicity/.config/duplicity/config
+ cp --update=none local/duplicity-excludes stow/duplicity/.config/duplicity/excludes
+ cp --update=none local/gitconfig-local stow/git/.config/git/config-local
+ cp --update=none local/local.zsh stow/zsh/.config/zsh/00-local.zsh
+
+.PHONY: console
+console: .initialize .local
+ stow --adopt --dir=stow --target=${HOME} console-utils
+ stow --adopt --dir=stow --target=${HOME} dircolors
+ stow --adopt --dir=stow --target=${HOME} git
+ stow --adopt --dir=stow --target=${HOME} vim
+ stow --adopt --dir=stow --target=${HOME} zsh
+ stow --adopt --dir=stow --target=${HOME} duplicity
+
+restore:
+ git restore .
diff --git a/cleanup.sh b/cleanup.sh
new file mode 100755
index 0000000..a0d6944
--- /dev/null
+++ b/cleanup.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# THIS IS SCARY!
+# This is a transitional script for cleaning out old symlinks since
+# stow doesn't like overwriting existing symlminks. This should only
+# need to run once on a system, and only if dotfiles were managed
+# without stow before. Should probably delete this once stow-based
+# dotfiles are rolled out everywere.
+
+set -euo pipefail
+
+to_delete="
+.local/bin/color_test
+.local/bin/utf8_demo
+.config/dircolors.conf
+.config/git
+.vim/autoload
+.vim/plugged
+.vimrc
+.config/zsh
+.zshenv
+.local/bin/backup
+.local/share/systemd/user/backup.service
+.local/share/systemd/user/backup.timer
+"
+
+for i in $to_delete; do
+ rm -rf "$HOME/${i:?}"
+done
diff --git a/deploy.sh b/deploy.sh
deleted file mode 100755
index f4fe57a..0000000
--- a/deploy.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/bash
-
-set -eo pipefail
-
-if command -v unzip > /dev/null; then
- UNZIPCMD="unzip"
-fi
-if command -v vim > /dev/null; then
- VIMCMD="vim"
-fi
-if command -v git > /dev/null; then
- GITCMD="git"
-fi
-if command -v wget > /dev/null; then
- DLCMD="wget -O"
-elif command -v curl > /dev/null; then
- DLCMD="curl -Lo"
-fi
-if [ -z "$UNZIPCMD" ] || [ -z "$VIMCMD" ] || [ -z "$DLCMD" ] || [ -z "$GITCMD" ]; then
- echo "requires 'unzip', 'vim', 'git', and either 'wget' or 'curl'"
- exit 1
-fi
-
-set -u
-
-if [ ! "$(pwd)" = "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" ]; then
- echo "expects to be run from the root of the dotfiles directory"
- exit 1
-fi
-
-uname=$(uname | tr '[:upper:]' '[:lower:]')
-
-# XDG layout
-xcache="${XDG_CACHE_HOME:-${HOME}/.cache}"
-xdata="${XDG_DATA_HOME:-${HOME}/.local/share}"
-xconfig="${XDG_CONFIG_HOME:-${HOME}/.config}"
-
-userbin="$HOME/.local/bin"
-systemd="$xdata/systemd/user"
-
-mkdir -p "$xcache" "$xdata" "$xconfig" "$userbin"
-mkdir -p "${xcache}/zsh"
-mkdir -p "${xdata}/zsh"
-if [ "linux" = "$uname" ]; then
- mkdir -p "$systemd"
-fi
-
-function link {
- local src="$1"
- local dest="$2"
- if [ -e "$dest" ] && [ ! -L "$dest" ]; then
- mkdir -p dotfiles-backup
- mv "$dest" dotfiles-backup/.
- fi
- ln -snf "$src" "$dest"
-}
-
-function link_contents {
- local src="$1"
- local dest="$2"
- local prefix="${3:-}"
- if [ -e "$src" ]; then
- for f in "$src"/*
- do
- link "$(pwd)/$f" "$dest/$prefix$(basename "$f")"
- done
- fi
-}
-
-function deploy {
- local src="$1"
- local dest="$2"
- link_contents "$src/all" "$dest"
- link_contents "$src/$uname" "$dest"
-}
-
-# deploy to home
-link_contents home "$HOME" '.'
-
-# deploy to XDG dirs
-deploy config "$xconfig"
-
-# deploy user executables
-deploy bin "$userbin"
-
-# deploy systemd user units
-deploy systemd "$systemd"
-
-autoload="$HOME/.vim/autoload"
-mkdir -p "$autoload"
-# install vim-plug
-if [ ! -e "$HOME/.vim/autoload/plug.vim" ]; then
- $DLCMD "$HOME/.vim/autoload/plug.vim" \
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- $VIMCMD +PlugInstall +qall
-fi
-
-# deploy custom scripts to vim autoload
-link_contents vim "$autoload"
-
-# create local files
-if [ ! -e "$HOME/.config/zsh/00-local.zsh" ]; then
- cp local/local.zsh "$HOME/.config/zsh/00-local.zsh"
-fi
-if [ ! -e "$HOME/.config/git/config-local" ]; then
- cp local/gitconfig-local "$HOME/.config/git/config-local"
-fi
-if [ "$uname" = "linux" ]; then
- dconfig="$xconfig/duplicity"
- mkdir -p "$dconfig"
- if [ ! -e "$dconfig/config" ]; then
- cp local/duplicity-config "$dconfig/config"
- fi
- if [ ! -e "$dconfig/excludes" ]; then
- cp local/duplicity-excludes "$dconfig/excludes"
- fi
-fi
diff --git a/bin/all/color_test b/stow/console-utils/.local/bin/color_test
index b764252..b764252 100755
--- a/bin/all/color_test
+++ b/stow/console-utils/.local/bin/color_test
diff --git a/bin/all/utf8_demo b/stow/console-utils/.local/bin/utf8_demo
index 8dce357..8dce357 100755
--- a/bin/all/utf8_demo
+++ b/stow/console-utils/.local/bin/utf8_demo
diff --git a/config/all/dircolors.conf b/stow/dircolors/.config/dircolors.conf
index f6decec..f6decec 100644
--- a/config/all/dircolors.conf
+++ b/stow/dircolors/.config/dircolors.conf
diff --git a/bin/linux/backup b/stow/duplicity/.local/bin/backup
index 6324c05..6324c05 100755
--- a/bin/linux/backup
+++ b/stow/duplicity/.local/bin/backup
diff --git a/systemd/linux/backup.service b/stow/duplicity/.local/share/systemd/user/backup.service
index c1adfde..c1adfde 100644
--- a/systemd/linux/backup.service
+++ b/stow/duplicity/.local/share/systemd/user/backup.service
diff --git a/systemd/linux/backup.timer b/stow/duplicity/.local/share/systemd/user/backup.timer
index b7815d6..b7815d6 100644
--- a/systemd/linux/backup.timer
+++ b/stow/duplicity/.local/share/systemd/user/backup.timer
diff --git a/config/all/git/config b/stow/git/.config/git/config
index 71bf668..71bf668 100644
--- a/config/all/git/config
+++ b/stow/git/.config/git/config
diff --git a/config/all/git/ignore b/stow/git/.config/git/ignore
index 57dd8e6..57dd8e6 100644
--- a/config/all/git/ignore
+++ b/stow/git/.config/git/ignore
diff --git a/vim/airline/themes/tempus.vim b/stow/vim/.vim/autoload/airline/themes/tempus.vim
index e24f167..e24f167 100644
--- a/vim/airline/themes/tempus.vim
+++ b/stow/vim/.vim/autoload/airline/themes/tempus.vim
diff --git a/stow/vim/.vim/pack/my-plugins/start/ale b/stow/vim/.vim/pack/my-plugins/start/ale
new file mode 160000
+Subproject 6db58b33795430a6165f27c7f796c420c0e098e
diff --git a/stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip b/stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip
new file mode 160000
+Subproject 08b0100f5242e1de07bce40dc6376a4996791c3
diff --git a/stow/vim/.vim/pack/my-plugins/start/ctrlp.vim b/stow/vim/.vim/pack/my-plugins/start/ctrlp.vim
new file mode 160000
+Subproject 7c972cb19c8544c681ca345c64ec39e04f4651c
diff --git a/stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim b/stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim
new file mode 160000
+Subproject b720ee2d4c5588b5a27bb3544d3ded5ee1acab4
diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-airline b/stow/vim/.vim/pack/my-plugins/start/vim-airline
new file mode 160000
+Subproject d9f42cb46710e31962a9609939ddfeb0685dd77
diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-dirvish b/stow/vim/.vim/pack/my-plugins/start/vim-dirvish
new file mode 160000
+Subproject 3851bedb7f191b9a4a5531000b6fc0a8795cc9b
diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-eunuch b/stow/vim/.vim/pack/my-plugins/start/vim-eunuch
new file mode 160000
+Subproject 8fb3904be27b6b60d086f87c257008590241406
diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-gitgutter b/stow/vim/.vim/pack/my-plugins/start/vim-gitgutter
new file mode 160000
+Subproject 67ef116100b40f9ca128196504a2e0bc0a2753b
diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-sensible b/stow/vim/.vim/pack/my-plugins/start/vim-sensible
new file mode 160000
+Subproject 3e878abfd6ddc6fb5dba48b41f2b72c3a2f8249
diff --git a/home/vimrc b/stow/vim/.vimrc
index 6ec5b1c..483adc6 100644
--- a/home/vimrc
+++ b/stow/vim/.vimrc
@@ -1,22 +1,4 @@
"
-" vim-plug
-"
-
-call plug#begin('~/.vim/plugged')
-
-Plug 'tpope/vim-sensible'
-Plug 'justinmk/vim-dirvish'
-Plug 'vim-scripts/bufexplorer.zip'
-Plug 'ctrlpvim/ctrlp.vim'
-Plug 'airblade/vim-gitgutter'
-Plug 'vim-airline/vim-airline'
-Plug 'tpope/vim-eunuch'
-Plug 'dense-analysis/ale'
-Plug 'https://gitlab.com/protesilaos/tempus-themes-vim.git'
-
-call plug#end()
-
-"
" behavior
"
@@ -54,6 +36,9 @@ if has("autocmd")
" python
au FileType python setlocal ts=4 sw=4 sts=4
+ " makefiles
+ au FileType make setlocal nolist
+
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
au BufReadPost *
diff --git a/config/all/zsh/.zprofile b/stow/zsh/.config/zsh/.zprofile
index 68b0ec4..68b0ec4 100644
--- a/config/all/zsh/.zprofile
+++ b/stow/zsh/.config/zsh/.zprofile
diff --git a/config/all/zsh/.zshrc b/stow/zsh/.config/zsh/.zshrc
index f33ca44..f33ca44 100644
--- a/config/all/zsh/.zshrc
+++ b/stow/zsh/.config/zsh/.zshrc
diff --git a/config/all/zsh/20-appearance.zsh b/stow/zsh/.config/zsh/20-appearance.zsh
index fa3c3cc..fa3c3cc 100644
--- a/config/all/zsh/20-appearance.zsh
+++ b/stow/zsh/.config/zsh/20-appearance.zsh
diff --git a/config/all/zsh/30-behavior.zsh b/stow/zsh/.config/zsh/30-behavior.zsh
index 6b2b2c2..6b2b2c2 100644
--- a/config/all/zsh/30-behavior.zsh
+++ b/stow/zsh/.config/zsh/30-behavior.zsh
diff --git a/config/all/zsh/40-key-bindings.zsh b/stow/zsh/.config/zsh/40-key-bindings.zsh
index 4deac62..4deac62 100644
--- a/config/all/zsh/40-key-bindings.zsh
+++ b/stow/zsh/.config/zsh/40-key-bindings.zsh
diff --git a/config/all/zsh/50-completion.zsh b/stow/zsh/.config/zsh/50-completion.zsh
index 23cb052..23cb052 100644
--- a/config/all/zsh/50-completion.zsh
+++ b/stow/zsh/.config/zsh/50-completion.zsh
diff --git a/config/all/zsh/60-graphical-session.zsh b/stow/zsh/.config/zsh/60-graphical-session.zsh
index 3d4b53a..3d4b53a 100644
--- a/config/all/zsh/60-graphical-session.zsh
+++ b/stow/zsh/.config/zsh/60-graphical-session.zsh
diff --git a/config/all/zsh/99-function-overrides.zsh b/stow/zsh/.config/zsh/99-function-overrides.zsh
index 8b233e5..8b233e5 100644
--- a/config/all/zsh/99-function-overrides.zsh
+++ b/stow/zsh/.config/zsh/99-function-overrides.zsh
diff --git a/home/zshenv b/stow/zsh/.zshenv
index a573065..a573065 100644
--- a/home/zshenv
+++ b/stow/zsh/.zshenv