#!/bin/bash
set -euo pipefail
IFS=

cd $HOME/focus

if online; then
	if ! q pidof ssh && "`hostname -f`" != "pi.nipl.net" ; then
		connect nipl.net
	fi
	arcs
fi

dt() {
	date -d "${*:-}" +%Y-%m-%d\ %a
}

echo `dt`$'\t' >> log
vi +$ log
make
if online; then
	arcs
fi

if [ -n "${DISPLAY:-}" ]; then
	dillo focus.html
fi
