keybinds: add movegroupwindow
This commit is contained in:
parent
d3a644d81c
commit
9f7382bca4
4 changed files with 54 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ struct SKeybind {
|
|||
bool shadowed = false;
|
||||
};
|
||||
|
||||
enum eFocusWindowMode {
|
||||
enum eFocusWindowMode
|
||||
{
|
||||
MODE_CLASS_REGEX = 0,
|
||||
MODE_TITLE_REGEX,
|
||||
MODE_ADDRESS,
|
||||
|
|
@ -144,6 +145,7 @@ class CKeybindManager {
|
|||
static void lockActiveGroup(std::string);
|
||||
static void moveIntoGroup(std::string);
|
||||
static void moveOutOfGroup(std::string);
|
||||
static void moveGroupWindow(std::string);
|
||||
static void global(std::string);
|
||||
|
||||
friend class CCompositor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue