[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] services: xorg: Make SLiM sessions configurable.
From: |
宋文武 |
Subject: |
Re: [PATCH] services: xorg: Make SLiM sessions configurable. |
Date: |
Sat, 20 Dec 2014 00:08:35 +0800 |
User-agent: |
Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-unknown-linux-gnu) |
Ludovic Courtès <address@hidden> writes:
> 宋文武 <address@hidden> 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’.
OK.
>
> 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.
Thanks for pointing out.
I want to make this auto-login-session configurable too, so I endup
with add it as a parameter to slim-service.
>
>> +(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?
0001-services-xorg-Make-SLiM-sessions-configurable.patch
Description: Text Data
In additation, I pass session to ~/.xinitrc (replace ~/.xsession, since
it's what to expect from slim according to [1][2]).
So user can use ~/.xinitrc to custom the selected session:
#!/bin/sh
export LANG=zh_CN.UTF-8
setxkbmap dvorak
exec $1
[1] https://wiki.archlinux.org/index.php/Slim#Environments
[2] https://lists.gnu.org/archive/html/guix-devel/2014-12/msg00282.html
>
> Thanks!
>
> Ludo’.