From 3c20ab171f6887a5dcdfdbb12d18d4ffb5db502c Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 19 Oct 2024 09:59:02 +0800 Subject: [PATCH] nixos/xfce: Use upstream name for X11 session This allows keeping the name consistent with the wayland session we are introducing later. --- nixos/modules/services/x11/desktop-managers/xfce.nix | 1 + nixos/modules/services/x11/display-managers/default.nix | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix index 8810b5f8c8b0..bc3ef54a061e 100644 --- a/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -144,6 +144,7 @@ in services.xserver.desktopManager.session = [{ name = "xfce"; + prettyName = "Xfce Session"; desktopNames = [ "XFCE" ]; bgSupport = !cfg.noDesktop; start = '' diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 87331a6658d3..7b8c8a661c95 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -279,6 +279,11 @@ in lib.mapCartesianProduct ({dm, wm}: let sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}"; + prettyName = + if dm.name != "none" then + "${dm.prettyName or dm.name}${optionalString (wm.name != "none") (" (" + (wm.prettyName or wm.name) + ")")}" + else + (wm.prettyName or wm.name); script = xsession dm wm; desktopNames = if dm ? desktopNames then lib.concatStringsSep ";" dm.desktopNames @@ -297,7 +302,7 @@ in Type=XSession TryExec=${script} Exec=${script} - Name=${sessionName} + Name=${prettyName} DesktopNames=${desktopNames} ''; } // {