summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorYigit Sever2019-03-18 21:37:33 +0300
committerYigit Sever2019-03-18 21:38:38 +0300
commit41617519845931ae5d97e2d6ec52bbd8a3aa205e (patch)
tree9418a18b872bb3b827abd6f3e522e90b7274b92b /bin
parentb391e27a0f1ef954f5347ebdd1913b3bb953ad80 (diff)
downloaddotfiles-41617519845931ae5d97e2d6ec52bbd8a3aa205e.tar.gz
dotfiles-41617519845931ae5d97e2d6ec52bbd8a3aa205e.tar.bz2
dotfiles-41617519845931ae5d97e2d6ec52bbd8a3aa205e.zip
New script to add taskwarrior todo items
Diffstat (limited to 'bin')
-rwxr-xr-xbin/td24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/td b/bin/td
new file mode 100755
index 0000000..9bbbec1
--- /dev/null
+++ b/bin/td
@@ -0,0 +1,24 @@
1#!/bin/bash
2
3task_date=$(zenity --calendar --date-format=%Y-%m-%d)
4
5if [[ $? -ne 0 ]]; then
6 notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
7 exit 0
8fi
9
10task_time=$(zenity --entry --text="enter time in xx:xx format" --entry-text="00:00")
11
12if [[ $? -ne 0 ]]; then
13 notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
14 exit 0
15fi
16
17task_description=$(zenity --entry --text="enter description")
18
19if [[ $? -ne 0 ]]; then
20 notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error"
21 exit 0
22fi
23
24task add due:"$task_date" + "T$task_time" "$task_description"