Skip to content

Commit

Permalink
feat: dispatchers, add hidespecialworkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartkk0 committed Jul 13, 2024
1 parent f85c641 commit 4e79e83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/managers/KeybindManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ CKeybindManager::CKeybindManager() {
m_mDispatchers["focusworkspaceoncurrentmonitor"] = focusWorkspaceOnCurrentMonitor;
m_mDispatchers["moveworkspacetomonitor"] = moveWorkspaceToMonitor;
m_mDispatchers["togglespecialworkspace"] = toggleSpecialWorkspace;
m_mDispatchers["hidespecialworkspace"] = hideSpecialWorkspace;
m_mDispatchers["forcerendererreload"] = forceRendererReload;
m_mDispatchers["resizeactive"] = resizeActive;
m_mDispatchers["moveactive"] = moveActive;
Expand Down Expand Up @@ -1796,6 +1797,11 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
}
}

void CKeybindManager::hideSpecialWorkspace(std::string args) {
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
PMONITOR->setSpecialWorkspace(nullptr);
}

void CKeybindManager::forceRendererReload(std::string args) {
bool overAgain = false;

Expand Down
1 change: 1 addition & 0 deletions src/managers/KeybindManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class CKeybindManager {
static void moveWorkspaceToMonitor(std::string);
static void focusWorkspaceOnCurrentMonitor(std::string);
static void toggleSpecialWorkspace(std::string);
static void hideSpecialWorkspace(std::string);
static void forceRendererReload(std::string);
static void resizeActive(std::string);
static void moveActive(std::string);
Expand Down

0 comments on commit 4e79e83

Please sign in to comment.