diff options
| author | Paul Buetow <paul@buetow.org> | 2023-07-09 22:13:55 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-07-09 22:13:55 +0300 |
| commit | ca3dc8f1aec00f862094bd75324149a20b579465 (patch) | |
| tree | 77cbfb5bcdc190340baa4251f66e7a3a00b2f0d1 /frontends | |
| parent | 5c0d59f773d686ee7415d145dfcdea46fc0f57a4 (diff) | |
use full task db
Diffstat (limited to 'frontends')
| -rw-r--r-- | frontends/Rexfile | 23 | ||||
| -rw-r--r-- | frontends/etc/taskrc.tpl | 40 | ||||
| -rw-r--r-- | frontends/scripts/taskwarrior.sh.tpl | 4 | ||||
| -rw-r--r-- | frontends/scripts/warrior.sh.tpl | 11 |
4 files changed, 59 insertions, 19 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile index 1367044..6a15887 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -157,17 +157,24 @@ task 'gemtexter', group => 'frontends', append_if_no_such_line '/etc/daily.local', '/usr/local/bin/gemtexter.sh'; }; -desc 'Configure task warrior reminder'; -task 'warrior', group => 'frontends', +desc 'Configure taskwarrior reminder'; +task 'taskwarrior', group => 'frontends', sub { - file '/usr/local/bin/warrior.sh', - content => template('./scripts/warrior.sh.tpl', - is_primary => $is_primary), + pkg 'taskwarrior', ensure => present; + + file '/usr/local/bin/taskwarrior.sh', + content => template('./scripts/taskwarrior.sh.tpl'), owner => 'root', group => 'wheel', - mode => '744'; + mode => '500'; + + file '/etc/taskrc', + content => template('./etc/taskrc.tpl'), + owner => 'root', + group => 'wheel', + mode => '600'; - append_if_no_such_line '/etc/daily.local', '/usr/local/bin/warrior.sh'; + append_if_no_such_line '/etc/daily.local', '/usr/local/bin/taskwarrior.sh'; }; desc 'Configure ACME client'; @@ -525,7 +532,7 @@ task 'commons', group => 'frontends', uptimed(); httpd(); gemtexter(); - warrior(); + taskwarrior(); acme(); acme_invoke(); inetd(); diff --git a/frontends/etc/taskrc.tpl b/frontends/etc/taskrc.tpl new file mode 100644 index 0000000..ed97d38 --- /dev/null +++ b/frontends/etc/taskrc.tpl @@ -0,0 +1,40 @@ +# [Created by task 2.6.2 7/9/2023 20:52:31] +# Taskwarrior program configuration file. +# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color', +# 'man task-sync' or 'man taskrc' + +# Here is an example of entries that use the default, override and blank values +# variable=foo -- By specifying a value, this overrides the default +# variable= -- By specifying no value, this means no default +# #variable=foo -- By commenting out the line, or deleting it, this uses the default + +# You can also refence environment variables: +# variable=$HOME/task +# variable=$VALUE + +# Use the command 'task show' to see all defaults and overrides + +# Files +data.location=/home/git/.task + +# To use the default location of the XDG directories, +# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below + +#data.location=~/.local/share/task +#hooks.location=~/.config/task/hooks + +# Color theme (uncomment one to use) +#include light-16.theme +#include light-256.theme +#include dark-16.theme +#include dark-256.theme +#include dark-red-256.theme +#include dark-green-256.theme +#include dark-blue-256.theme +#include dark-violets-256.theme +#include dark-yellow-green.theme +#include dark-gray-256.theme +#include dark-gray-blue-256.theme +#include solarized-dark-256.theme +#include solarized-light-256.theme +#include no-color.theme diff --git a/frontends/scripts/taskwarrior.sh.tpl b/frontends/scripts/taskwarrior.sh.tpl new file mode 100644 index 0000000..c97b940 --- /dev/null +++ b/frontends/scripts/taskwarrior.sh.tpl @@ -0,0 +1,4 @@ +PATH=$PATH:/usr/local/bin + +echo "Any tasks due before the next 14 days?" +su - git -c '/usr/local/bin/task rc:/etc/taskrc due.before:14day long 2>/dev/null' diff --git a/frontends/scripts/warrior.sh.tpl b/frontends/scripts/warrior.sh.tpl deleted file mode 100644 index 3dd168e..0000000 --- a/frontends/scripts/warrior.sh.tpl +++ /dev/null @@ -1,11 +0,0 @@ -PATH=$PATH:/usr/local/bin - -# These .task.status files were synced by my Laptops to the server. -find /home -maxdepth 2 -mindepth 2 -type f -name .task.status \ - | while read file; do - echo $file: - cat $file - echo - stat $file - echo -done |
