COSMIC workspace v2
zcosmic_workspace_manager_v2
This protocol extends `ext-workspace-v1` with addtional requests and events.
The caller should call `get_cosmic_workspace` whenever a new ext workspace is created.
get_cosmic_workspace(cosmic_workspace: new_id<zcosmic_workspace_handle_v2>, workspace: object<ext_workspace_handle_v1>)
Argument | Type | Description |
---|---|---|
cosmic_workspace | new_id<zcosmic_workspace_handle_v2> | |
workspace | object<ext_workspace_handle_v1> |
Request a `zcosmic_workspace_handle_v2` extension object for an existing `ext_workspace_handle_v1`.
If a `zcosmic_workspace_handle_v2` already exists for the `ext_workspace_handle_v1`, this will raise a `workspace_exists` protocol error.
destroy()
This request should be called either when the client will no longer use the `zcosmic_workspace_manager_v2`.
error { workspace_exists }
Argument | Value | Description |
---|---|---|
workspace_exists | 0 | zcosmic_workspace_handle_v2 already exists for ext_workspace_handle_v1 |
zcosmic_workspace_handle_v2
A zcosmic_workspace_handle_v2 object represents a a workspace that handles a group of surfaces.
Each workspace has a name, conveyed to the client with the name event; a list of states, conveyed to the client with the state event; and optionally a set of coordinates, conveyed to the client with the coordinates event. The client may request that the compositor activate or deactivate the workspace.
Each workspace can belong to only a single workspace group. Depepending on the compositor policy, there might be workspaces with the same name in different workspace groups, but these workspaces are still separate (e.g. one of them might be active while the other is not).
destroy()
This request should be called either when the client will no longer use the `zcosmic_workspace_handle_v1`.
rename(name: string)
Argument | Type | Description |
---|---|---|
name | string | new name of the workspace |
Request that this workspace is renamed.
There is no guarantee the workspace will actually be renamed.
set_tiling_state(state: uint<zcosmic_workspace_handle_v2.tiling_state>)
Argument | Type | Description |
---|---|---|
state | uint<zcosmic_workspace_handle_v2.tiling_state> | the new tiling state of the workspace |
Request that this workspace's tiling state is changed.
There is no guarantee the workspace will actually change it's tiling state.
move_before(other_workspace: object<ext_workspace_handle_v1>, axis: uint)
Argument | Type | Description |
---|---|---|
other_workspace | object<ext_workspace_handle_v1> | |
axis | uint |
Move a workspace to be before another workspace along a given axis.
`other_workspace` may be on the same workspace group, or on a different group. If it's a different set, the workspace will also be moved to that group.
`axis` should be a valid index in the coordinates on the workspace group `other_workspace` is on. The workspace will be positioned on the target group to have a coordinate with this component less than the value of the component for `other_workspace`. The exact coordinate values, or how other workspaces are moved to accommodate the workspace, is unspecified.
The request will be ignored if `axis` is invalid or the compositor is otherwise unable to move the workspace.
There is no guarantee the workspace will actually be moved.
move_after(other_workspace: object<ext_workspace_handle_v1>, axis: uint)
Argument | Type | Description |
---|---|---|
other_workspace | object<ext_workspace_handle_v1> | |
axis | uint |
Move a workspace to be after another workspace along a given axis.
See `move_before`.
pin()
Request that this workspace be pinned.
There is no guarantee the workspace will be actually pinned.
unpin()
Request that this workspace be unpinned.
There is no guarantee the workspace will be actually unpinned.
capabilities(capabilities: uint<zcosmic_workspace_handle_v2.workspace_capabilities>)
Argument | Type | Description |
---|---|---|
capabilities | uint<zcosmic_workspace_handle_v2.workspace_capabilities> | capabilities |
This event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for removing workspaces, a button triggering the remove request should not be displayed.
The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for remove will ignore remove requests.
Compositors must send this event once after creation of a `zcosmic_workspace_handle_v2`. When the capabilities change, compositors must send this event again.
tiling_state(state: uint<zcosmic_workspace_handle_v2.tiling_state>)
Argument | Type | Description |
---|---|---|
state | uint<zcosmic_workspace_handle_v2.tiling_state> |
This event is emitted immediately after the zcosmic_workspace_handle_v2 is created and each time the workspace tiling state changes, either because of a compositor action or because of a request in this protocol.
state(state: uint<zcosmic_workspace_handle_v2.state>)
Argument | Type | Description |
---|---|---|
state | uint<zcosmic_workspace_handle_v2.state> |
This event is emitted immediately after the zcosmic_workspace_handle_v2 is created and each time the workspace state changes, either because of a compositor action or because of a request in this protocol.
workspace_capabilities { rename, set_tiling_state, pin, move }
Argument | Value | Description |
---|---|---|
rename | 1 | rename request is available |
set_tiling_state | 2 | set_tiling_state request is available |
pinsince 2 | 3 | pin and unpin requests are available |
movesince 2 | 4 | move_before and move_after requests are available |
tiling_state { floating_only, tiling_enabled }
Argument | Value | Description |
---|---|---|
floating_only | 0 | The workspace has no active tiling properties |
tiling_enabled | 1 | Tiling behavior is enabled for the workspace |
state { pinned }
Argument | Value | Description |
---|---|---|
pinned | 1 | the workspace is pinned |
Compositor Support
Mutter | KWin | Sway | COSMIC | Hyprland | niri | Weston | Labwc | Cage | Wayfire | GameScope | Jay | Mir | Treeland | Louvre | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zcosmic_workspace_manager_v2 | x | x | x | 2 | x | x | x | x | x | x | x | x | x | x | x |
Copyright
Copyright © 2025 System76
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.