Skip to content

Commit

Permalink
feat: Load all windows and expose them
Browse files Browse the repository at this point in the history
  • Loading branch information
veryard committed Nov 12, 2024
1 parent 730c97e commit b1e7acc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ No config options.
| `currentWorkspaces` | Workspaces on the current monitor. | `Workspace[]` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `allWorkspaces` | Workspaces across all monitors. | `Workspace[]` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `allMonitors` | All monitors. | `Monitor[]` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `allWindows` | All windows. | `Window[]` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `focusedMonitor` | Monitor that currently has focus. | `Monitor` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `currentMonitor` | Monitor that is nearest to this Zebar widget. | `Monitor` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
| `focusedContainer` | Container that currently has focus (on any monitor). | `Container` | <img src="https://github.com/glzr-io/zebar/assets/34844898/568e90c8-cd32-49a5-a17f-ab233d41f1aa" alt="microsoft icon" width="24"> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export function createGlazeWmProvider(
};

const { monitors: glazeWmMonitors } = await client.queryMonitors();
const { windows: glazeWmWindows } = await client.queryWindows();

// Get GlazeWM monitor that corresponds to the widget's monitor.
const currentGlazeWmMonitor = glazeWmMonitors.reduce((a, b) =>
Expand Down Expand Up @@ -169,6 +170,7 @@ export function createGlazeWmProvider(
focusedMonitor: focusedGlazeWmMonitor!,
currentMonitor: currentGlazeWmMonitor,
allMonitors: glazeWmMonitors,
allWindows: glazeWmWindows,
};
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export interface GlazeWmOutput {
*/
allMonitors: Monitor[];

/**
* All windows.
*/
allWindows: Window[];

/**
* Monitor that currently has focus.
*/
Expand Down

0 comments on commit b1e7acc

Please sign in to comment.