Skip to content

hyprland/ipc: expose specialWorkspace on HyprlandMonitor - #1422

Open
soramanew wants to merge 4 commits into
quickshell-mirror:masterfrom
soramanew:feat/expose-monitor-special-ws
Open

soramanew wants to merge 4 commits into
quickshell-mirror:masterfrom
soramanew:feat/expose-monitor-special-ws

Conversation

@soramanew

Copy link
Copy Markdown
Contributor

Describe your changes

Adds a specialWorkspace property to HyprlandMonitor. This is basically the same as activeWorkspace, but for the open special workspace. It is null if there is no open special workspace.

Details and descisions

The special workspace is gotten via the activespecialv2 Hyprland event. This is pretty much a mirror of the activeWorkspace logic (it actually is exactly the same, aside from the property and source, so I created some shared helpers).

@dxnnv dxnnv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there's now activeWorkspace and specialWorkspace, monitor.*Workspace.active could be changed so it evaluates to "the workspace currently shown on the monitor". Otherwise, active is always false on specialWorkspace, so the property just means "is this monitor.activeWorkspace?" (which is redundant on monitor.specialWorkspace). This is more of a question on what callers should understand workspace.active to mean though; it would be a change to the existing API, so that's up to fox.

Anyways, FWIW the PR itself LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants