Initial import of the calcurse Google Calendar sync from the dotfiles
Scripts, user units and hooks moved to system paths, the xmobar script as calcurse-xmobar with colour options, and expiry detection that also catches the first invalid_grant failure.
This commit is contained in:
17 files changed
+1077
No files matched your search
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Sync the UI's saved changes once it exits (syncing while it runs would change files under it).
|
||||
[ "$(ps -o args= -p "$PPID")" = calcurse ] && [ "$(ps -o tty= -p "$PPID" | tr -d ' ')" != '?' ] || exit 0
|
||||
# shellcheck disable=SC2016 # $1 expands in the inner shell
|
||||
setsid -f sh -c 'while kill -0 "$1" 2>/dev/null; do sleep 1; done; systemctl --user start calcurse-sync.service' \
|
||||
sh "$PPID" >/dev/null 2>&1
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# calcurse-gcal: symlink into ~/.config/calcurse/hooks/. Sync with Google before the UI loads. Non-interactive calls (-Q, -d, -i, calcurse-caldav's own) run this hook
|
||||
# too, so act only for the UI: a bare "calcurse" with a terminal (the daemon is bare too, but has none).
|
||||
[ "$(ps -o args= -p "$PPID")" = calcurse ] && [ "$(ps -o tty= -p "$PPID" | tr -d ' ')" != '?' ] || exit 0
|
||||
calcurse-sync --now 2>&1 | systemd-cat -t calcurse-sync
|
||||
Reference in new issue
Block a user