AutoYADM commit: 2025-06-17 00:02:33

This commit is contained in:
Daniel Fichtinger 2025-06-17 00:02:33 -04:00
parent cefd6b2450
commit 1f952af0ed
9 changed files with 17 additions and 19 deletions

View file

@ -1,4 +1,4 @@
hook global BufCreate .*[.]taskrc %{ hook global BufCreate .*[.]?taskrc %{
set-option buffer filetype ini set-option buffer filetype ini
} }

View file

@ -1 +1,2 @@
secret.ini secret.ini
recurrence

View file

@ -1 +1,2 @@
secret.ini secret.ini
recurrence

View file

@ -1,11 +1,10 @@
To set up: This directory must contain a `secret.ini` file which has the following:
- The correct `.taskrc##template` file must be present in the homedir (also
tracked by yadm, so no problem)
- This directory must contain a `secret.ini` file which has the following:
```ini ```ini
sync.server.url=secret_here sync.server.url=secret_here
sync.server.client_id=secret_here sync.server.client_id=secret_here
sync.encryption_secret=secret_here sync.encryption_secret=secret_here
``` ```
The `recurrence` file is handled by a `yadm` hook, see
`~/.config/yadm/hooks/post_pull`.

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
DATA="$HOME/.local/share/task"
n=0 n=0
while IFS= read -r _; do while IFS= read -r _; do
n=$((n + 1)) n=$((n + 1))
@ -7,10 +9,10 @@ done
if [ "$n" -gt 0 ]; then if [ "$n" -gt 0 ]; then
{ {
lockfile="$HOME/.task/sync_hook.lock" lockfile="$DATA/sync_hook.lock"
errfile="$HOME/.task/sync_hook.err" errfile="$DATA/sync_hook.err"
lerrfile="$HOME/.task/sync_hook.errl" lerrfile="$DATA/sync_hook.errl"
logfile="$HOME/.task/sync_hook.log" logfile="$DATA/sync_hook.log"
flock "$lockfile" sh -c ' flock "$lockfile" sh -c '
task sync >>"$1" 2>"$2" task sync >>"$1" 2>"$2"

View file

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

View file

@ -6,5 +6,5 @@ if [ -f "$HOME/.config/task/taskrc" ]; then
else else
val="false" val="false"
fi fi
printf 'recurrence=%s\n' "$val" >>"$HOME/.config/task/taskrc" printf 'recurrence=%s\n' "$val" >"$HOME/.config/task/recurrence"
fi fi

View file

@ -76,6 +76,5 @@
.config/vesktop-flags.conf .config/vesktop-flags.conf
.config/qutebrowser .config/qutebrowser
.config/task .config/task
.taskrc##template
.config/yadm/encrypt .config/yadm/encrypt
.local/share/yadm/archive .local/share/yadm/archive

View file

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