diff --git a/flake.nix b/flake.nix index 7bb17a4..0b38baf 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ forHyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system}); in { packages = forHyprlandSystems (system: pkgs: rec { - split-monitor-workspaces = pkgs.gcc13Stdenv.mkDerivation { + split-monitor-workspaces = hyprland.packages.${system}.hyprland.stdenv.mkDerivation { pname = "split-monitor-workspaces"; version = "0.1"; src = nix-filter.lib { diff --git a/hyprpm.toml b/hyprpm.toml index e6bd813..baa59ce 100644 --- a/hyprpm.toml +++ b/hyprpm.toml @@ -12,7 +12,10 @@ commit_pins = [ ["9a09eac79b85c846e3a865a9078a3f8ff65a9259", "625f3f730cb392a5005144051bd9dcb25525fea0"], # 0.42.0 ["0f594732b063a90d44df8c5d402d658f27471dfe", "b6bc0c26c8ad9e08f5f29249f8511e6f01e92e09"], # 0.43.0 ["0c7a7e2d569eeed9d6025f3eef4ea0690d90845d", "212b2e0a4d94bb05ebf32dadca8e9e5ce528735e"], # 0.44.0 - ["4520b30d498daca8079365bdb909a8dea38e8d55", "7c0cec6e8661facf252b2c974f214b60c4f87466"] # 0.44.1 + ["4520b30d498daca8079365bdb909a8dea38e8d55", "7c0cec6e8661facf252b2c974f214b60c4f87466"], # 0.44.1 + ["a425fbebe4cf4238e48a42f724ef2208959d66cf", "131bc5bd02d7f558a66d1a6c4d0013d8545823e0"], # 0.45.0 + ["500d2a3580388afc8b620b0a3624147faa34f98b", "131bc5bd02d7f558a66d1a6c4d0013d8545823e0"], # 0.45.1 + ["12f9a0d0b93f691d4d9923716557154d74777b0a", "131bc5bd02d7f558a66d1a6c4d0013d8545823e0"] # 0.45.2 ] [split-monitor-workspaces] diff --git a/src/main.cpp b/src/main.cpp index 00c35e8..8636591 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,7 +18,7 @@ auto constexpr k_keepFocused = "plugin:split-monitor-workspaces:keep_focused"; auto constexpr k_enableNotifications = "plugin:split-monitor-workspaces:enable_notifications"; auto constexpr k_enablePersistentWorkspaces = "plugin:split-monitor-workspaces:enable_persistent_workspaces"; -const CColor s_pluginColor = {0x61 / 255.0F, 0xAF / 255.0F, 0xEF / 255.0F, 1.0F}; +const CHyprColor s_pluginColor = {0x61 / 255.0F, 0xAF / 255.0F, 0xEF / 255.0F, 1.0F}; bool g_enableNotifications = false; bool g_enablePersistentWorkspaces = true; bool g_keepFocused = false; @@ -71,7 +71,7 @@ const std::string& getWorkspaceFromMonitor(const PHLMONITOR& monitor, const std: for (const auto& workspaceName : g_vMonitorWorkspaceMap[monitor->ID]) { PHLWORKSPACE workspacePtr = g_pCompositor->getWorkspaceByName(workspaceName); // the workspace we want is either not yet created (=nullptr) or already created but empty (!= nullptr but no windows) - if (workspacePtr == nullptr || g_pCompositor->getWindowsOnWorkspace(workspacePtr->m_iID) == 0) { + if (workspacePtr == nullptr || workspacePtr->getWindows() == 0) { return workspaceName; } }