config: workspace display order
This commit is contained in:
parent
40328d7c4a
commit
e570152dde
17 changed files with 237 additions and 11 deletions
19
jay-config/src/workspace.rs
Normal file
19
jay-config/src/workspace.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//! Tools for configuring workspaces.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// How workspaces should be ordered in the UI.
|
||||
#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
pub enum WorkspaceDisplayOrder {
|
||||
/// Workspaces are not sorted and can be manually dragged.
|
||||
Manual,
|
||||
/// Workspaces are sorted alphabetically and cannot be manually dragged.
|
||||
Sorted,
|
||||
}
|
||||
|
||||
/// Sets how workspaces should be ordered in the UI.
|
||||
///
|
||||
/// The default is `WorkspaceDisplayOrder::Manual`.
|
||||
pub fn set_workspace_display_order(order: WorkspaceDisplayOrder) {
|
||||
get!().set_workspace_display_order(order);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue