summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/.config/X/resources2
-rw-r--r--home/.config/git/config10
-rwxr-xr-xhome/.local/bin/mins4
-rwxr-xr-xhome/.local/bin/nasd15
-rwxr-xr-xhome/.local/bin/whinclude11
-rw-r--r--home/.profile4
-rw-r--r--home/.shrc19
-rw-r--r--home/.ssh/config9
-rw-r--r--home/.xsession7
9 files changed, 53 insertions, 28 deletions
diff --git a/home/.config/X/resources b/home/.config/X/resources
index cfedf60b..f4603cd9 100644
--- a/home/.config/X/resources
+++ b/home/.config/X/resources
@@ -26,7 +26,7 @@ XTerm*VT100*translations: #override \n\
 	<Btn4Down>: scroll-back(1,line,m) \n\
 	<Btn5Down>: scroll-forw(1,line,m)
 
-XTerm*faceName: Go Mono:size=11
+XTerm*faceName: Go Mono:size=12
 XTerm*internalBorder: 6
 XTerm*colorBDMode: true
 XTerm*scrollBar: false
diff --git a/home/.config/git/config b/home/.config/git/config
index 119180ab..c990de2c 100644
--- a/home/.config/git/config
+++ b/home/.config/git/config
@@ -2,15 +2,22 @@
 	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
 
@@ -20,5 +27,8 @@
 [pretty]
 	log = %Cred%h %Creset%s%C(yellow)%d %Cgreen(%ar) %Cblue<%aN>
 
+[alias]
+	forgive = blame
+
 [include]
 	path = ./private
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/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 bb578d21..7d4ba822 100644
--- a/home/.profile
+++ b/home/.profile
@@ -17,8 +17,12 @@ export LESS=FRXix4
 export CLICOLOR=1
 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
 
+test -f ~/.profile.local && . ~/.profile.local
+
 export ENV=~/.shrc
diff --git a/home/.shrc b/home/.shrc
index 10f87d34..afa87fe5 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -13,7 +13,8 @@ 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' 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' gr='git rebase'
+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)"'
 command -v doas >/dev/null || alias doas=sudo
@@ -24,7 +25,7 @@ man() {
 	for sect in $MANSECT; do
 		command man -w $sect "$1" >/dev/null 2>&1 && exec man $sect "$1"
 	done
-	exec man "$1")
+	exec command man "$1")
 }
 
 cd() {
@@ -49,15 +50,5 @@ fi
 export LESS_TERMCAP_us=$(tput sitm)
 export LESS_TERMCAP_ue=$(tput ritm)
 
-hostname=$(hostname -s)
-rprompt() {
-	local pwd
-	pwd=${PWD#${HOME}}
-	[ "${pwd}" != "${PWD}" ] && pwd="~${pwd}"
-	[ "${TERM%-*}" = 'xterm' ] \
-		&& printf '\33]0;%s\a' "${SSH_CLIENT:+${hostname}:}${pwd##*/}" >&2
-	printf '%s' "${SSH_CLIENT:+${hostname}:}${pwd}"
-}
-PS1='
-$ '
-RPS1='${?#0} $(rprompt)'
+PS1='\[\033]0;${SSH_CLIENT:+\\h:}\W\a\]
+${?#0}$ '
diff --git a/home/.ssh/config b/home/.ssh/config
index d354a6ea..f579ae9f 100644
--- a/home/.ssh/config
+++ b/home/.ssh/config
@@ -1,20 +1,17 @@
 IgnoreUnknown Include
 Include config_private
 
+AddKeysToAgent yes
 SendEnv LANG LC_*
 
-Host monday beastie puffy toaster tux progynova
+Host tuesday beastie puffy toaster tux progynova
 	HostName %h.local
 	ForwardAgent yes
 	RemoteForward 7062 127.0.0.1:7062
 
-Host scout pyro
+Host scout soldier pyro demo heavy engi medic sniper spy
 	HostName %h.causal.agency
 	Port 2222
 
-Host june july
-	HostName %h.nyc3.do.causal.agency
-	Port 2222
-
 Host git.causal.agency temp.causal.agency
 	Port 2222
diff --git a/home/.xsession b/home/.xsession
index a51d52f2..1e05126c 100644
--- a/home/.xsession
+++ b/home/.xsession
@@ -4,8 +4,11 @@ export LC_CTYPE=en_US.UTF-8
 xset r rate 175 m 5/4 0
 xmodmap ~/.config/X/modmap
 xrdb -load ~/.config/X/resources
-xsetroot -bitmap /usr/X11R6/include/X11/bitmaps/xsnow \
-	-bg rgb:14/13/0E -fg rgb:7A/49/55 
+
+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