AutoYADM commit: 2025-06-16 21:20:52

This commit is contained in:
Daniel Fichtinger 2025-06-16 21:20:52 -04:00
parent 5177886bd2
commit be7b577b3b
7 changed files with 67 additions and 0 deletions

1
.config/task/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
secret.ini

1
.config/task/.ignore Normal file
View file

@ -0,0 +1 @@
secret.ini

3
.config/task/README.md Normal file
View file

@ -0,0 +1,3 @@
To set up:
- copy `.taskrc` to homedir and set the correct client_id and encryption_secret

View file

@ -0,0 +1,47 @@
#!/bin/sh
n=0
while IFS= read -r _; do
n=$((n + 1))
done
if [ "$n" -gt 0 ]; then
{
lockfile="$HOME/.task/sync_hook.lock"
errfile="$HOME/.task/sync_hook.err"
lerrfile="$HOME/.task/sync_hook.errl"
logfile="$HOME/.task/sync_hook.log"
flock "$lockfile" sh -c '
task sync >>"$1" 2>"$2"
status=$?
if [ "$status" -ne 0 ]; then
echo "Taskwarrior sync failed at $(date)" >>"$2"
if command -v sendmail >/dev/null 2>&1; then
{
echo "To: daniel@ficd.ca"
echo "From: daniel@ficd.ca"
echo "Subject: Taskwarrior Sync Failed on $(hostname)"
echo "Date: $(date -R)"
echo ""
echo "task sync failed at $(date)"
echo ""
cat "$2"
} | sendmail -t
fi
cat "$2" >>"$3"
if command -v notify-send >/dev/null 2>&1; then
notify-send --urgency=critical "taskwarrior sync failed"
fi
exit 1
fi
' sh "$logfile" "$lerrfile" "$errfile" "$(hostname)"
} >/dev/null 2>&1 </dev/null &
fi
exit 0

10
.config/task/taskrc.ini Normal file
View file

@ -0,0 +1,10 @@
# [Created by task 3.4.1 6/16/2025 14:29:26]
data.location=/home/fic/.task
news.version=3.4.1
hooks.location=$HOME/.config/task/hooks
urgency.user.urgent.coefficient=4.5
urgency.user.tag.later.coefficient=-6.0
urgency.user.project.thesis.coefficient=2.9
recurrence=on

View file

@ -75,3 +75,5 @@
.editorconfig .editorconfig
.config/vesktop-flags.conf .config/vesktop-flags.conf
.config/qutebrowser .config/qutebrowser
.config/task
.taskrc##template

View file

@ -1,2 +1,5 @@
# GENERATED BY YADM TEMPLATE
# SEE .config/task/
{% include ".config/task/taskrc.ini" %} {% include ".config/task/taskrc.ini" %}
{% include ".config/task/secret.ini" %} {% include ".config/task/secret.ini" %}