One little anti-akrasia thing I'm trying is editing my crontab to periodically pop up an xmessage with a memento mori phrase. It checks that my laptop lid is open, gets a random integer and occasionally pops up the # of seconds to my actuarial death (gotten from Death Clock; accurate enough, I figure):
1,16,31,46 * * * * if grep open /proc/acpi/button/lid/LID0/state; then if [ $((`date \+\%\s` % 6)) = 1 ]; then xmessage "$(((`date --date="9 August 2074" \+\%\s` - `date \+\%\s`) / 60)) minutes left to live. Is what you are doing important?"; fi; fi
(I figure it's stupid enough a tactic and cheap enough to be worth trying. This shell stuff works in both bash and dash/sh, however, you probably want to edit the first conditional, since I'm not sure Linux puts the lid data at the same place in /proc/acpi in every system.)
OK, I can't seem to get the escaping to work right with crontab no matter how I fiddle, so I've replaced the one-liner with a regular script and meaningful variables names and all:
1,14,32,26 * * * * ~/bin/bin/memento-mori
The script itself being (with the 32-bit hack mentioned below):
#!/bin/sh
set -e
if grep open /proc/acpi/button/lid/LID?/state > /dev/null
then
CURRENT=`date +%s`;
if [ $(( $CURRENT % 8 )) = 1 ]
then
# DEATH_DATE=`date --date='9 August 2074' +%s`
DEATH_DATE="3300998400"
REMAINING=$(( $DE...
This thread is for the discussion of Less Wrong topics that have not appeared in recent posts. If a discussion gets unwieldy, celebrate by turning it into a top-level post.