宋文武 <[email protected]> skribis: > * gnu/services/xorg.scm (%default-xsessions): New variable. > (xsessions-directory): New procedure. > (slim-service): Add #:sessions parameter. > [slim.cfg]: Honor #:sessions. > (xinitrc): Adjust accordingly.
Nice! > - ;; Then try a pre-configured session type. > - (let ((ratpoison (string-append #$ratpoison "/bin/ratpoison")) > - (wmaker (string-append #$windowmaker "/bin/wmaker"))) > - (match (command-line) > - ((_ "ratpoison") > - (exec-from-login-shell ratpoison)) > - (_ > - (exec-from-login-shell wmaker)))))) > - > + ;; Then run the selected session. > + (exec-from-login-shell (cadr command-line)))) Please keep ‘match’ instead of ‘cadr’. Also, the line above should be (cadr (command-line)) instead of (cadr command-line). Lastly, there’s a problem when #:auto-login? is #t because (command-line) returns a 1-element list. This will be naturally fixed when the ‘match’ form above is reinstated. > +(define %default-xsessions > + (list (text-file* "wmaker.desktop" " Add a comment below ‘%default-xsessions’, like ;; List of monadic values denoting for .desktop files blah blah > +(define (xsessions-directory sessions) > + "Return a directory contains SESSIONS, which should be a list of monadic s/contains/containing/ Other than that, it looks fine to me. Could you send an updated version? Thanks! Ludo’.
