Developed for Hyprland
Workspacer is a utility designed to enhance workspace management by providing a visual overview of each workspace's contents, facilitating seamless switching between them.
Ensure you have the following dependencies installed:
grim
: CLI screenshot tooljq
: JSON parsersocat
: Multipurpose relay
Simply bind the workspaced.py
script to a key or integrate it into your system bar for quick access to workspace previews and switching.
- Move Window to Workspace: hold shift while clicking on a workspace, and the last active window will be moved to the selected workspace.
- One screenshot per ws/monitor
- Customizable colors
- Move last focused window to workspace (holding left shift while clicking on a workspace) a.k.a fake_drag_n_drop
- New Empty workspace [ + ] to go, or move a window to a new workspace if while holding left-shift
bind = $Mod , Y, exec , $HOME/scripts/hypr/workspaced.py
To enable previews of windows within each workspace, run the workspace_listener.sh
script in the background. Configure it in your system settings or a configuration file like ~/.config/hypr/hyrland.conf
.
exec-once = $HOME/scripts/hypr/workspace_listener.sh
This script utilizes Hyprland's own IPC socket to snapshot the workspaces whenever a workspace is created/changed/destroyed or an application window is closed.
You can modify the colors used by the Workspace Switcher by editing the colors.conf file in the script's directory. For example:
{
"current_workspace": "rgba(0, 255, 0, 0.6)",
"workspace_button": "rgba(0, 0, 0, 0)",
"workspace_button_focus": "rgba(0, 0, 0, 0)"
}
windowrule = float, title:^(Workspace Selector)$
Example configuration for Waybar, trigger the Workspace Switcher when clicking on the bar title:
"hyprland/window": {
"format": "{}",
"separate-outputs": true,
"on-click":"/home/YOUR_USER/../../workspaced.py",
}
- When ws is created silently(without focus), then our UI doesnt reflect that new ws
- Implement navigation with vim keys (hjkl)
- Test compatibility with animations
Draw an empty workspace extra to move a window to a new workspacePrevent script from executing multiple instancesAutomatically remove empty workspaces when windows are closedOptimize screenshot mechanism for faster performance