summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/.bash_profile2
-rw-r--r--home/.bashrc13
-rw-r--r--home/.config/X/modmap16
-rw-r--r--home/.config/X/resources52
-rw-r--r--home/.config/cwm/cwmrc87
-rw-r--r--home/.config/git/config18
-rw-r--r--home/.config/htop/htoprc26
-rw-r--r--home/.config/nvim/colors/trivial.vim65
-rw-r--r--home/.config/nvim/ftdetect/mdoc.vim1
-rw-r--r--home/.config/nvim/init.vim37
-rw-r--r--home/.config/nvim/syntax/mdoc.vim12
-rwxr-xr-xhome/.local/bin/clock17
-rwxr-xr-xhome/.local/bin/deg6
-rwxr-xr-xhome/.local/bin/mdate2
-rwxr-xr-xhome/.local/bin/mins4
-rwxr-xr-xhome/.local/bin/nasd15
-rwxr-xr-xhome/.local/bin/np2
-rwxr-xr-xhome/.local/bin/open19
-rwxr-xr-xhome/.local/bin/pbcopy11
-rwxr-xr-xhome/.local/bin/pbpaste11
-rwxr-xr-xhome/.local/bin/versions9
-rwxr-xr-xhome/.local/bin/wcfix7
-rwxr-xr-xhome/.local/bin/whinclude11
-rw-r--r--home/.profile26
-rw-r--r--home/.shrc46
-rw-r--r--home/.ssh/config9
-rw-r--r--home/.xsession14
27 files changed, 357 insertions, 181 deletions
diff --git a/home/.bash_profile b/home/.bash_profile
deleted file mode 100644
index 8dd976b3..00000000
--- a/home/.bash_profile
+++ /dev/null
@@ -1,2 +0,0 @@
-. ~/.profile
-. ~/.bashrc
diff --git a/home/.bashrc b/home/.bashrc
deleted file mode 100644
index 61c9d191..00000000
--- a/home/.bashrc
+++ /dev/null
@@ -1,13 +0,0 @@
-. ~/.shrc
-
-alias ls='ls -p --color=auto'
-alias grep='grep --color=auto'
-
-_PS0=${PS0/$'\n'/}
-unset PS0
-RPS1=${RPS1/'\?'/'${?/#0/}'}
-
-rprompt() {
-	printf '%*s\r' $((COLUMNS - 1)) "${RPS1@P}"
-}
-PS1='\n\[${_PS0@P}$(rprompt)\]'"${PS1}"
diff --git a/home/.config/X/modmap b/home/.config/X/modmap
new file mode 100644
index 00000000..b0b1ea79
--- /dev/null
+++ b/home/.config/X/modmap
@@ -0,0 +1,16 @@
+clear Lock
+keysym Caps_Lock = Escape
+keysym 1 = exclam 1
+keysym 2 = at 2
+keysym 3 = numbersign 3
+keysym 4 = dollar 4
+keysym 5 = percent 5
+keysym 6 = asciicircum 6
+keysym 7 = ampersand 7
+keysym 8 = asterisk 8
+keysym 9 = parenleft 9
+keysym 0 = parenright 0
+keysym minus = underscore minus
+keysym bracketleft = braceleft bracketleft
+keysym bracketright = braceright bracketright
+keysym backslash = bar backslash
diff --git a/home/.config/X/resources b/home/.config/X/resources
new file mode 100644
index 00000000..f4603cd9
--- /dev/null
+++ b/home/.config/X/resources
@@ -0,0 +1,52 @@
+Xft.dpi: 144
+Xft.antialias: true
+Xft.hinting: false
+
+Xcursor.size: 64
+Xcursor.theme: dmz-aa
+
+XLock.usefirst: false
+XLock.echokeys: true
+
+*Background: rgb:14/13/0E
+*Foreground: rgb:B7/A9/80
+*BorderColor: rgb:99/8D/6B
+
+XTerm*utf8: true
+XTerm*metaSendsEscape: true
+XTerm*alternateScroll: true
+XTerm*allowMouseOps: false
+XTerm*disallowedMouseOps: X10,Locator,VT200*,Any*,Extended,SGR,URXVT
+XTerm*bellIsUrgent: true
+XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
+
+XTerm*VT100*translations: #override \n\
+	Super <Key>C: copy-selection(CLIPBOARD) \n\
+	Super <Key>V: insert-selection(CLIPBOARD) \n\
+	<Btn4Down>: scroll-back(1,line,m) \n\
+	<Btn5Down>: scroll-forw(1,line,m)
+
+XTerm*faceName: Go Mono:size=12
+XTerm*internalBorder: 6
+XTerm*colorBDMode: true
+XTerm*scrollBar: false
+XTerm*pointerMode: 2
+
+XTerm*color0: rgb:16/15/10
+XTerm*color1: rgb:A3/28/10
+XTerm*color2: rgb:72/7A/18
+XTerm*color3: rgb:A3/77/20
+XTerm*color4: rgb:3D/62/66
+XTerm*color5: rgb:7A/49/55
+XTerm*color6: rgb:55/7A/55
+XTerm*color7: rgb:99/8D/6B
+XTerm*color8: rgb:4C/46/35
+XTerm*color9: rgb:CC/32/14
+XTerm*color10: rgb:8E/99/1E
+XTerm*color11: rgb:CC/95/28
+XTerm*color12: rgb:4C/7B/7F
+XTerm*color13: rgb:99/5B/6B
+XTerm*color14: rgb:6B/99/6B
+XTerm*color15: rgb:CC/BC/8E
+XTerm*colorBD: rgb:CC/BC/8E
+XTerm*cursorColor: rgb:7A/71/55
diff --git a/home/.config/cwm/cwmrc b/home/.config/cwm/cwmrc
new file mode 100644
index 00000000..d72ec163
--- /dev/null
+++ b/home/.config/cwm/cwmrc
@@ -0,0 +1,87 @@
+sticky yes
+snapdist 10
+moveamount 10
+
+ignore clock
+autogroup 0 clock,XTerm
+gap 38 0 0 0
+
+unbind-key all
+bind-key 4-n terminal
+bind-key 4-t "firefox -new-tab about:blank"
+bind-key 4-Delete lock
+bind-key 4-Down window-lower
+bind-key 4-Up window-raise
+bind-key 4-slash menu-window
+bind-key 4-Tab group-cycle
+bind-key 4S-Tab group-rcycle
+bind-key 4-grave window-cycle
+bind-key 4S-grave window-rcycle
+bind-key 4-w window-close
+bind-key 4-exclam group-only-1
+bind-key 4-at group-only-2
+bind-key 4-numbersign group-only-3
+bind-key 4-dollar group-only-4
+bind-key 4-percent group-only-5
+bind-key 4-asciicircum group-only-6
+bind-key 4-ampersand group-only-7
+bind-key 4-asterisk group-only-8
+bind-key 4-parenleft group-only-9
+bind-key 4S-exclam window-movetogroup-1
+bind-key 4S-at window-movetogroup-2
+bind-key 4S-numbersign window-movetogroup-3
+bind-key 4S-dollar window-movetogroup-4
+bind-key 4S-percent window-movetogroup-5
+bind-key 4S-asciicircum window-movetogroup-6
+bind-key 4S-ampersand window-movetogroup-7
+bind-key 4S-asterisk window-movetogroup-8
+bind-key 4S-parenleft window-movetogroup-9
+bind-key 4-f window-fullscreen
+bind-key 4-m window-maximize
+bind-key 4-equal window-vmaximize
+bind-key 4S-equal window-hmaximize
+bind-key 4-underscore window-vtile
+bind-key 4S-underscore window-htile
+bind-key 4-h window-move-left-big
+bind-key 4-j window-move-down-big
+bind-key 4-k window-move-up-big
+bind-key 4-l window-move-right-big
+bind-key 4S-h window-move-left
+bind-key 4S-j window-move-down
+bind-key 4S-k window-move-up
+bind-key 4S-l window-move-right
+bind-key 4S-y window-snap-up-left
+bind-key 4S-u window-snap-up-right
+bind-key 4S-b window-snap-down-left
+bind-key 4S-n window-snap-down-right
+bind-key 4M-h window-resize-left
+bind-key 4M-j window-resize-down
+bind-key 4M-k window-resize-up
+bind-key 4M-l window-resize-right
+bind-key 4MS-h window-resize-left-big
+bind-key 4MS-j window-resize-down-big
+bind-key 4MS-k window-resize-up-big
+bind-key 4MS-l window-resize-right-big
+bind-key 4-space menu-exec
+bind-key 4S-r restart
+bind-key 4S-q quit
+
+bind-key F1 "xbacklight -steps 1 -5"
+bind-key F2 "xbacklight -steps 1 +5"
+bind-key F10 "sndioctl output.mute=!"
+bind-key F11 "sndioctl output.level=-0.05"
+bind-key F12 "sndioctl output.level=+0.05"
+
+unbind-mouse all
+bind-mouse 4-1 window-move
+bind-mouse 4S-1 window-resize
+
+fontname "Go Mono:size=11"
+borderwidth 2
+color inactiveborder rgb:4C/46/35
+color activeborder rgb:99/8D/6B
+color urgencyborder rgb:A3/77/20
+color menubg rgb:14/13/0E
+color menufg rgb:B7/A9/80
+color font rgb:B7/A9/80
+color selfont rgb:14/13/0E
diff --git a/home/.config/git/config b/home/.config/git/config
index 5c12c079..c990de2c 100644
--- a/home/.config/git/config
+++ b/home/.config/git/config
@@ -1,18 +1,34 @@
 [user]
-	name = C. McEnroe
+	name = June McEnroe
 	email = june@causal.agency
 
+[branch]
+	sort = committerdate
+
 [commit]
 	verbose = true
 
+[diff]
+	colorMoved = default
+	colorMovedWS = allow-indentation-change
+
 [merge]
 	conflictStyle = diff3
 
+[push]
+	autoSetupRemote = true
+
+[pull]
+	rebase = true
+
 [rebase]
 	autosquash = true
 
 [pretty]
 	log = %Cred%h %Creset%s%C(yellow)%d %Cgreen(%ar) %Cblue<%aN>
 
+[alias]
+	forgive = blame
+
 [include]
 	path = ./private
diff --git a/home/.config/htop/htoprc b/home/.config/htop/htoprc
index beb3031e..705323ef 100644
--- a/home/.config/htop/htoprc
+++ b/home/.config/htop/htoprc
@@ -1,9 +1,10 @@
 # Beware! This file is rewritten by htop when settings are changed in the interface.
 # The parser is also very primitive, and not human-friendly.
-fields=0 48 39 2 46 49 1 
+fields=0 48 39 2 46 49 1
 sort_key=47
 sort_direction=1
-hide_threads=0
+tree_sort_key=0
+tree_sort_direction=1
 hide_kernel_threads=1
 hide_userland_threads=1
 shadow_other_users=0
@@ -12,15 +13,26 @@ show_program_path=1
 highlight_base_name=1
 highlight_megabytes=1
 highlight_threads=1
+highlight_changes=0
+highlight_changes_delay_secs=5
+find_comm_in_cmdline=1
+strip_exe_from_cmdline=1
+show_merged_command=0
 tree_view=1
+tree_view_always_by_pid=0
+all_branches_collapsed=0
 header_margin=0
 detailed_cpu_time=0
-cpu_count_from_zero=0
+cpu_count_from_one=1
+show_cpu_usage=1
+show_cpu_frequency=0
 update_process_names=0
 account_guest_in_cpu_meter=0
 color_scheme=0
+enable_mouse=0
 delay=15
-left_meters=AllCPUs2 
-left_meter_modes=1 
-right_meters=Memory Swap 
-right_meter_modes=1 1 
+left_meters=AllCPUs2
+left_meter_modes=1
+right_meters=Memory Swap
+right_meter_modes=1 1
+hide_function_bar=2
diff --git a/home/.config/nvim/colors/trivial.vim b/home/.config/nvim/colors/trivial.vim
deleted file mode 100644
index 3ebe8d97..00000000
--- a/home/.config/nvim/colors/trivial.vim
+++ /dev/null
@@ -1,65 +0,0 @@
-hi clear
-syntax reset
-let colors_name = 'trivial'
-
-hi Normal ctermbg=NONE ctermfg=NONE
-
-hi ColorColumn ctermbg=0
-hi EndOfBuffer ctermfg=8
-hi VertSplit cterm=NONE ctermbg=NONE ctermfg=8
-hi LineNr ctermfg=8
-hi MatchParen ctermbg=NONE ctermfg=3
-hi ModeMsg ctermfg=8
-hi MoreMsg ctermfg=2
-hi! link Question MoreMsg
-hi WarningMsg ctermfg=1
-hi NonText ctermfg=8
-hi Search ctermbg=NONE ctermfg=11
-hi StatusLine cterm=NONE ctermbg=0 ctermfg=7
-hi StatusLineNC cterm=NONE ctermbg=0 ctermfg=8
-hi Folded ctermbg=0 ctermfg=8
-hi Visual cterm=inverse ctermbg=NONE
-hi Title ctermfg=5
-hi Directory ctermfg=4
-
-hi Comment ctermfg=4
-
-hi! link Constant Normal
-hi String ctermfg=6
-hi link Character String
-
-hi! link Identifier Normal
-
-hi Statement ctermfg=7
-hi link Operator Normal
-
-hi PreProc ctermfg=2
-
-hi! link Type Normal
-hi link StorageClass Statement
-hi link Structure StorageClass
-hi link Typedef Structure
-
-hi! link Special Normal
-hi SpecialComment ctermfg=12
-hi SpecialKey ctermfg=5
-
-hi Underlined ctermfg=NONE
-hi Error ctermbg=NONE ctermfg=9
-hi SpellBad ctermbg=NONE ctermfg=1
-hi! link Todo SpecialComment
-
-hi cFormat ctermfg=14
-
-hi diffAdded ctermfg=10
-hi diffRemoved ctermfg=9
-
-hi manUnderline cterm=italic
-
-hi link pythonInclude Statement
-
-hi link rubyDefine Structure
-hi link rubyStringDelimiter String
-hi link rubySymbol String
-
-hi link rustModPath Identifier
diff --git a/home/.config/nvim/ftdetect/mdoc.vim b/home/.config/nvim/ftdetect/mdoc.vim
deleted file mode 100644
index b845fee6..00000000
--- a/home/.config/nvim/ftdetect/mdoc.vim
+++ /dev/null
@@ -1 +0,0 @@
-autocmd BufRead,BufNewFile *.[1-9] set filetype=mdoc
diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim
deleted file mode 100644
index 9245ccf4..00000000
--- a/home/.config/nvim/init.vim
+++ /dev/null
@@ -1,37 +0,0 @@
-set hidden
-set undofile
-set shortmess=atI
-set wildmode=list:longest wildignore=*.o
-set splitbelow splitright
-command! W w
-command! Q q
-
-set tabstop=4 shiftwidth=4 shiftround
-set smartindent cinoptions=l1(sU1m1
-set ignorecase smartcase inccommand=nosplit
-nmap <leader><leader> :nohlsearch<CR>
-set foldmethod=syntax foldlevel=99 foldopen-=block
-let asmsyntax = "nasm"
-let c_syntax_for_h = 1
-let is_posix = 1
-let man_hardwrap = 1
-
-set title laststatus=1
-set scrolloff=1
-set noruler colorcolumn=80
-set list listchars=tab:\ \ ,trail:·
-colorscheme trivial
-
-autocmd TermOpen * setlocal statusline=%{b:term_title}
-autocmd BufEnter term://* startinsert
-tmap <C-w> <C-\><C-n><C-w>
-
-let g:clipboard = {'copy':{'+':'pbcopy'},'paste':{'+':'pbpaste'}}
-nmap gp `[v`]
-
-nmap <leader>s vip:sort<CR>
-nmap <leader>S $vi{:sort<CR>
-nmap <leader>a m':0/^#include <<CR>:nohlsearch<CR>O#include <
-nmap <leader>l :0read ~/src/etc/agpl.c<CR>''
-nmap <leader>L :0read ~/src/etc/gpl.c<CR>''
-nmap <leader>d :0delete<CR>:0read !date +'.Dd \%B \%e, \%Y'<CR>
diff --git a/home/.config/nvim/syntax/mdoc.vim b/home/.config/nvim/syntax/mdoc.vim
deleted file mode 100644
index d9d587f5..00000000
--- a/home/.config/nvim/syntax/mdoc.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-if exists("b:current_syntax")
-	finish
-endif
-
-runtime! syntax/nroff.vim
-unlet! b:current_syntax
-
-setlocal sections+=ShSs
-syntax match mdocBlank /^\.$/ conceal
-setlocal conceallevel=2
-
-let b:current_syntax = "mdoc"
diff --git a/home/.local/bin/clock b/home/.local/bin/clock
new file mode 100755
index 00000000..ef8cd6d8
--- /dev/null
+++ b/home/.local/bin/clock
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+tput civis
+sleep=$(( 60 - $(date +'%S' | sed 's/^0//') ))
+while :; do
+	if [ $(apm -a) -eq 1 ]; then
+		printf '%3s%%' "$(apm -l)"
+	else
+		test $(apm -b) -eq 2 && tput setaf 1 bold
+		printf '%3.3sm' "$(apm -m)"
+		tput sgr0
+	fi
+	printf ' %s\r' "$(date +'%a %H:%M')"
+	sleep $sleep
+	sleep=60
+done
diff --git a/home/.local/bin/deg b/home/.local/bin/deg
new file mode 100755
index 00000000..216029ed
--- /dev/null
+++ b/home/.local/bin/deg
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -eu
+cat <<EOF
+${1}°F = $(dc -e "1k $(echo "$1" | sed 's/^-/_/') 32-1.8/p")°C
+${1}°C = $(dc -e "1k $(echo "$1" | sed 's/^-/_/') 1.8*32+p")°F
+EOF
diff --git a/home/.local/bin/mdate b/home/.local/bin/mdate
new file mode 100755
index 00000000..daff50dc
--- /dev/null
+++ b/home/.local/bin/mdate
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec date +'.Dd %B %e, %Y'
diff --git a/home/.local/bin/mins b/home/.local/bin/mins
new file mode 100755
index 00000000..9cbd5fa8
--- /dev/null
+++ b/home/.local/bin/mins
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec dc <<EOF
+$1 60~rn[h]nn[m]p
+EOF
diff --git a/home/.local/bin/nasd b/home/.local/bin/nasd
index d64b2c3a..60241395 100755
--- a/home/.local/bin/nasd
+++ b/home/.local/bin/nasd
@@ -2,8 +2,13 @@
 set -eu
 
 dir=$(mktemp -d)
-echo 'bits 64' > "${dir}/input"
-cat >> "${dir}/input"
-nasm -o "${dir}/output" "${dir}/input" || true
-ndisasm -b 64 "${dir}/output" || true
-rm -r "$dir"
+trap 'rm -r "$dir"' EXIT
+
+echo 'bits 64' >"${dir}/input"
+for ins; do
+	printf '%s\n' "$ins" >>"${dir}/input"
+done
+[ $# -eq 0 ] && cat >>"${dir}/input"
+
+nasm -o "${dir}/output" "${dir}/input"
+ndisasm -b 64 "${dir}/output"
diff --git a/home/.local/bin/np b/home/.local/bin/np
index 7d54574c..b0eb2326 100755
--- a/home/.local/bin/np
+++ b/home/.local/bin/np
@@ -1,6 +1,6 @@
 #!/usr/bin/osascript
 
-tell application "iTunes"
+tell application "Music"
 	tell current track
 		get "/me is listening to " & artist & " — " & name
 	end tell
diff --git a/home/.local/bin/open b/home/.local/bin/open
new file mode 100755
index 00000000..9439f07d
--- /dev/null
+++ b/home/.local/bin/open
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -eu
+
+if [ -n "${SSH_CLIENT:-}" ]; then
+	exec pbd -o "$@"
+fi
+
+case "$1" in
+	(*.gif|*.jpeg|*.jpg|*.png)
+		curl -LSs "$1" | imv -
+		;;
+	(https://youtu.be/*|https://www.youtube.com/watch*|https://twitch.tv/*)
+		ulimit -c 0 # mpv segfaults on exit every time on OpenBSD...
+		exec mpv "$1" >/dev/null 2>&1
+		;;
+	(*)
+		exec firefox -new-tab "$1" >/dev/null 2>&1
+		;;
+esac
diff --git a/home/.local/bin/pbcopy b/home/.local/bin/pbcopy
new file mode 100755
index 00000000..a804f836
--- /dev/null
+++ b/home/.local/bin/pbcopy
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+if [ -n "${SSH_CLIENT:-}" ]; then
+	exec pbd -c
+elif [ -n "${DISPLAY:-}" ]; then
+	exec xsel -bi
+else
+	echo "${0}: don't know what to do" >&2
+	exit 1
+fi
diff --git a/home/.local/bin/pbpaste b/home/.local/bin/pbpaste
new file mode 100755
index 00000000..2924f01e
--- /dev/null
+++ b/home/.local/bin/pbpaste
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+if [ -n "${SSH_CLIENT:-}" ]; then
+	exec pbd -p
+elif [ -n "${DISPLAY:-}" ]; then
+	exec xsel -bo
+else
+	echo "${0}: don't know what to do" >&2
+	exit 1
+fi
diff --git a/home/.local/bin/versions b/home/.local/bin/versions
new file mode 100755
index 00000000..25e5ff72
--- /dev/null
+++ b/home/.local/bin/versions
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -u
+
+for repo in ~/src/git/*; do
+	version=$(git -C "${repo}" describe --dirty 2>/dev/null)
+	if [ $? -eq 0 ]; then
+		echo "${repo##*/}-${version#v}"
+	fi
+done | sort -nr -t '-' -k 3 | column -t -s '-'
diff --git a/home/.local/bin/wcfix b/home/.local/bin/wcfix
deleted file mode 100755
index b31bd19b..00000000
--- a/home/.local/bin/wcfix
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -eu
-
-export DYLD_FORCE_FLAT_NAMESPACE=1
-export DYLD_INSERT_LIBRARIES=~/.local/lib/libwcwidth.dylib
-
-exec "$@"
diff --git a/home/.local/bin/whinclude b/home/.local/bin/whinclude
new file mode 100755
index 00000000..26445cdc
--- /dev/null
+++ b/home/.local/bin/whinclude
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+echo "#include <${1}>" |
+cc ${CFLAGS:-} -E -x c - |
+sed -En '
+	/^# [0-9]+ "[^<]/{
+		s/.*"([^"]+)".*/\1/p
+		q
+	}
+'
diff --git a/home/.profile b/home/.profile
index 031d2e1e..7d4ba822 100644
--- a/home/.profile
+++ b/home/.profile
@@ -1,22 +1,28 @@
 _PATH=$PATH PATH=
-path() { [ -d "$1" ] && PATH="${PATH}${PATH:+:}${1}"; }
-for prefix in '' /usr/local /usr/pkg /usr /opt/pkg ~/.local; do
+path() { test -d "$1" && PATH="${PATH}${PATH:+:}${1}"; }
+for prefix in '' /usr/local /opt/local /usr ~/.local ~/.cargo; do
 	path "${prefix}/sbin"
 	path "${prefix}/bin"
 done
+path /usr/X11R6/bin
 path /usr/games
+export MANPATH=:~/.local/share/man
 
+export EDITOR=vi
+command -v nvi >/dev/null && EDITOR=nvi
+export EXINIT='set ai extended iclower sm sw=4 ts=4 para=BlBdPpIt sect=ShSs
+map gg 1G'
 export PAGER=less
-export LESS=FRX
-export EDITOR=nvim
-export MANPAGER='nvim +Man!'
-export MANSECT=2:3:1:8:6:5:7:4:9
+export LESS=FRXix4
 export CLICOLOR=1
-export GPG_TTY=$(tty)
+export MANSECT=2:3:1:8:6:5:7:4:9
 export NETHACKOPTIONS='pickup_types:$!?+/=, color, DECgraphics'
+command -v diff-highlight >/dev/null &&
+export GIT_PAGER="diff-highlight | $PAGER"
+
+test -e /usr/share/mk/sys.mk || export CFLAGS=-O
+test -d /usr/home && cd
 
-type nvim >/dev/null || EDITOR=vim
-[ -e /usr/share/mk/sys.mk ] || export CFLAGS=-O
-[ -d /usr/home ] && cd
+test -f ~/.profile.local && . ~/.profile.local
 
 export ENV=~/.shrc
diff --git a/home/.shrc b/home/.shrc
index 65dda9da..afa87fe5 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -1,38 +1,54 @@
 set -o noclobber -o nounset -o vi
 
-HISTFILE=~/.history
 CDPATH=:~
 
-alias vim=$EDITOR
+alias vi=$EDITOR
 alias ls='LC_COLLATE=C ls -p'
 alias ll='ls -hl'
+alias ff='find . -type f -name'
 alias bc='bc -l'
+alias ag='ag --pager=$PAGER'
 alias gs='git status --short --branch || ls' gd='git diff'
 alias gsh='git show' gl='git log --graph --pretty=log'
 alias gco='git checkout' gb='git branch' gm='git merge' gst='git stash'
-alias ga='git add' gr='git reset' gmv='git mv' grm='git rm'
+alias ga='git add' gmv='git mv' grm='git rm'
 alias gc='git commit' gca='gc --amend' gt='git tag'
 alias gp='git push' gu='git pull' gf='git fetch'
+alias gr='git rebase' grc='git rebase --continue'
 alias rand='openssl rand -base64 33'
 alias private='eval "$(gpg -d ~/.private)"'
-type doas 2>/dev/null && alias sudo=doas
+command -v doas >/dev/null || alias doas=sudo
+
+man() {
+	test $# -ne 1 && { command man "$@"; return $?; }
+	(IFS=:
+	for sect in $MANSECT; do
+		command man -w $sect "$1" >/dev/null 2>&1 && exec man $sect "$1"
+	done
+	exec command man "$1")
+}
 
 cd() {
+	local path
 	if [ $# -eq 0 ]; then
-		builtin cd
+		command cd
+	elif [ "${1%%:*}" != "$1" ]; then
+		path=${1#*:}
+		[ -n "${path}" ] || path=${PWD#${HOME}/}
+		SSH_CD=$path ssh -o SendEnv=SSH_CD "${1%%:*}"
 	elif [ -e "$1" -a ! -d "$1" ]; then
-		builtin cd "${1%/*}" && $EDITOR "${1##*/}"
+		command cd "${1%/*}" && $EDITOR "${1##*/}"
 	else
-		builtin cd "$@"
+		command cd "$@"
 	fi
 }
+if [ -n "${SSH_CD:-}" ]; then
+	cd "${SSH_CD}"
+	unset SSH_CD
+fi
 
-PS0=$'\n'
-PS1='\$ '
-RPS1="\? ${SSH_CLIENT:+\h:}\w"
+export LESS_TERMCAP_us=$(tput sitm)
+export LESS_TERMCAP_ue=$(tput ritm)
 
-if [ "${TERM%-*}" = 'xterm' ]; then
-	tsl=$'\e]0;'
-	fsl=$'\e\\'
-	PS0="${tsl}${SSH_CLIENT:+\h:}\W${fsl}${PS0}"
-fi
+PS1='\[\033]0;${SSH_CLIENT:+\\h:}\W\a\]
+${?#0}$ '
diff --git a/home/.ssh/config b/home/.ssh/config
index 5dad0aba..f579ae9f 100644
--- a/home/.ssh/config
+++ b/home/.ssh/config
@@ -1,17 +1,16 @@
 IgnoreUnknown Include
 Include config_private
 
-HashKnownHosts yes
-
+AddKeysToAgent yes
 SendEnv LANG LC_*
 
-Host monday beastie puffy toaster tux
+Host tuesday beastie puffy toaster tux progynova
 	HostName %h.local
 	ForwardAgent yes
 	RemoteForward 7062 127.0.0.1:7062
 
-Host june july
-	HostName %h.nyc3.do.causal.agency
+Host scout soldier pyro demo heavy engi medic sniper spy
+	HostName %h.causal.agency
 	Port 2222
 
 Host git.causal.agency temp.causal.agency
diff --git a/home/.xsession b/home/.xsession
new file mode 100644
index 00000000..1e05126c
--- /dev/null
+++ b/home/.xsession
@@ -0,0 +1,14 @@
+. ~/.profile
+export LC_CTYPE=en_US.UTF-8
+
+xset r rate 175 m 5/4 0
+xmodmap ~/.config/X/modmap
+xrdb -load ~/.config/X/resources
+
+fg=998D6B
+command -v scheme && fg=$(scheme -p $(jot -r 1 1 8))
+xsetroot -bitmap /usr/X11R6/include/X11/bitmaps/escherknot \
+	-bg '#14130E' -fg "#${fg}"
+
+xterm -name clock -geometry 14x1-0+0 -sl 0 -e clock &
+exec cwm -c ~/.config/cwm/cwmrc