From 7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 16 Sep 2020 15:22:27 +0300 Subject: move bin to .local/bin --- .local/bin/td | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 .local/bin/td (limited to '.local/bin/td') 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 @@ +#!/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 + +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