dotfiles/oni/home/services/herbstluftwm.scm
Tom Willemse 9363fb88cf Add herbstluftwm configuration with xsession extension
The herbstluftwm configuration isn't complete yet, it's only the package so far,
but it does extend the xsession service to include a line in xsession to execute
the window manager in a bit of a hacky way.

This also adds a ‘mixed-executable-file’ function which is the same as the
‘mixed-text-file’ except that it also sets the executable bit for the computed
file.
2022-04-14 01:39:25 -07:00

41 lines
1.2 KiB
Scheme

(define-module (oni home services herbstluftwm)
#:use-module (gnu services configuration)
#:use-module (gnu packages wm)
#:use-module (gnu home services)
#:use-module (gnu home services utils)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (oni home services xsession)
#:export (home-herbstluftwm-service-type
home-herbstluftwm-configuration))
(define-configuration/no-serialization home-herbstluftwm-configuration
(package
(package herbstluftwm)
"Package use for setting herbstluftwm"))
(define (add-herbstluftwm-packages config)
(list (home-herbstluftwm-configuration-package config)))
(define (add-herbstluftwm-executable config)
(home-xsession-extension
(wm
(list
(mixed-text-file
"xsession"
"exec " herbstluftwm "/bin/herbstluftwm")))))
(define home-herbstluftwm-service-type
(service-type
(name 'home-herbstluftwm)
(extensions
(list (service-extension
home-profile-service-type
add-herbstluftwm-packages)
(service-extension
home-xsession-service-type
add-herbstluftwm-executable)))
(compose identity)
(default-value (home-herbstluftwm-configuration))
(description "Install and configure herbstluftwm.")))