Added pseudotiling

This commit is contained in:
vaxerski
2022-04-02 20:04:32 +02:00
parent 7add082217
commit 3f99dad7f5
9 changed files with 82 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t
else if (k.handler == "workspace") { changeworkspace(k.arg); }
else if (k.handler == "fullscreen") { fullscreenActive(k.arg); }
else if (k.handler == "movetoworkspace") { moveActiveToWorkspace(k.arg); }
else if (k.handler == "pseudo") { toggleActivePseudo(k.arg); }
found = true;
}
@@ -114,6 +115,17 @@ void CKeybindManager::toggleActiveFloating(std::string args) {
}
}
void CKeybindManager::toggleActivePseudo(std::string args) {
const auto ACTIVEWINDOW = g_pCompositor->m_pLastWindow;
if (!g_pCompositor->windowValidMapped(ACTIVEWINDOW))
return;
ACTIVEWINDOW->m_bIsPseudotiled = !ACTIVEWINDOW->m_bIsPseudotiled;
g_pLayoutManager->getCurrentLayout()->recalculateWindow(ACTIVEWINDOW);
}
void CKeybindManager::changeworkspace(std::string args) {
int workspaceToChangeTo = 0;
try {