summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorKajetan Puchalski <kajetan.puchalski@tuta.io>2023-04-12 13:38:15 +0100
committerGitHub <noreply@github.com>2023-04-12 13:38:15 +0100
commitefee6a1cda278b8589bfe335c66d8fb272027bca (patch)
tree42687c2b9c674974361f95c8a0699e9206dfc648 /src/config/ConfigManager.cpp
parenta68feb5aa09264beee57a88ee85aefb89680db3b (diff)
swallow: Add swallow_exception_regex (#2026)
Currently, if a window class is specified in the swallow_regex (e.g. Kitty) it will swallow every other window spawned by it automatically. Many other WMs implementing this functionality allow for defining exceptions from this rule. For instance, we want Kitty to swallow sxiv or zathura but we do not want Kitty to swallow something like wev. This commit adds an additional regex - swallow_exception_regex where these exceptions can be defined. This regex is then compared against the title of the window about to be swallowed and if it happens to be a match, aborts the swallowing. This works because whenever an application that could be swallowed is launched by a terminal, the class of the terminal remains the same while the title changes to whatever the application's name is, thus letting it be matched against a regex.
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index bf11b1bf..3f26594a 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -82,6 +82,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:disable_autoreload"].intValue = 0;
configValues["misc:enable_swallow"].intValue = 0;
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
+ configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY;
configValues["misc:focus_on_activate"].intValue = 0;
configValues["misc:no_direct_scanout"].intValue = 1;
configValues["misc:hide_cursor_on_touch"].intValue = 1;