aboutsummaryrefslogtreecommitdiff
path: root/module/main.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-29 15:32:52 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-29 15:35:17 +0100
commitc3ed0230df578ce934289e3064b987ab86d602f2 (patch)
treedc740697f890a45563b089cc5bac93660bef8021 /module/main.scm
parentMove TTY input to end of loop. (diff)
downloadcalp-c3ed0230df578ce934289e3064b987ab86d602f2.tar.gz
calp-c3ed0230df578ce934289e3064b987ab86d602f2.tar.xz
Add summary-filter to SUMMARY field.
Diffstat (limited to '')
-rwxr-xr-xmodule/main.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/main.scm b/module/main.scm
index 995e55a6..aae640ac 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -41,6 +41,8 @@
(define (now)
(date->time-utc (current-date)))
+(define (summary-filter _ str) str)
+
(define (main-loop regular-events repeating-events)
(define time (now))
(define cur-event 0)
@@ -76,7 +78,8 @@
(time->string (attr ev 'DTSTART) "~1 ~3") ; TODO show truncated string
(if (= i cur-event) "\x1b[7m" "")
(color-escape (attr (parent ev) 'COLOR))
- (trim-to-width (attr ev 'SUMMARY) 30)
+ ;; Summary filter is a hook for the user
+ (trim-to-width (summary-filter ev (attr ev 'SUMMARY)) 30)
STR-RESET
(trim-to-width
(or (attr ev 'LOCATION) "\x1b[1;30mINGEN LOKAL") 20)