diff options
author | Yigit Sever | 2020-09-16 15:22:27 +0300 |
---|---|---|
committer | Yigit Sever | 2020-09-16 15:22:27 +0300 |
commit | 7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0 (patch) | |
tree | dbc1e308cfbb398f77c784b7ea52c08e5aeb8332 /.local/bin/td | |
parent | 44ff427c77e4c3848d273b0bc3484435ec9528c7 (diff) | |
download | dotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.tar.gz dotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.tar.bz2 dotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.zip |
move bin to .local/bin
Diffstat (limited to '.local/bin/td')
-rwxr-xr-x | .local/bin/td | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.local/bin/td b/.local/bin/td new file mode 100755 index 0000000..3de0d55 --- /dev/null +++ b/.local/bin/td | |||
@@ -0,0 +1,25 @@ | |||
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 | RESULT=$(task add due:${task_date}T$task_time "$task_description") | ||
25 | notify-send "Success" "$RESULT" --app-name="taskwarrior" --icon="checkmark" | ||