From e9c12af512349cb95a0018e25a9cc54e78b468a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 28 Dec 2019 02:32:38 +0100 Subject: Move config from module to config directory. --- module/config.scm | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 module/config.scm (limited to 'module/config.scm') diff --git a/module/config.scm b/module/config.scm deleted file mode 100644 index 08c678c9..00000000 --- a/module/config.scm +++ /dev/null @@ -1,32 +0,0 @@ -;;; Preliminary config file for the system. -;;; Currently loaded by main, and requires that `calendar-files` -;;; is set to a list of files (or directories). - -(define-module (config) #:use-module (parameters)) - -(use-modules (srfi srfi-26) - (srfi srfi-88) - (ice-9 regex) - (ice-9 rdelim) - (glob)) - -(calendar-files (glob "~/.local/var/cal/*")) - -;;; TODO possibly replace with propper lookup -(define my-courses - '((TSEA82 . "Datorteknik") - (TFYA19 . "Kvantdatorer") - (TATA42 . "TvÄvarren") - (TSRT04 . "Matlab") - (TDDC78 . "Paralellprogrammering") - (TDDB68 . "Pintos"))) - -(define* (aref alist key optional: default) - (or (assoc-ref alist key) default key)) - -(summary-filter - (lambda (ev str) - (regexp-substitute/global - #f "T[A-Z]{3}[0-9]{2}" str - 'pre (lambda (m) (aref my-courses (string->symbol (match:substring m)))) - 'post))) -- cgit v1.2.3