aboutsummaryrefslogtreecommitdiff
path: root/config.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-01 21:01:17 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-01 21:01:17 +0200
commit6c37a4c00cd420e50d0cd2ad088268bcbb3d9155 (patch)
treef5c0052c1cfa1c2a9019f83f7d93d04418379d7a /config.scm
parentAdd set-config! and get-config, along with print for debug. (diff)
downloadcalp-6c37a4c00cd420e50d0cd2ad088268bcbb3d9155.tar.gz
calp-6c37a4c00cd420e50d0cd2ad088268bcbb3d9155.tar.xz
Update remaining code to use new config scheme.
Diffstat (limited to 'config.scm')
-rw-r--r--config.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/config.scm b/config.scm
index 832cad23..fb09deb3 100644
--- a/config.scm
+++ b/config.scm
@@ -9,12 +9,11 @@
;; (ice-9 rdelim)
(sxml simple)
(glob)
- (datetime util)
- (util config all)
+ (util config)
)
-(calendar-files (glob "~/.local/var/cal/*"))
+(set-config! 'calendar-files (glob "~/.local/var/cal/*"))
;;; TODO possibly replace with propper lookup
(define my-courses
@@ -28,7 +27,7 @@
(define* (aref alist key optional: default)
(or (assoc-ref alist key) default key))
-(summary-filter
+(set-config! 'summary-filter
(lambda (ev str)
(regexp-substitute/global
#f "T[A-Z]{3}[0-9]{2}" str
@@ -60,7 +59,7 @@
(a (match:substring m))
(recur (match:suffix m)))))))
-(description-filter
+(set-config! 'description-filter
(lambda (ev str)
(cond [(member (attr (parent ev) 'NAME)
'("D-sektionens officiella kalender" "LiTHe kod"))
@@ -69,4 +68,4 @@
'pre "<br/>" 'post))]
[else (parse-links str)])))
-(week-start mon)
+(set-config! 'week-start (@ (datetime util) mon))