···
Xft.hintstyle: hintslight
30
-
# file provided by services.xserver.displayManager.session.script
31
-
xsession = wm: dm: pkgs.writeScript "xsession"
30
+
# file provided by services.xserver.displayManager.session.wrapper
31
+
xsessionWrapper = pkgs.writeScript "xsession-wrapper"
35
-
# Expected parameters:
36
-
# $1 = <desktop-manager>+<window-manager>
38
-
# Actual parameters (FIXME):
39
-
# SDDM is calling this script like the following:
40
-
# $1 = /nix/store/xxx-xsession (= $0)
41
-
# $2 = <desktop-manager>+<window-manager>
42
-
# SLiM is using the following parameter:
43
-
# $1 = /nix/store/xxx-xsession <desktop-manager>+<window-manager>
44
-
# LightDM keeps the double quotes:
45
-
# $1 = /nix/store/xxx-xsession "<desktop-manager>+<window-manager>"
46
-
# The fake/auto display manager doesn't use any parameters and GDM is
48
-
# If you want to "debug" this script don't print the parameters to stdout
49
-
# or stderr because this script will be executed multiple times and the
50
-
# output won't be visible in the log when the script is executed for the
51
-
# first time (e.g. append them to a file instead)!
53
-
# All of the above cases are handled by the following hack (FIXME).
54
-
# Since this line is *very important* for *all display managers* it is
55
-
# very important to test changes to the following line with all display
57
-
if [ "''${1:0:1}" = "/" ]; then eval exec "$1" "$2" ; fi
59
-
# Now it should be safe to assume that the script was called with the
60
-
# expected parameters.
35
+
# Shared environment setup for graphical sessions.
65
-
# The first argument of this script is the session type.
67
-
if [ "$sessionType" = default ]; then sessionType=""; fi
${optionalString cfg.startDbusSession ''
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
71
-
exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$sessionType"
42
+
exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$@"
${optionalString cfg.displayManager.job.logToJournal ''
if [ -z "$_DID_SYSTEMD_CAT" ]; then
export _DID_SYSTEMD_CAT=1
78
-
exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$sessionType"
49
+
exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$@"
···
${config.systemd.package}/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
75
+
# FIXME: Check XDG_SESSION_TYPE against x11
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
if test -e ~/.Xresources; then
${xorg.xrdb}/bin/xrdb -merge ~/.Xresources
···
# Allow the user to setup a custom session type.
if test -x ~/.xsession; then
110
+
# Run the supplied session command. Remove any double quotes with eval.
136
-
if test "$sessionType" = "custom"; then
137
-
sessionType="" # fall-thru if there is no ~/.xsession
113
+
# Fall back to the default window/desktopManager
114
+
exec ${cfg.displayManager.session.script}
118
+
# file provided by services.xserver.displayManager.session.script
119
+
xsession = wm: dm: pkgs.writeScript "xsession"
121
+
#! ${pkgs.bash}/bin/bash
123
+
# Legacy session script used to construct .desktop files from
124
+
# `services.xserver.displayManager.session` entries. Called from
125
+
# `sessionWrapper`.
127
+
# Expected parameters:
128
+
# $1 = <desktop-manager>+<window-manager>
130
+
# The first argument of this script is the session type.
132
+
if [ "$sessionType" = default ]; then sessionType=""; fi
# The session type is "<desktop-manager>+<window-manager>", so
···
TryExec=${cfg.displayManager.session.script}
Exec=${cfg.displayManager.session.script} "${n}"
197
-
X-GDM-BypassXsession=true
···
(filter (w: d.name != "none" || w.name != "none") wm));
desktops = mkDesktops names;
287
+
wrapper = xsessionWrapper;