From 4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 18 Mar 2019 21:37:33 +0300 Subject: New script to add taskwarrior todo items --- bin/td | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/td (limited to 'bin/td') diff --git a/bin/td b/bin/td new file mode 100755 index 0000000..9bbbec1 --- /dev/null +++ b/bin/td @@ -0,0 +1,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" -- cgit v1.2.3-70-g09d2 From b1f5da829f7439aa2f27cbe8ac7de42b750654d2 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 20 Mar 2019 22:17:13 +0300 Subject: Task todo adder displays success via dunst --- bin/td | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/td') diff --git a/bin/td b/bin/td index 9bbbec1..29a594b 100755 --- a/bin/td +++ b/bin/td @@ -21,4 +21,6 @@ if [[ $? -ne 0 ]]; then exit 0 fi -task add due:"$task_date" + "T$task_time" "$task_description" +RESULT=$(task add due:${task_date}T$task_time "$task_description") + +notify-send "Success" "$RESULT" --app-name="taskwarrior" --icon="checkmark" -- cgit v1.2.3-70-g09d2