Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer authored Dec 14, 2024
2 parents 50876e1 + c91a7bb commit 486c8ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion hyprpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 486c8ad

Please sign in to comment.