Add setting Auto Exit Tabbed Tiling Mode

This commit is contained in:
Andrew Kvalheim 2024-05-31 09:18:23 -07:00 committed by Jose Maranan
parent f754af0bd5
commit 529ef4a9d7
3 changed files with 11 additions and 0 deletions

View File

@ -1217,6 +1217,7 @@ export class Tree extends Node {
// If only a single tab remains, exit tabbed layout
if (
this.settings.get_boolean("auto-exit-tabbed") &&
parentNode.nodeType === NODE_TYPES.CON &&
parentNode.layout === LAYOUT_TYPES.TABBED &&
parentNode.childNodes.length === 1

View File

@ -119,6 +119,12 @@ export class SettingsPage extends PreferencesPage {
{ id: "stacked", name: _("Stacked") },
],
}),
new SwitchRow({
title: _("Auto Exit Tabbed Tiling Mode"),
subtitle: _("Exit tabbed tiling mode when only a single tab remains"),
settings,
bind: "auto-exit-tabbed",
}),
new SwitchRow({
title: _("Auto Split"),
subtitle: _("Quarter Tiling"),

View File

@ -127,6 +127,10 @@
<default>true</default>
<summary>Floating windows toggle always-on-top</summary>
</key>
<key type="b" name="auto-exit-tabbed">
<default>true</default>
<summary>Exit tabbed tiling mode when only a single tab remains</summary>
</key>
<key type="b" name="auto-split-enabled">
<default>true</default>
<summary>Enable auto split or quarter-tiling based based on smaller side</summary>