Paste number 159908: sxml-xorg-config

Paste number 159908: sxml-xorg-config
Pasted by: iyzsong
When:6 years, 2 weeks ago
Share:Tweet this! |
Paste contents:
Raw Source | XML | Display As
(use-modules (srfi srfi-1)
             (srfi srfi-26)
             (sxml transform))

(define (sxml->xorg.conf sxml)
  (define bindings
    `((*default* . ,(lambda (tag . rest)
                      (list tag (map (cut list " " <>) rest))))
      (*text* . ,(lambda (tag text)
                   (list "\"" text "\"")))
      (Section . ,(lambda (tag name . rest)
                    `(Section " " ,name "\n"
                              ,(map (cut list "  " <> "\n") rest)
                              EndSection "\n")))))
    (lambda ()
      (SRV:send-reply (pre-post-order sxml bindings)))))

(define %default-xorg-config
  `((Section "ServerFlags"
             (Option "AllowMouseOpenFailed" "on"))))

(define (xorg.conf)
  (define files-section
    `(Section "Files"
              (ModulePath "/gnu/store/...")))
   (cons* files-section %default-xorg-config)))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.