diff options
author | Yigit Sever | 2019-03-18 21:37:33 +0300 |
---|---|---|
committer | Yigit Sever | 2019-03-18 22:26:57 +0300 |
commit | 4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d (patch) | |
tree | ba7342f265311b6201f30a7882731ad8ead00bb3 /bin | |
parent | b391e27a0f1ef954f5347ebdd1913b3bb953ad80 (diff) | |
download | dotfiles-4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d.tar.gz dotfiles-4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d.tar.bz2 dotfiles-4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d.zip |
New script to add taskwarrior todo items
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/td | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | task_date=$(zenity --calendar --date-format=%Y-%m-%d) | ||
4 | |||
5 | if [[ $? -ne 0 ]]; then | ||
6 | notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" | ||
7 | exit 0 | ||
8 | fi | ||
9 | |||
10 | task_time=$(zenity --entry --text="enter time in xx:xx format" --entry-text="00:00") | ||
11 | |||
12 | if [[ $? -ne 0 ]]; then | ||
13 | notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" | ||
14 | exit 0 | ||
15 | fi | ||
16 | |||
17 | task_description=$(zenity --entry --text="enter description") | ||
18 | |||
19 | if [[ $? -ne 0 ]]; then | ||
20 | notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" | ||
21 | exit 0 | ||
22 | fi | ||
23 | |||
24 | task add due:"$task_date" + "T$task_time" "$task_description" | ||