From 1508abd3e13fe30bd90bc11d80b52aa8d8d4596e Mon Sep 17 00:00:00 2001 From: Robin Seger Date: Sun, 15 Mar 2026 07:34:52 +0100 Subject: workspaces: window icons limit (#1267) * workspace window icons display limit * serialization --- modules/bar/components/workspaces/SpecialWorkspaces.qml | 6 +++++- modules/bar/components/workspaces/Workspace.qml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'modules/bar/components/workspaces') diff --git a/modules/bar/components/workspaces/SpecialWorkspaces.qml b/modules/bar/components/workspaces/SpecialWorkspaces.qml index ad85af8..cd3572b 100644 --- a/modules/bar/components/workspaces/SpecialWorkspaces.qml +++ b/modules/bar/components/workspaces/SpecialWorkspaces.qml @@ -224,7 +224,11 @@ Item { Repeater { model: ScriptModel { - values: Hypr.toplevels.values.filter(c => c.workspace?.id === ws.wsId) + values: { + const windows = Hypr.toplevels.values.filter(c => c.workspace?.id === ws.wsId); + const maxIcons = Config.bar.workspaces.maxWindowIcons; + return maxIcons > 0 ? windows.slice(0, maxIcons) : windows; + } } MaterialIcon { diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index 3c8238b..f6e767e 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -87,7 +87,11 @@ ColumnLayout { Repeater { model: ScriptModel { - values: Hypr.toplevels.values.filter(c => c.workspace?.id === root.ws) + values: { + const windows = Hypr.toplevels.values.filter(c => c.workspace?.id === root.ws); + const maxIcons = Config.bar.workspaces.maxWindowIcons; + return maxIcons > 0 ? windows.slice(0, maxIcons) : windows; + } } MaterialIcon { -- cgit v1.2.3-freya