From 3251b58920796663e71e4eda312d208127e090d9 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sat, 30 Jul 2022 12:52:31 -0400 Subject: [PATCH] Make today the daily todo and todo the current --- home/.xbindkeysrc | 2 +- home/bin/today.launch.sh | 6 ++++++ home/lib/login_functions.sh | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 home/bin/today.launch.sh diff --git a/home/.xbindkeysrc b/home/.xbindkeysrc index b3e1808..65dbf0a 100644 --- a/home/.xbindkeysrc +++ b/home/.xbindkeysrc @@ -141,7 +141,7 @@ ### Edit specific files -"todo.launch.sh" +"today.launch.sh" Mod4 + t "cd ~/doc/ideas && gvim ideas.md" diff --git a/home/bin/today.launch.sh b/home/bin/today.launch.sh new file mode 100755 index 0000000..cc83399 --- /dev/null +++ b/home/bin/today.launch.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +. ~/lib/login_variables.sh # To get $DIR_TODO +. ~/lib/login_functions.sh # To get today + +EDITOR=gvim today diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 97de4b9..6f6f9e0 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -445,7 +445,7 @@ backlog EOF } -todo() { +today() { local date date="$(date +%F)" local -r dir="$DIR_TODO/daily" @@ -459,6 +459,10 @@ todo() { cd "$DIR_TODO" && "$EDITOR" "$file" } +todo() { + cd "$DIR_TODO" && "$EDITOR" TODO +} + work_log_template() { cat << EOF $(date '+%F %A') -- 2.20.1