Skip to content

Commit 4fb8a5d

Browse files
committed
fix workspaces for my multi-monitor setup
1 parent 64ad424 commit 4fb8a5d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

config/data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def load_config():
8484
BAR_WORKSPACE_USE_CHINESE_NUMERALS = config.get("bar_workspace_use_chinese_numerals", DEFAULTS["bar_workspace_use_chinese_numerals"])
8585
BAR_HIDE_SPECIAL_WORKSPACE = config.get("bar_hide_special_workspace", DEFAULTS["bar_hide_special_workspace"])
8686
BAR_WORKSPACE_ICONS = config.get("bar_workspace_icons", {})
87+
BAR_WORKSPACE_START = config.get("bar_workspace_start", DEFAULTS["bar_workspace_start"])
88+
BAR_WORKSPACE_END = config.get("bar_workspace_end", DEFAULTS["bar_workspace_end"])
8789
BAR_THEME = config.get("bar_theme", DEFAULTS["bar_theme"])
8890
DOCK_THEME = config.get("dock_theme", DEFAULTS["dock_theme"])
8991
PANEL_THEME = config.get("panel_theme", DEFAULTS["panel_theme"])

config/settings_constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
"dock_enabled": True,
6565
"dock_icon_size": 28,
6666
"dock_always_occluded": False,
67+
"bar_workspace_start": 1,
68+
"bar_workspace_end": 8,
6769
"bar_workspace_show_number": False,
6870
"bar_workspace_use_chinese_numerals": False,
6971
"bar_hide_special_workspace": True, # Toggle (Hide/Show) special workspace

modules/bar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ def __init__(self, monitor_id: int = 0, **kwargs):
121121

122122
# Calculate workspace range based on monitor_id
123123
# Monitor 0: workspaces 1-10, Monitor 1: workspaces 11-20, etc.
124-
start_workspace = self.monitor_id * 10 + 1
125-
end_workspace = start_workspace + 10
126-
workspace_range = range(start_workspace, end_workspace)
124+
start_workspace = data.BAR_WORKSPACE_START
125+
end_workspace = data.BAR_WORKSPACE_END
126+
workspace_range = range(start_workspace, end_workspace + 1)
127127

128128
self.workspaces = Workspaces(
129129
name="workspaces",

0 commit comments

Comments
 (0)