summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/.config/X/resources10
-rw-r--r--home/.config/cwm/cwmrc10
-rw-r--r--home/.config/git/config12
-rw-r--r--home/.config/htop/htoprc13
-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/mins4
-rwxr-xr-xhome/.local/bin/nasd15
-rwxr-xr-xhome/.local/bin/open5
-rwxr-xr-xhome/.local/bin/whinclude11
-rw-r--r--home/.profile17
-rw-r--r--home/.shrc32
-rw-r--r--home/.ssh/config9
-rw-r--r--home/.xsession8
16 files changed, 104 insertions, 157 deletions
diff --git a/home/.config/X/resources b/home/.config/X/resources
index 7507958a..f4603cd9 100644
--- a/home/.config/X/resources
+++ b/home/.config/X/resources
@@ -5,6 +5,9 @@ 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
@@ -13,14 +16,17 @@ 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)
+	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=11
+XTerm*faceName: Go Mono:size=12
 XTerm*internalBorder: 6
 XTerm*colorBDMode: true
 XTerm*scrollBar: false
diff --git a/home/.config/cwm/cwmrc b/home/.config/cwm/cwmrc
index 8a0787f9..d72ec163 100644
--- a/home/.config/cwm/cwmrc
+++ b/home/.config/cwm/cwmrc
@@ -4,9 +4,11 @@ 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
@@ -38,7 +40,8 @@ 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 4S-l window-move-right
+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
@@ -46,6 +49,11 @@ 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
diff --git a/home/.config/git/config b/home/.config/git/config
index ada63e41..c990de2c 100644
--- a/home/.config/git/config
+++ b/home/.config/git/config
@@ -1,16 +1,23 @@
 [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
 
@@ -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/.config/htop/htoprc b/home/.config/htop/htoprc
index cdda268d..705323ef 100644
--- a/home/.config/htop/htoprc
+++ b/home/.config/htop/htoprc
@@ -3,7 +3,8 @@
 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,10 +13,17 @@ 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
@@ -27,3 +35,4 @@ 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 bddb1df5..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/agpl.c<CR>''
-nmap <leader>L :0read ~/src/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/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/open b/home/.local/bin/open
index 17cfb523..9439f07d 100755
--- a/home/.local/bin/open
+++ b/home/.local/bin/open
@@ -10,9 +10,10 @@ case "$1" in
 		curl -LSs "$1" | imv -
 		;;
 	(https://youtu.be/*|https://www.youtube.com/watch*|https://twitch.tv/*)
-		exec mpv "$1" >/dev/null 2>/dev/null
+		ulimit -c 0 # mpv segfaults on exit every time on OpenBSD...
+		exec mpv "$1" >/dev/null 2>&1
 		;;
 	(*)
-		exec xterm -e w3m "$1"
+		exec firefox -new-tab "$1" >/dev/null 2>&1
 		;;
 esac
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 d719799b..7d4ba822 100644
--- a/home/.profile
+++ b/home/.profile
@@ -1,6 +1,6 @@
 _PATH=$PATH PATH=
-path() { [ -d "$1" ] && PATH="${PATH}${PATH:+:}${1}"; }
-for prefix in '' /usr/local /opt/local /usr ~/.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
@@ -9,15 +9,20 @@ path /usr/games
 export MANPATH=:~/.local/share/man
 
 export EDITOR=vi
-type nvi >/dev/null && EDITOR=nvi
-export EXINIT='set ai ic sm sw=4 ts=4 para=BlBdPpIt sect=ShSs | map gg 1G'
+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=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"
 
-[ -e /usr/share/mk/sys.mk ] || export CFLAGS=-O
-[ -d /usr/home ] && cd
+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 d5fcb540..afa87fe5 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -2,19 +2,31 @@ set -o noclobber -o nounset -o vi
 
 CDPATH=:~
 
-alias vi=$EDITOR 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' 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)"'
-type doas >/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
@@ -38,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 3fc6a8db..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 progynova
+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
index ca09445b..1e05126c 100644
--- a/home/.xsession
+++ b/home/.xsession
@@ -4,9 +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 
 
-sctd &
+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