News for hackers. Stuff that matters.
Re:How to work from home without going insane (purple monkey... by barrkel on Thursday November 10, 2011 @12:17PM (#3220833)
I have a tool called 'messagebox' that pops up a dialog, and a script 'now' which outputs pretty-formatted current time and date; doubles as a work log:

    #!/bin/bash
    
    if [ -n "$1" ]; then
        task="$@"
    else    
        task_file=$(mktemp)
        export task_file
        rlwrap bash -c 'read -p "current task: " -r task; echo $task > $task_file'
        task="$(<$task_file)"
        rm $task_file
    fi
    
    # don't keep a handle open to current directory
    cd "$HOME"
    
    echo "$(now): $task" >> ~/.pomodoro
    
    (
        sleep 25m
        messagebox 'Pop!'
    ) &
    
    echo "25 minutes starting now"

There are no comments on this comment yet.