diff --git a/.config/task/.gitignore b/.config/task/.gitignore new file mode 100644 index 0000000..bf5455d --- /dev/null +++ b/.config/task/.gitignore @@ -0,0 +1 @@ +taskrc.d/server diff --git a/.config/task/taskrc b/.config/task/taskrc index 8740847..fb80a8b 100644 --- a/.config/task/taskrc +++ b/.config/task/taskrc @@ -1,7 +1,9 @@ data.location=~/.task +include ./taskrc.d/server + # Theme -include /usr/share/doc/task/rc/dark-gray-256.theme +include /usr/share/doc/task/rc/light-256.theme uda.reviewed.type=date uda.reviewed.label=Reviewed @@ -10,18 +12,11 @@ report._reviewed.columns=uuid report._reviewed.sort=reviewed+,modified+ report._reviewed.filter=( reviewed.none: or reviewed.before:now-6days ) and ( +PENDING or +WAITING ) -taskd.certificate=/home/h/.task/private.certificate.pem -taskd.key=/home/h/.task/private.key.pem -taskd.ca=/home/h/.task/ca.crt -taskd.server=inthe.am:53589 -taskd.credentials=inthe_am/hektor.misplon/2feb9351-d86a-4ecc-9a69-72ac391e15e6 -taskd.trust=strict - # Changes to `all` report: # # due->due.remaining -report.all.columns=id,status.short,uuid.short,start.active,entry.age,end.age,depends.indicator,priority,project.parent,tags.count,recur.indicator,wait.remaining,scheduled.remaining,due.remaining,until.remaining,description -report.all.labels=ID,St,UUID,A,Age,Done,D,P,Project,Tags,R,Wait,Sch,Due,Until,Description +# report.all.columns=id,status.short,uuid.short,start.active,entry.age,end.age,depends.indicator,priority,project.parent,tags.count,recur.indicator,wait.remaining,scheduled.remaining,due.remaining,until.remaining,description +# report.all.labels=ID,St,UUID,A,Age,Done,D,P,Project,Tags,R,Wait,Sch,Due,Until,Description # Description report report.description.columns=description @@ -29,7 +24,23 @@ report.description.columns=description # Adjust defaults alias.burndown=burndown.daily -urgency.user.project.run.coefficient=0 -urgency.user.project.side.coefficient=-1.0 +# Set urgencies for certain projects +urgency.user.project.studies.coefficient=1.0 +urgency.user.project.admin.coefficient=1.0 +urgency.user.project.personal.coefficient=0.5 +urgency.user.project.groceries.coefficient=0.5 +urgency.user.project.home.coefficient=0.2 +urgency.user.project.creative.coefficient=0.0 +urgency.user.project.side.coefficient=0.0 -verbose=blank,header,footnote,label,new-id,affected,edit,special,project,unwait +# Set urgencies for certain tags +urgency.user.tag.money.coefficient=1.5 + +# Adjust urgencies for priorities +urgency.uda.priority.L.coefficient=-1.0 + +# verbose=blank,header,footnote,label,new-id,affected,edit,special,project,unwait + +search.case.sensitive=no +context.cc.read=pro:studies.cc +context.cc.write=pro:studies.cc diff --git a/.config/task/taskrc.d/setup.sh b/.config/task/taskrc.d/setup.sh new file mode 100755 index 0000000..e171c00 --- /dev/null +++ b/.config/task/taskrc.d/setup.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Evaluate environment variables into `server` config file + +source ~/.env + +config_file=~/.config/task/taskrc.d/server + +echo "taskd.certificate=~/.task/default-client.cert.pem" > $config_file +echo "taskd.key=~/.task/default-client.key.pem" >> $config_file +echo "taskd.ca=~/.task/ca.cert.pem" >> $config_file +echo "taskd.trust=ignore hostname" >> $config_file +echo "taskd.server=$TASKD_SERVER:$TASKD_PORT" >> $config_file +echo "taskd.credentials=$TASKD_CREDS" >> $config_file diff --git a/.gitignore b/.gitignore index c5ac630..71f4443 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,9 @@ Desktop.ini # Thumbnail cache Thumbs.db -# Prerequisites +# Prerequisites, but not directories *.d +!*.d/ # Object files *.o diff --git a/.task/hooks/on-exit.sync.sh b/.task/hooks/on-exit.sync.sh new file mode 100755 index 0000000..e129393 --- /dev/null +++ b/.task/hooks/on-exit.sync.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Inspired by https://gist.github.com/primeapple/d3d82fbd28e9134d24819dd72430888e + +source ~/.env + +log_file=~/.task/sync.log + +is_up() { + if ! nc -z $TASKD_SERVER $TASKD_PORT; then + echo "Server is down" >> $log_file + exit 1 + fi +} + +is_up +date > $log_file +task rc.verbose:nothing sync >> $log_file & + +exit 0