aboutsummaryrefslogtreecommitdiff
path: root/module/config.scm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--module/config.scm18
1 files changed, 3 insertions, 15 deletions
diff --git a/module/config.scm b/module/config.scm
index d62b05db..e1000641 100644
--- a/module/config.scm
+++ b/module/config.scm
@@ -8,22 +8,10 @@
(srfi srfi-88)
(ice-9 ftw)
(ice-9 regex)
- (ice-9 rdelim))
+ (ice-9 rdelim)
+ (glob))
-(define (p str)
- "Pathify string."
- (regexp-substitute/global
- #f "~[^/]*" str
- 'pre (lambda (_) (getenv "HOME")) 'post))
-
-(define (filename-hidden? str)
- (char=? #\. (string-ref str 0)))
-
-(calendar-files
- (let ((path #; "/mnt/arch/home/hugo/.calendars/"
- (p "~/.calendars/")))
- (map (cut string-append path <>)
- (scandir path (negate filename-hidden?)))))
+(calendar-files (glob "~/.calendars/*"))
;;; TODO possibly replace with propper lookup
(define my-courses