summaryrefslogtreecommitdiff
path: root/src/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Workspace.cpp3
-rw-r--r--src/desktop/Workspace.hpp5
2 files changed, 4 insertions, 4 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);
diff --git a/src/desktop/Workspace.hpp b/src/desktop/Workspace.hpp
index 26fe38d9..db2fe25e 100644
--- a/src/desktop/Workspace.hpp
+++ b/src/desktop/Workspace.hpp
@@ -58,10 +58,7 @@ class CWorkspace {
// last monitor (used on reconnect)
std::string m_szLastMonitor = "";
- // Whether the user configured command for on-created-empty has been executed, if any
- bool m_bOnCreatedEmptyExecuted = false;
-
- bool m_bPersistent = false;
+ bool m_bPersistent = false;
// Inert: destroyed and invalid. If this is true, release the ptr you have.
bool inert();