diff options
Diffstat (limited to '.config/calcurse')
-rw-r--r-- | .config/calcurse/caldav/config | 13 | ||||
-rw-r--r-- | .config/calcurse/conf | 16 | ||||
-rwxr-xr-x | .config/calcurse/hooks/post-save | 47 | ||||
-rwxr-xr-x | .config/calcurse/hooks/pre-load | 17 | ||||
-rw-r--r-- | .config/calcurse/keys | 4 |
5 files changed, 87 insertions, 10 deletions
diff --git a/.config/calcurse/caldav/config b/.config/calcurse/caldav/config new file mode 100644 index 0000000..75dfada --- /dev/null +++ b/.config/calcurse/caldav/config | |||
@@ -0,0 +1,13 @@ | |||
1 | [General] | ||
2 | Binary = calcurse | ||
3 | Hostname = radicale.chudnick.com:443 | ||
4 | Path = /sam/d1b7aa05-a00b-cb40-bdef-b6ed70a23944/ | ||
5 | AuthMethod = basic | ||
6 | InsecureSSL = No | ||
7 | HTTPS = Yes | ||
8 | DryRun = No | ||
9 | Verbose = Yes | ||
10 | SyncFilter = cal | ||
11 | |||
12 | [Auth] | ||
13 | Username = sam | ||
diff --git a/.config/calcurse/conf b/.config/calcurse/conf index b46b0a7..ecf4bba 100644 --- a/.config/calcurse/conf +++ b/.config/calcurse/conf | |||
@@ -1,13 +1,13 @@ | |||
1 | appearance.calendarview=monthly | 1 | appearance.calendarview=monthly |
2 | appearance.compactpanels=no | 2 | appearance.compactpanels=no |
3 | appearance.defaultpanel=calendar | 3 | appearance.defaultpanel=todo |
4 | appearance.layout=5 | 4 | appearance.layout=5 |
5 | appearance.notifybar=yes | 5 | appearance.notifybar=yes |
6 | appearance.sidebarwidth=2 | 6 | appearance.sidebarwidth=22 |
7 | appearance.theme=blue on default | 7 | appearance.theme=cyan on default |
8 | appearance.todoview=hide-completed | 8 | appearance.todoview=hide-completed |
9 | appearance.headingpos=right-justified | 9 | appearance.headingpos=right-justified |
10 | daemon.enable=no | 10 | daemon.enable=yes |
11 | daemon.log=no | 11 | daemon.log=no |
12 | format.inputdate=1 | 12 | format.inputdate=1 |
13 | format.notifydate=%a %F | 13 | format.notifydate=%a %F |
@@ -19,10 +19,10 @@ general.autosave=yes | |||
19 | general.confirmdelete=yes | 19 | general.confirmdelete=yes |
20 | general.confirmquit=no | 20 | general.confirmquit=no |
21 | general.firstdayofweek=monday | 21 | general.firstdayofweek=monday |
22 | general.periodicsave=0 | 22 | general.periodicsave=10 |
23 | general.systemdialogs=yes | 23 | general.systemdialogs=no |
24 | notification.command=printf '\a' | 24 | notification.command=notify-send "Upcoming Appointment" |
25 | notification.notifyall=flagged-only | 25 | notification.notifyall=all |
26 | notification.warning=300 | 26 | notification.warning=300 |
27 | appearance.headerline=yes | 27 | appearance.headerline=yes |
28 | appearance.eventseparator=yes | 28 | appearance.eventseparator=yes |
diff --git a/.config/calcurse/hooks/post-save b/.config/calcurse/hooks/post-save new file mode 100755 index 0000000..8836316 --- /dev/null +++ b/.config/calcurse/hooks/post-save | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # This is an example hook. It does two things whenever you save the data files: | ||
4 | # | ||
5 | # 1. Make a commit if the calcurse directories contain a Git repository. | ||
6 | # 2. Synchronize with a CalDAV server if calcurse-caldav is configured. | ||
7 | # | ||
8 | # In order to install this hook, copy this file to | ||
9 | # $XDG_CONFIG_HOME/calcurse/hooks/ (~/.config/calcurse/hooks/) or | ||
10 | # ~/.calcurse/hooks/ if using ~/.calcurse. | ||
11 | |||
12 | data_dir="$HOME/.calcurse" | ||
13 | config_dir="$HOME/.calcurse" | ||
14 | |||
15 | if [ ! -d "$data_dir" ]; then | ||
16 | data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse" | ||
17 | config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/calcurse" | ||
18 | fi | ||
19 | |||
20 | # Do not do anything when synchronizing with a CalDAV server. | ||
21 | [ -f "$data_dir/caldav/lock" ] && exit | ||
22 | |||
23 | # If the directory is under version control, create a Git commit. | ||
24 | commit_dir() { | ||
25 | cd "$1" >/dev/null 2>&1 || return | ||
26 | shift | ||
27 | if [ -d .git ] && command -v git >/dev/null; then | ||
28 | git add "$@" | ||
29 | if ! git diff-index --quiet --cached HEAD; then | ||
30 | git commit -m "Automatic commit by the post-save hook" | ||
31 | fi | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | commit_dir "$data_dir" apts todo | ||
36 | commit_dir "$config_dir" conf keys | ||
37 | |||
38 | # Optionally run the CalDAV synchronization script in the background. | ||
39 | cd "$data_dir" || exit | ||
40 | if [ -d caldav ] && command -v calcurse-caldav >/dev/null; then | ||
41 | ( | ||
42 | date="$(date +'%b %d %H:%M:%S')" | ||
43 | echo "$date Running calcurse-caldav from the post-save hook..." | ||
44 | CALCURSE_CALDAV_PASSWORD=$(pass show web/radicale.chudnick.com | head -1) calcurse-caldav | ||
45 | echo | ||
46 | ) >>caldav/log 2>&1 & | ||
47 | fi | ||
diff --git a/.config/calcurse/hooks/pre-load b/.config/calcurse/hooks/pre-load new file mode 100755 index 0000000..dc25771 --- /dev/null +++ b/.config/calcurse/hooks/pre-load | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | [ -d "$HOME/.calcurse" ] && data_dir="$HOME/.calcurse" || data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse" | ||
3 | |||
4 | cd "$data_dir" || exit | ||
5 | |||
6 | # Do not do anything when synchronizing with a CalDAV server. | ||
7 | [ -f caldav/lock ] && exit | ||
8 | |||
9 | # Run the CalDAV synchronization script in the background. | ||
10 | if [ -d caldav ] && command -v calcurse-caldav >/dev/null; then | ||
11 | ( | ||
12 | date="$(date +'%b %d %H:%M:%S')" | ||
13 | echo "$date Running calcurse-caldav from the pre-load hook..." | ||
14 | CALCURSE_CALDAV_PASSWORD=$(pass web/radicale.chudnick.com | head -1) calcurse-caldav | ||
15 | echo | ||
16 | ) >>caldav/log 2>&1 & | ||
17 | fi | ||
diff --git a/.config/calcurse/keys b/.config/calcurse/keys index 301d367..0f5ee8d 100644 --- a/.config/calcurse/keys +++ b/.config/calcurse/keys | |||
@@ -27,7 +27,7 @@ generic-add-todo ^T | |||
27 | generic-prev-day T ^H | 27 | generic-prev-day T ^H |
28 | generic-next-day t ^L | 28 | generic-next-day t ^L |
29 | generic-prev-week W ^K | 29 | generic-prev-week W ^K |
30 | generic-next-week w RET | 30 | generic-next-week w |
31 | generic-prev-month M | 31 | generic-prev-month M |
32 | generic-next-month m | 32 | generic-next-month m |
33 | generic-prev-year Y | 33 | generic-prev-year Y |
@@ -45,7 +45,7 @@ end-of-week $ | |||
45 | add-item a A | 45 | add-item a A |
46 | del-item d D | 46 | del-item d D |
47 | edit-item e E | 47 | edit-item e E |
48 | view-item v V | 48 | view-item v V RET |
49 | pipe-item | | 49 | pipe-item | |
50 | flag-item ! | 50 | flag-item ! |
51 | repeat r | 51 | repeat r |