Skip to main content

jay_config/
workspace.rs

1//! Tools for configuring workspaces.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// How workspaces should be ordered in the UI.
7#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
8pub enum WorkspaceDisplayOrder {
9    /// Workspaces are not sorted and can be manually dragged.
10    Manual,
11    /// Workspaces are sorted alphabetically and cannot be manually dragged.
12    Sorted,
13}
14
15/// Sets how workspaces should be ordered in the UI.
16///
17/// The default is `WorkspaceDisplayOrder::Manual`.
18pub fn set_workspace_display_order(order: WorkspaceDisplayOrder) {
19    get!().set_workspace_display_order(order);
20}