From be1fa77c6e3a26286bb9a54c02e491cbe639df20 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 13 May 2026 13:35:23 -0700 Subject: [PATCH] niri: propagate XDG_CURRENT_DESKTOP to systemd-user and dbus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The niri 'environment' block only affects processes niri spawns directly. Apps launched via dbus activation or systemd-user (most .desktop launches go through one of these) get systemd-user's env, which still has bare 'niri' — set by niri-session BEFORE niri itself runs. Adding a one-shot spawn-at-startup that re-imports XDG_CURRENT_DESKTOP from niri's env into both systemd-user and dbus-activation, after niri starts. Future dbus-activated apps will see niri:GNOME. Co-Authored-By: Claude Opus 4.7 (1M context) --- niri/config.kdl | 1 + 1 file changed, 1 insertion(+) diff --git a/niri/config.kdl b/niri/config.kdl index 72f0460..0ea1fda 100644 --- a/niri/config.kdl +++ b/niri/config.kdl @@ -35,6 +35,7 @@ environment { XDG_CURRENT_DESKTOP "niri:GNOME" } +spawn-at-startup "sh" "-c" "systemctl --user import-environment XDG_CURRENT_DESKTOP && dbus-update-activation-environment XDG_CURRENT_DESKTOP" spawn-at-startup "waybar" spawn-at-startup "mako" spawn-at-startup "awww-daemon"