diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-13 17:55:20 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-13 17:55:25 +0200 |
| commit | 9f7382bca4ddc6617b0524645335723763c55302 (patch) | |
| tree | c0ab10b02cd54a197bfe344ae96b0752183cbda5 /src/managers/KeybindManager.cpp | |
| parent | d3a644d81cede9bfa7c12ddc023b9ca2d69fca3c (diff) | |
keybinds: add movegroupwindow
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 246472dc..800bf815 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -32,6 +32,7 @@ CKeybindManager::CKeybindManager() { m_mDispatchers["centerwindow"] = centerWindow; m_mDispatchers["togglegroup"] = toggleGroup; m_mDispatchers["changegroupactive"] = changeGroupActive; + m_mDispatchers["movegroupwindow"] = moveGroupWindow; m_mDispatchers["togglesplit"] = toggleSplit; m_mDispatchers["splitratio"] = alterSplitRatio; m_mDispatchers["focusmonitor"] = focusMonitor; @@ -2076,3 +2077,12 @@ void CKeybindManager::global(std::string args) { g_pProtocolManager->m_pGlobalShortcutsProtocolManager->sendGlobalShortcutEvent(APPID, NAME, g_pKeybindManager->m_iPassPressed); } + +void CKeybindManager::moveGroupWindow(std::string args) { + const auto BACK = args == "b" || args == "prev"; + + if (!g_pCompositor->m_pLastWindow || !g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow) + return; + + g_pCompositor->m_pLastWindow->switchWithWindowInGroup(BACK ? g_pCompositor->m_pLastWindow->getGroupPrevious() : g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow); +} |
