@@ 23,7 23,7 @@ choice1stlong(){
logwork(){
work=$(rofi -dmenu -p "what did you do?")
project=$(cat "${DIR}/projects.csv" | rofi -dmenu -i -p "In what project?")
- echo "$(date +"%Y-%m-%d %H:%M:%S"),${project}, ${work}" >> "${DOLOG}"
+ echo "${1} ${2},$(date +"%Y-%m-%d %H:%M:%S"),${project}, ${work}" >> "${DOLOG}"
}
timeforlongbreak(){
@@ 32,11 32,11 @@ timeforlongbreak(){
pomodoro(){
$NOTIFY "o/ pomodoro started. Focus!"
- echo $POMODORO_TIME
+ START_TIME=$(date +"%Y-%m-%d %H:%M:%S")
sleep $((${POMODORO_TIME}*60))
- cat ${DOLOG} | awk -F',' '{ print $2 }' | sort | uniq > "${DIR}/projects.csv"
+ cat ${DOLOG} | awk -F',' '{ print $3 }' | sort | uniq > "${DIR}/projects.csv"
$NOTIFY "whoa! nice doing!"
- logwork
+ logwork $START_TIME
if timeforlongbreak; then
choice1stshort
else