From b98c93c159ac3213442d9581a8ef54244fa814fc Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 23 Aug 2023 11:24:42 -0700 Subject: [PATCH] Change herbstluftwm configuration to consist of multiple files --- oni/home/config/data.scm | 16 +++++++++------- oni/home/services/herbstluftwm.scm | 7 ++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm index f030911..23666f2 100644 --- a/oni/home/config/data.scm +++ b/oni/home/config/data.scm @@ -139,13 +139,15 @@ (dev split horizontal:0.54:1 (clients max:0) (clients vertical:0)))) (extra (list - "set_monitors 1920x1080+0+0" - "focus_edge left" - "keybind Mod4-apostrophe spawn dunstctl close" - "keybind Mod4-quotedbl spawn dunstctl close-all" - "keybind Mod4-Control-apostrophe spawn dunstctl history-pop" - "keybind Mod4-Mod1-apostrophe spawn dunstctl context" - "spawn pick-random-wallpaper")))) + (mixed-text-file + "autostart" + "set_monitors 1920x1080+0+0\n" + "focus_edge left\n" + "keybind Mod4-apostrophe spawn dunstctl close\n" + "keybind Mod4-quotedbl spawn dunstctl close-all\n" + "keybind Mod4-Control-apostrophe spawn dunstctl history-pop\n" + "keybind Mod4-Mod1-apostrophe spawn dunstctl context\n" + "spawn pick-random-wallpaper\n"))))) (service home-polybar-service-type (home-polybar-configuration diff --git a/oni/home/services/herbstluftwm.scm b/oni/home/services/herbstluftwm.scm index 306e497..8dfc77c 100644 --- a/oni/home/services/herbstluftwm.scm +++ b/oni/home/services/herbstluftwm.scm @@ -46,7 +46,7 @@ (alist '()) "Layouts to load for tags") (extra - (list '()) + (text-config '()) "Extra commands")) (define (add-herbstluftwm-packages config) @@ -105,8 +105,9 @@ (car layout-pair) (cdr layout-pair))) (home-herbstluftwm-configuration-layouts config)) - (map (λ (line) (format #f "herbstclient ~a\n" line)) - (home-herbstluftwm-configuration-extra config)))))) + (list (serialize-text-config + config + (home-herbstluftwm-configuration-extra config))))))) (define (add-herbstluftwm-executable config) (home-xinit-extension