aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-26 22:37:12 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-26 22:37:12 +0100
commit93be4e8e6c6b82a5825b56cce991563bf19aaaf2 (patch)
tree2b48c1c88f046ee6e1d59636d1f6e8fbbd1660c2 /gnu/services/xorg.scm
parenta068dba78bde9c83a69c755df1131c286d065850 (diff)
parente1509174957bd9eba777bec86ea290fb44a4bce3 (diff)
downloadguix-93be4e8e6c6b82a5825b56cce991563bf19aaaf2.tar
guix-93be4e8e6c6b82a5825b56cce991563bf19aaaf2.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm34
1 files changed, 23 insertions, 11 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 7cb9012b68..69a89584e0 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -207,23 +207,33 @@ which should be passed to this script as the first argument. If not, the
(list %windowmaker-session-type %ratpoison-session-type))
(define (xsessions-directory sessions)
- "Return a directory containing SESSIONS, a list of <session-type> objects."
+ "Return a directory containing SESSIONS, a list of <session-type> objects.
+The alphabetical order of the files in that directory match the order of the
+elements in SESSIONS."
(define builder
#~(begin
+ (use-modules (srfi srfi-1)
+ (ice-9 format))
+
(mkdir #$output)
(chdir #$output)
- (for-each (lambda (name executable)
- (let ((file (string-append (string-downcase name)
- ".desktop")))
- (call-with-output-file file
- (lambda (port)
- (format port "[Desktop Entry]
+ (fold (lambda (name executable number)
+ ;; Create file names such that the order of the items in
+ ;; SESSION is respected. SLiM gets them in lexicographic
+ ;; order and uses the first one as the default session.
+ (let ((file (format #f "~2,'0d-~a.desktop"
+ number (string-downcase name))))
+ (call-with-output-file file
+ (lambda (port)
+ (format port "[Desktop Entry]
Name=~a
Exec=~a
Type=Application~%"
- name executable)))))
- '#$(map session-type-name sessions)
- (list #$@(map session-type-executable sessions)))))
+ name executable)))
+ (+ 1 number)))
+ 1
+ '#$(map session-type-name sessions)
+ (list #$@(map session-type-executable sessions)))))
(gexp->derivation "xsessions-dir" builder))
@@ -260,7 +270,8 @@ theme to use. In that case, @var{theme-name} specifies the name of the
theme.
Last, @var{session} is a list of @code{<session-type>} objects denoting the
-available session types that can be chosen from the log-in screen."
+available session types that can be chosen from the log-in screen. The first
+one is chosen by default."
(define (slim.cfg)
(mlet %store-monad ((startx (or startx (xorg-start-command)))
@@ -278,6 +289,7 @@ authfile /var/run/slim.auth
# of the names specified in the 'sessions' setting: 'wmaker', 'xfce', etc.
login_cmd exec " xinitrc " %session
sessiondir " sessiondir "
+session_msg session (F1 to change):
halt_cmd " dmd "/sbin/halt
reboot_cmd " dmd "/sbin/reboot