~lucasemmoreira/pomodoro

647508aab993423ca38bc9d301fd2ed14667d40c — lucas 1 year, 1 month ago 5292031
fix: add time to start and finish
1 files changed, 4 insertions(+), 4 deletions(-)

M src/pomodoro
M src/pomodoro => src/pomodoro +4 -4
@@ 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