mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-12 10:35:46 -07:00
add general:allow_workspace_cycles option
This commit is contained in:
@@ -35,6 +35,7 @@ void CConfigManager::setDefaultVars() {
|
|||||||
configValues["general:main_mod"].strValue = "SUPER"; // exposed to the user for easier configuring
|
configValues["general:main_mod"].strValue = "SUPER"; // exposed to the user for easier configuring
|
||||||
configValues["general:main_mod_internal"].intValue = g_pKeybindManager->stringToModMask("SUPER"); // actually used and automatically calculated
|
configValues["general:main_mod_internal"].intValue = g_pKeybindManager->stringToModMask("SUPER"); // actually used and automatically calculated
|
||||||
configValues["general:workspace_back_and_forth"].intValue = 0;
|
configValues["general:workspace_back_and_forth"].intValue = 0;
|
||||||
|
configValues["general:allow_workspace_cycles"].intValue = 0;
|
||||||
|
|
||||||
configValues["general:damage_tracking"].strValue = "full";
|
configValues["general:damage_tracking"].strValue = "full";
|
||||||
configValues["general:damage_tracking_internal"].intValue = DAMAGE_TRACKING_FULL;
|
configValues["general:damage_tracking_internal"].intValue = DAMAGE_TRACKING_FULL;
|
||||||
|
@@ -476,7 +476,9 @@ void CKeybindManager::changeworkspace(std::string args) {
|
|||||||
workspaceToChangeTo = P_CURRENT_WORKSPACE->m_iPrevWorkspaceID;
|
workspaceToChangeTo = P_CURRENT_WORKSPACE->m_iPrevWorkspaceID;
|
||||||
isSwitchingToPrevious = true;
|
isSwitchingToPrevious = true;
|
||||||
|
|
||||||
// TODO: Add support for cycles
|
// If the previous workspace ID isn't reset, cycles can form when continually going
|
||||||
|
// to the previous workspace again and again.
|
||||||
|
if (!g_pConfigManager->getConfigValuePtr("general:allow_workspace_cycles")->intValue)
|
||||||
P_CURRENT_WORKSPACE->m_iPrevWorkspaceID = -1;
|
P_CURRENT_WORKSPACE->m_iPrevWorkspaceID = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -499,7 +501,9 @@ void CKeybindManager::changeworkspace(std::string args) {
|
|||||||
workspaceToChangeTo = P_CURRENT_WORKSPACE->m_iPrevWorkspaceID;
|
workspaceToChangeTo = P_CURRENT_WORKSPACE->m_iPrevWorkspaceID;
|
||||||
isSwitchingToPrevious = true;
|
isSwitchingToPrevious = true;
|
||||||
|
|
||||||
// TODO: Add support for cycles
|
// If the previous workspace ID isn't reset, cycles can form when continually going
|
||||||
|
// to the previous workspace again and again.
|
||||||
|
if (!g_pConfigManager->getConfigValuePtr("general:allow_workspace_cycles")->intValue)
|
||||||
P_CURRENT_WORKSPACE->m_iPrevWorkspaceID = -1;
|
P_CURRENT_WORKSPACE->m_iPrevWorkspaceID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user