From 06f1f1e9ea17d4229ebe2f659a969e0852fb4a9f Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 15 Feb 2024 14:38:54 +0000 Subject: [PATCH] sway: give SWAYSOCK a consistent name --- hosts/modules/gui/sway/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/modules/gui/sway/default.nix b/hosts/modules/gui/sway/default.nix index 0b06bd3b..77e9d3a9 100644 --- a/hosts/modules/gui/sway/default.nix +++ b/hosts/modules/gui/sway/default.nix @@ -38,7 +38,12 @@ let extraOptions = [ # "--debug" ]; - extraSessionCommands = ""; + extraSessionCommands = '' + # sway defaults to auto-generating a unix domain socket named "sway-ipc.$UID.NNNN.sock", + # which allows for multiple sway sessions under the same user. + # but the unpredictability makes static sandboxing & such difficult, so hardcode it: + export SWAYSOCK="$XDG_RUNTIME_DIR/sway-ipc.sock" + ''; # withBaseWrapper sets XDG_CURRENT_DESKTOP=sway # and makes sure that sway is launched dbus-run-session. withBaseWrapper = true;