diff options
author | Victor Kareh <[email protected]> | 2025-07-30 06:45:30 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2025-08-07 15:10:56 -0400 |
commit | b7c75594dc6f44e08e1927ff5024c91a4564b784 (patch) | |
tree | 3ce585ed88525eb8afdfc6bf418e6c12d58ca5b7 /src/core/prefs.c | |
parent | 87aa5feb8790168eb7b2bc890938353116d26594 (diff) | |
download | marco-dynamic-workspaces.tar.bz2 marco-dynamic-workspaces.tar.xz |
Add dynamic workspaces supportdynamic-workspaces
Adds GNOME3-style dynamic workspace management. Workspaces are created
when no empty ones exist and removed when multiple empty workspaces are
present, maintaining exactly one empty workspace at the end.
Fixes #406
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r-- | src/core/prefs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c index 032bba8f..ca832c8b 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -105,6 +105,7 @@ static gboolean raise_on_click = TRUE; static gboolean attach_modal_dialogs = FALSE; static char* current_theme = NULL; static int num_workspaces = 4; +static gboolean dynamic_workspaces = FALSE; static MetaWrapStyle wrap_style = META_WRAP_NONE; static MetaActionTitlebar action_double_click_titlebar = META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE; static MetaActionTitlebar action_middle_click_titlebar = META_ACTION_TITLEBAR_LOWER; @@ -364,6 +365,12 @@ static MetaBoolPreference preferences_bool[] = NULL, /* feature is known but disabled */ FALSE, }, + { "dynamic-workspaces", + KEY_GENERAL_SCHEMA, + META_PREF_DYNAMIC_WORKSPACES, + &dynamic_workspaces, + FALSE, + }, { "disable-workarounds", KEY_GENERAL_SCHEMA, META_PREF_DISABLE_WORKAROUNDS, @@ -1571,6 +1578,12 @@ meta_prefs_get_num_workspaces (void) return num_workspaces; } +gboolean +meta_prefs_get_dynamic_workspaces (void) +{ + return dynamic_workspaces; +} + MetaWrapStyle meta_prefs_get_wrap_style (void) { @@ -1624,6 +1637,9 @@ meta_preference_to_string (MetaPreference pref) case META_PREF_NUM_WORKSPACES: return "NUM_WORKSPACES"; + case META_PREF_DYNAMIC_WORKSPACES: + return "DYNAMIC_WORKSPACES"; + case META_PREF_WRAP_STYLE: return "WRAP_STYLE"; |