-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-a-day.sh
executable file
·45 lines (33 loc) · 1.09 KB
/
start-a-day.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# -*- coding: UTF-8 -*-
## Fun script to remind you to call it a day after the required hours of work
: ${TASK:="task"}
TASK="${TASK} rc.color=off"
# Set the required hours of work (included 1h for lunch) from input or default to 9
required_hours=${1:-9}
commit_daily_update=$(( $required_hours - 1 ))
TODAY_REM=~/.config/rem/rem.$(date +%F)
if [[ ! -f ${TODAY_REM} ]]; then
echo "$(date +"%b/%d/%Y %H:%M") start of the day" > ~/.config/rem/rem.$(date +%F)
rem commit daily updates in:${commit_daily_update} hours
rem call it a day in:${required_hours} hours
echo `date +%H:%M` > $HOME/.productive-time-started
echo `date -d "$required_hours hours" +%H:%M` > $HOME/.productive-time-deadline
lets do morning review
fi
command -v ${TASK} >/dev/null
if [[ $? -ne 0 ]]; then
exit 0
fi
echo ""
echo "## Quarter Goals"
${TASK} project:QC +PENDING
echo ""
echo "## NEXT (overdue/today/High)"
${TASK} "+OVERDUE or +TODAY or priority:H -COMPLETE"
echo ""
echo "## THIS WEEK"
${TASK} +PENDING due.after:sow due.before:eow
echo ""
echo "## ACTIVE"
${TASK} +ACTIVE