Expand description
§i3wsr - i3/Sway Workspace Renamer
Internal library functionality for the i3wsr binary. This crate provides the core functionality for renaming i3/Sway workspaces based on their content.
§Note
This is primarily a binary crate. The public functions and types are mainly exposed for:
- Use by the binary executable
- Testing purposes
- Internal organization
While you could technically use this as a library, it’s not designed or maintained for that purpose.
Re-exports§
pub use config::Config;
Modules§
Enums§
Statics§
- VERBOSE
- Global flag to control debug output verbosity.
Functions§
- collect_
titles - Collect a vector of workspace titles, recursively traversing all nested nodes
- get_
title - Gets a window title by trying to find an alias for the window, eventually falling back on class, or app_id, depending on platform.
- get_
workspaces - Filters out special workspaces (like scratchpad) and collects regular workspaces from the window manager tree structure.
- handle_
window_ event - Processes various window events (new, close, move, title changes) and updates workspace names accordingly. This is a core part of the event loop in the main binary.
- handle_
ws_ event - Processes workspace events (empty, focus changes) and updates workspace names as needed. This is a core part of the event loop in the main binary.
- update_
tree - Internal function to update all workspace names based on their current content. This function is public for testing purposes and binary use only.