aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/desktop/Workspace.cpp
diff options
context:
space:
mode:
authorstaz <[email protected]>2024-04-06 19:53:32 +0500
committerGitHub <[email protected]>2024-04-06 15:53:32 +0100
commit1596e2d1f7db76c4a367a6beb814d79db019d8d2 (patch)
treef16ca929542de890e66501417a88741393df4e3f /src/desktop/Workspace.cpp
parent6cea710ac8e966366763b9609895dcef7fdb5bcb (diff)
downloadHyprland-1596e2d1f7db76c4a367a6beb814d79db019d8d2.tar.gz
Hyprland-1596e2d1f7db76c4a367a6beb814d79db019d8d2.zip
workspacerules: add back on-created-empty functionality (#5452)
* workspacerules: add back on-created-empty functionality * clang format * workspacerules: spawn on-created-empty window while initializing CWorkspace * clang format * configManager: fix typo --------- Co-authored-by: Your Name <[email protected]>
Diffstat (limited to 'src/desktop/Workspace.cpp')
-rw-r--r--src/desktop/Workspace.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp
index 7146e13d..734b7c8e 100644
--- a/src/desktop/Workspace.cpp
+++ b/src/desktop/Workspace.cpp
@@ -44,6 +44,9 @@ void CWorkspace::init(PHLWORKSPACE self) {
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(self);
m_bPersistent = WORKSPACERULE.isPersistent;
+ if (auto cmd = WORKSPACERULE.onCreatedEmptyRunCmd)
+ g_pKeybindManager->spawn(*cmd);
+
g_pEventManager->postEvent({"createworkspace", m_szName});
g_pEventManager->postEvent({"createworkspacev2", std::format("{},{}", m_iID, m_szName)});
EMIT_HOOK_EVENT("createWorkspace", this);