From 9716bb8944a38bae80b1003f4258da41b71c75df Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 6 May 2021 15:27:23 +0200 Subject: [PATCH] sway: Set XDG_CURRENT_DESKTOP=sway This seems like a good idea in general and will at least make it easier to get screen sharing to work (but still requires a proper NixOS configuration including xdg-desktop-portal-wlr). Note: It isn't necessary to set XDG_SESSION_TYPE=wayland as wlroots already takes care of it (currently at least for the logind and libseat session backends, the next wlroots release will require libseat): https://github.com/swaywm/wlroots/blob/4839664a9209e2829f3f90006065229b5c17007c/backend/session/session.c#L80 --- pkgs/applications/window-managers/sway/wrapper.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/window-managers/sway/wrapper.nix b/pkgs/applications/window-managers/sway/wrapper.nix index 319023eb2e5..964828fdaba 100644 --- a/pkgs/applications/window-managers/sway/wrapper.nix +++ b/pkgs/applications/window-managers/sway/wrapper.nix @@ -14,6 +14,7 @@ let baseWrapper = writeShellScriptBin "sway" '' set -o errexit if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then + export XDG_CURRENT_DESKTOP=sway ${extraSessionCommands} export _SWAY_WRAPPER_ALREADY_EXECUTED=1 fi