mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 10:43:40 +01:00
autotile: allow defining workspaces where autotiling isn't enabled
This commit is contained in:
parent
5b91b0e151
commit
95d7fdb67c
2 changed files with 9 additions and 1 deletions
|
@ -1751,5 +1751,12 @@ void Hy3Layout::updateAtWorkspaces() {
|
|||
}
|
||||
|
||||
bool Hy3Layout::shouldAtWorkspace(int workspace_id) {
|
||||
return this->at_workspaces.empty() || this->at_workspaces.contains(workspace_id);
|
||||
static const auto* at_workspaces_except
|
||||
= &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:workspaces.except")->intValue;
|
||||
|
||||
if (*at_workspaces_except) {
|
||||
return !this->at_workspaces.empty() && !this->at_workspaces.contains(workspace_id);
|
||||
} else {
|
||||
return this->at_workspaces.empty() || this->at_workspaces.contains(workspace_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
|||
CONF("autotile:trigger_height", int, 0);
|
||||
CONF("autotile:trigger_width", int, 0);
|
||||
CONF("autotile:workspaces", str, "all");
|
||||
CONF("autotile:workspaces.except", int, 0);
|
||||
|
||||
#undef CONF
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue