From 826dc61e5cfe292a9967bd4397dcff37672fc194 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Mon, 8 May 2023 15:37:59 +0200 Subject: Add "next on monitor or empty" workspace parameter (#2198) * Add "next on monitor or empty" workspace parameter Implements the following workspace parameter: r+x/r-x (i.e. r+1): Behaves similar to the "m" parameter, but can also select empty workspaces and it doesn't wrap around * Improve code comments * Implementation V2 for 'r' workspace param * Rebase to upstream Should fix CI * Always set outName * Include named workspaces Currently only considers open/active named workspaces --- src/config/ConfigManager.cpp | 4 ++++ src/config/ConfigManager.hpp | 1 + 2 files changed, 5 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 04764779..27b42171 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2026,6 +2026,10 @@ std::string CConfigManager::getBoundMonitorStringForWS(const std::string& wsname return ""; } +const std::deque& CConfigManager::getAllWorkspaceRules() { + return m_dWorkspaceRules; +} + void CConfigManager::addExecRule(const SExecRequestedRule& rule) { execRequestedRules.push_back(rule); } diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 4b4e3b4b..1d35e9dd 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -180,6 +180,7 @@ class CConfigManager { CMonitor* getBoundMonitorForWS(const std::string&); std::string getBoundMonitorStringForWS(const std::string&); + const std::deque& getAllWorkspaceRules(); std::vector getMatchingRules(CWindow*); std::vector getMatchingRules(SLayerSurface*); -- cgit v1.2.3