[][src]Function penrose::contrib::actions::create_or_switch_to_workspace

pub fn create_or_switch_to_workspace<X: XConn>(
    get_name: fn() -> Option<String>,
    layouts: Vec<Layout>
) -> KeyEventHandler<X>

Jump to, or create, a Workspace

Call 'get_name' to obtain a Workspace name and check to see if there is currently a Workspace with that name being managed by the WindowManager. If there is no existing workspace with the given name, create it with the supplied available layouts. If a matching Workspace does already exist then simply switch focus to it. This action is most useful when combined with the DefaultWorkspace hook that allows for auto populating named Workspaces when first focusing them.