aboutsummaryrefslogtreecommitdiff
path: root/module/main.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-04-23 18:46:09 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-04-23 18:46:09 +0200
commitef901153404d24ca1694a2b98e845eaca47aa085 (patch)
treeb6951abaacb63226819235c08a2b596795dc62d3 /module/main.scm
parentFix failing test. (diff)
downloadcalp-ef901153404d24ca1694a2b98e845eaca47aa085.tar.gz
calp-ef901153404d24ca1694a2b98e845eaca47aa085.tar.xz
Change how util is loaded.
Diffstat (limited to 'module/main.scm')
-rwxr-xr-xmodule/main.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/main.scm b/module/main.scm
index 6a2cd9c9..095a4d7c 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -22,6 +22,8 @@
(terminal util)
(html html)
+
+ (parameters)
)
(define (ev-time<? a b)
@@ -59,7 +61,7 @@
(if (= i cur-event) "\x1b[7m" "")
(color-escape (attr (parent ev) 'COLOR))
;; Summary filter is a hook for the user
- (trim-to-width (summary-filter ev (attr ev 'SUMMARY)) 30)
+ (trim-to-width ((summary-filter) ev (attr ev 'SUMMARY)) 30)
STR-RESET
(trim-to-width
(or (attr ev 'LOCATION) "\x1b[1;30mINGEN LOKAL") 20)
@@ -67,8 +69,6 @@
events
(iota (length events))))
-(define (summary-filter _ str) str)
-
(define (main-loop event-stream)
(define time (now))
(define cur-event 0)
@@ -132,8 +132,8 @@
-
-(load "config.scm")
+;; (load "config.scm")
+(use-modules (config))
;; Reads all calendar files from disk, and creates a list of "regular" events,
;; and a stream of "repeating" events, which are passed in that order to the
@@ -141,7 +141,7 @@
;;
;; Given as a sepparate function from main to ease debugging.
(define (init proc)
- (define calendars (map make-vcomponent calendar-files))
+ (define calendars (map make-vcomponent (calendar-files)))
(define events (concatenate (map (cut children <> 'VEVENT) calendars)))
(let* ((repeating regular (partition repeating? events)))