From ad28d4171cfeedcb77c390f704ad3060077a3a8f Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 31 Aug 2026 16:53:11 -0400 Subject: [PATCH] added counts --- configs/fwbook/quickshell/ABOUTME.md | 3 ++- configs/fwbook/quickshell/overview/MonitorBar.qml | 7 ++++++- configs/fwbook/quickshell/overview/OverviewWindow.qml | 9 +++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configs/fwbook/quickshell/ABOUTME.md b/configs/fwbook/quickshell/ABOUTME.md index edad8fc..080acc2 100644 --- a/configs/fwbook/quickshell/ABOUTME.md +++ b/configs/fwbook/quickshell/ABOUTME.md @@ -61,7 +61,8 @@ overview/ │ # owns selection state, key handling, and HyprlandFocusGrab ├── MonitorBar.qml # mini-map of clickable per-monitor pills, positioned AND sized │ # proportionally to each monitor's real x/y/resolution (like a -│ # display-arrangement UI); highlights browsedMonitor +│ # display-arrangement UI); highlights browsedMonitor; each pill +│ # shows that monitor's "workspaces/windows" count ├── WorkspaceRow.qml # one workspace = carousel Row of WindowCards + label ├── WindowCard.qml # live ScreencopyView preview + icon/title footer + selection ring └── Theme.qml # plain QtObject with colors/sizes/carousel tuning, instantiated diff --git a/configs/fwbook/quickshell/overview/MonitorBar.qml b/configs/fwbook/quickshell/overview/MonitorBar.qml index c7dfbf7..a7a1e5f 100644 --- a/configs/fwbook/quickshell/overview/MonitorBar.qml +++ b/configs/fwbook/quickshell/overview/MonitorBar.qml @@ -8,6 +8,7 @@ Item { required property var theme required property var monitors + required property var monitorStats required property string focusedMonitorName signal monitorClicked(int index) @@ -67,7 +68,11 @@ Item { width: parent.width - 4 horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight - text: (pill.index + 1) + ": " + pill.modelData.name + text: { + const s = root.monitorStats[pill.index]; + return (pill.index + 1) + ": " + pill.modelData.name + + (s ? " " + s.workspaces + "/" + s.windows : ""); + } color: root.theme.textColor font.pixelSize: Math.max(9, Math.min(11, pill.height * 0.3)) font.bold: pill.active diff --git a/configs/fwbook/quickshell/overview/OverviewWindow.qml b/configs/fwbook/quickshell/overview/OverviewWindow.qml index 8e15c7a..45da7e9 100644 --- a/configs/fwbook/quickshell/overview/OverviewWindow.qml +++ b/configs/fwbook/quickshell/overview/OverviewWindow.qml @@ -115,6 +115,14 @@ PanelWindow { readonly property var sortedMonitors: Hyprland.monitors ? Hyprland.monitors.values.slice().sort((a, b) => a.id - b.id) : [] + // Per-monitor {workspaces, windows} totals for the monitor bar pills. + readonly property var monitorStats: root.sortedMonitors.map(mon => { + const workspaces = Hyprland.workspaces ? Hyprland.workspaces.values + .filter(ws => ws && ws.id > 0 && ws.monitor && ws.monitor.name === mon.name) : []; + const windows = workspaces.reduce((n, ws) => n + (ws.toplevels ? ws.toplevels.values.length : 0), 0); + return { workspaces: workspaces.length, windows: windows }; + }) + // Jump straight to the Nth monitor's overview (0-based), bound to number // keys 1-9 and the monitor bar. function focusMonitorByIndex(i) { @@ -233,6 +241,7 @@ PanelWindow { anchors.horizontalCenter: parent.horizontalCenter theme: root.theme monitors: root.sortedMonitors + monitorStats: root.monitorStats focusedMonitorName: root.browsedMonitor onMonitorClicked: index => root.focusMonitorByIndex(index) }