diff --git a/modules/applications/noctalia/home.nix b/modules/applications/noctalia/home.nix index 0005a82..abea2f8 100644 --- a/modules/applications/noctalia/home.nix +++ b/modules/applications/noctalia/home.nix @@ -13,15 +13,6 @@ let --replace-fail "@codexbarPath@" "${lib.getExe codexbar}" ''; - noctaliaPatched = - inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs - (oldAttrs: { - patches = (oldAttrs.patches or [ ]) ++ [ - ./patches/window-switcher-labwc.patch - ./patches/taskbar-overview-hook.patch - ]; - }); - wallpapers = pkgs.fetchFromGitHub { owner = "moons-14"; repo = "wallpapers"; @@ -51,7 +42,7 @@ in programs.noctalia = { enable = true; - package = noctaliaPatched; + package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default; systemd.enable = true; diff --git a/modules/applications/noctalia/meta.nix b/modules/applications/noctalia/meta.nix index 131b11b..333fc78 100644 --- a/modules/applications/noctalia/meta.nix +++ b/modules/applications/noctalia/meta.nix @@ -2,10 +2,6 @@ { description = "Noctalia Wayland desktop shell"; - includes = [ - "applications.window-overview" - ]; - imports = { nixos = [ inputs.noctalia.nixosModules.default ]; home = [ inputs.noctalia.homeModules.default ]; diff --git a/modules/applications/noctalia/patches/taskbar-overview-hook.patch b/modules/applications/noctalia/patches/taskbar-overview-hook.patch deleted file mode 100644 index c0f85cf..0000000 --- a/modules/applications/noctalia/patches/taskbar-overview-hook.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/src/shell/bar/widgets/taskbar_widget.cpp b/src/shell/bar/widgets/taskbar_widget.cpp ---- a/src/shell/bar/widgets/taskbar_widget.cpp -+++ b/src/shell/bar/widgets/taskbar_widget.cpp -@@ -5,6 +5,7 @@ - #include "compositors/workspace_backend.h" - #include "config/config_service.h" - #include "core/deferred_call.h" -+#include "core/process/process.h" - #include "i18n/i18n.h" - #include "render/core/color.h" - #include "render/core/renderer.h" -@@ -36,6 +37,18 @@ - - namespace { - -+ [[nodiscard]] bool launchTaskbarOverview(const std::string& appId) { -+ constexpr const char* command = "window-overview"; -+ if (appId.empty() || !process::commandExists(command)) { -+ return false; -+ } -+ return process::runAsync({ -+ command, -+ "--app-id", -+ appId.c_str(), -+ }); -+ } -+ - // Integer centering; optional odd spare pixel on the end side (right/bottom). - [[nodiscard]] float centeredOffset(float extent, float content, float inset = 0.0F, bool oddSpareOnEnd = true) { - const float inner = std::max(0.0F, extent - inset * 2.0F); -@@ -373,6 +386,10 @@ void TaskbarWidget::activateOrLaunchPinned(const TaskModel& task) { - return; - } - -+ if (!windows[0].appId.empty() && launchTaskbarOverview(windows[0].appId)) { -+ return; -+ } -+ - const std::string cycleKey = !task.desktopEntryId.empty() ? task.desktopEntryId : task.idLower; - std::size_t& cursor = m_groupedAppCycleCursor[cycleKey]; - if (cursor >= windows.size()) { diff --git a/modules/applications/noctalia/patches/window-switcher-labwc.patch b/modules/applications/noctalia/patches/window-switcher-labwc.patch deleted file mode 100644 index 5eefdcc..0000000 --- a/modules/applications/noctalia/patches/window-switcher-labwc.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/shell/switcher/window_switcher.cpp b/src/shell/switcher/window_switcher.cpp ---- a/src/shell/switcher/window_switcher.cpp -+++ b/src/shell/switcher/window_switcher.cpp -@@ -286,12 +286,19 @@ indexLiveToplevelsByWindowId(const CompositorPlatform& platform, std::unordered_ - continue; - } - -- const auto mappedId = platform.compositorWindowIdForToplevelInfo(info); -- if (!mappedId.has_value() || mappedId->empty()) { -- continue; -+ std::string key; -+ if (const auto mappedId = platform.compositorWindowIdForToplevelInfo(info); -+ mappedId.has_value() && !mappedId->empty()) { -+ key = canonicalWindowId(*mappedId); - } -- const std::string key = canonicalWindowId(*mappedId); -+ -+ // Generic wlroots compositors such as labwc do not provide a -+ // compositor-specific window ID. The wlr toplevel handle is stable -+ // for the lifetime of the window and is sufficient for switcher identity. -+ if (key.empty() && wlrHandle != 0) { -+ key = "toplevel:" + std::to_string(wlrHandle); -+ } - if (key.empty()) { - continue; - }