From 2c54a0a9a174cfc19cde10af123b7c421743fe63 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 28 Sep 2024 15:23:25 +0200 Subject: [PATCH] sway: only import menu prefix if we have plasma --- home/modules/programs/my-sway/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/home/modules/programs/my-sway/default.nix b/home/modules/programs/my-sway/default.nix index 90ee486..d4536f9 100644 --- a/home/modules/programs/my-sway/default.nix +++ b/home/modules/programs/my-sway/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, options, config, ... }: +{ pkgs, lib, options, config, osConfig, ... }: with lib; let cfg = config.programs.my-sway; @@ -129,9 +129,11 @@ in "PATH" # for portals "XDG_DATA_DIRS" # For extra icons "XDG_DATA_HOME" # For extra icons + ] ++ lib.optionals osConfig.services.desktopManager.plasma6.enable [ + "XDG_MENU_PREFIX" ]; - systemd.extraCommands = options.wayland.windowManager.sway.systemd.extraCommands.default ++ [ - "systemctl --user set-environment XDG_MENU_PREFIX=plasma-" + systemd.extraCommands = options.wayland.windowManager.sway.systemd.extraCommands.default + ++ [ "systemctl --user restart xdg-desktop-portal.service" ]; @@ -359,7 +361,9 @@ in eval `gnome-keyring-daemon` export SSH_AUTH_SOCK fi - '' else ""); + '' else "") + lib.optionalString osConfig.services.desktopManager.plasma6.enable '' + export XDG_MENU_PREFIX=plasma- + ''; # Extra wrapperFeatures.base = true; wrapperFeatures.gtk = true;