summaryrefslogtreecommitdiffstats
path: root/bin/td
blob: 9bbbec1dc3b8ae7a82d0622e6e9ff2f3975689d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

task_date=$(zenity --calendar --date-format=%Y-%m-%d)

if [[ $? -ne 0 ]]; then
    notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
    exit 0
fi

task_time=$(zenity --entry --text="enter time in xx:xx format" --entry-text="00:00")

if [[ $? -ne 0 ]]; then
    notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
    exit 0
fi

task_description=$(zenity --entry --text="enter description")

if [[ $? -ne 0 ]]; then
    notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
    exit 0
fi

task add due:"$task_date" + "T$task_time" "$task_description"