In con­trast to pop­u­lar opin­ion about work in­ter­rup­tions, I’ve found that be­ing in­ter­rupted with a sim­ple prompt to ex­plain what I’m do­ing is ac­tu­ally of­ten help­ful.

Explicitly ar­tic­u­lat­ing how I’m spend­ing my time helps me to re­mem­ber the big pic­ture and no­tice when I’ve drifted off course.

To this end, I’ve set up a graph­i­cal prompt for main­tain­ing reg­u­lar jrnl en­tries in the style of the old Facebook sta­tus line:

Prompt: Andrew is…

The prompt only ap­pears while the com­puter is in use, gives no­tice be­fore steal­ing fo­cus, and per­mits alarm clock–style snooz­ing to ac­com­mo­date time-sen­si­tive tasks.

set -o errtrace

prompt() {
notify-send --hint 'int:transient:1' \
--icon 'appointment-new' \
'Upcoming journal entry'
sleep 4s
yad --center \
--entry \
--entry-label "$1" \
--no-buttons \
--on-top \
--sticky \
--timeout '60' \
--timeout-indicator 'left' \
--title 'Journal' \
--undecorated \
--width '600'

while sleep '5m'; do
if (( $(xprintidle) < 60000 )) && status="$(prompt 'Andrew is')"; then
jrnl "@prompt Andrew is $status"
sleep '15m'