forked from mirrors/nixpkgs
services.xserver.windowManager.session: handle duplicate names (#37690)
This commit is contained in:
parent
37a45e5a97
commit
2413fcdfeb
|
@ -27,6 +27,15 @@ let
|
|||
Xft.hintstyle: hintslight
|
||||
'';
|
||||
|
||||
mkCases = session:
|
||||
concatStrings (
|
||||
mapAttrsToList (name: starts: ''
|
||||
(${name})
|
||||
${concatMapStringsSep "\n " (n: n.start) starts}
|
||||
;;
|
||||
'') (lib.groupBy (n: n.name) session)
|
||||
);
|
||||
|
||||
# file provided by services.xserver.displayManager.session.wrapper
|
||||
xsessionWrapper = pkgs.writeScript "xsession-wrapper"
|
||||
''
|
||||
|
@ -139,21 +148,13 @@ let
|
|||
|
||||
# Start the window manager.
|
||||
case "$windowManager" in
|
||||
${concatMapStrings (s: ''
|
||||
(${s.name})
|
||||
${s.start}
|
||||
;;
|
||||
'') wm}
|
||||
${mkCases wm}
|
||||
(*) echo "$0: Window manager '$windowManager' not found.";;
|
||||
esac
|
||||
|
||||
# Start the desktop manager.
|
||||
case "$desktopManager" in
|
||||
${concatMapStrings (s: ''
|
||||
(${s.name})
|
||||
${s.start}
|
||||
;;
|
||||
'') dm}
|
||||
${mkCases dm}
|
||||
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue