From f4d47c96946775c9cbcd93e21565ccf01d85c6a3 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 12 Jul 2024 22:04:09 +0200 Subject: Make waybar more similar to previous polybar config --- tw/gexp.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tw/gexp.scm') diff --git a/tw/gexp.scm b/tw/gexp.scm index 0770f250..49021ebd 100644 --- a/tw/gexp.scm +++ b/tw/gexp.scm @@ -22,9 +22,10 @@ '#$files))))))) (define-public (json-file name value) + "A file called NAME containing the JSON-serialised VALUE." (computed-file name (with-extensions (list guile-json-4) - #~(begin - (use-modules (json) (srfi srfi-26)) - (call-with-output-file #$output - (cut scm->json '#$value <> #:unicode #t)))))) + #~(call-with-output-file #$output + (lambda (port) + (set-port-encoding! port "UTF-8") + ((@ (json) scm->json) '#$value port #:unicode #t)))))) -- cgit v1.2.3