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