scripts/pomodoro.sh
Gardouille d340606744 Task: Set a specific file path
Put the name in the task file
Sleep time is now 60s
2015-10-15 10:07:30 +02:00

24 lines
380 B
Bash
Executable File

#!/bin/sh
TIME=0
# Work on the task (default: 25 min)
DELAY=25
# Task information (name, path, …)
TASK_NAME="${1}"
TASK_PATH="${HOME}/task.todo"
# Create the task file
if [ ! -f "${TASK_PATH}" ]; then
touch "${TASK_PATH}"
fi
# Tiny timer
while [ "${TIME}" != "${DELAY}" ]
do
sleep 60
TIME=$((TIME+1))
printf '%b' "${TASK_NAME}\n${TIME}" > "${TASK_PATH}"
done
exit 0