Skip to content

feat(niri): add workspace-taskbar support#4997

Open
sewaustav wants to merge 1 commit intoAlexays:masterfrom
sewaustav:feat/niri-workspaces-taskbar
Open

feat(niri): add workspace-taskbar support#4997
sewaustav wants to merge 1 commit intoAlexays:masterfrom
sewaustav:feat/niri-workspaces-taskbar

Conversation

@sewaustav
Copy link
Copy Markdown

Description:
This PR adds a workspace-taskbar mode to the niri/workspaces module, bringing functionality similar to the hyprland/workspaces module.
Motivation:
Currently, Niri users lack a native way to visualize windows and app icons within workspaces directly on the bar. While the wlr/taskbar module is an available option, it does not fully meet the needs for a structured taskbar; it often lacks sufficient organization of application icons and fails to maintain a logical or desired order, which is essential for efficient workflows on tiling compositors like Niri.

A native solution within niri/workspaces provides better integration, stable icon placement, and cleaner control over window management, specifically tailored for Niri's scrolling compositor.

Key Changes:

  • Refactoring: I refactored the logic within the niri/workspaces module. The logic is now split into two entities: Workspaces (the controller/container) and Workspace (the entity/element). This allows for a more flexible rendering approach beyond simple button text.
  • New Feature: Added workspace-taskbar support.
  • Enables app icon display per workspace.
  • Clicking an icon focuses the corresponding window.
  • Middle-clicking an icon closes the window.
  • Documentation: Updated man/waybar-niri-workspaces.5.scd with the new configuration options.

Testing & Compatibility:

  • Backward Compatibility: Tested with existing configurations; no breaking changes detected.
  • Stability: The module runs stably with no memory leaks detected during various usage scenarios.
  • Icons: Verified compatibility with major icon themes, including Breeze, Adwaita, and Papirus. The module correctly retrieves and displays icons as expected.
    Configuration Example:
"niri/workspaces": {
    "format": "{icon}",
    "workspace-taskbar": {
        "enable": true,
        "icon-size": 18
    }
}
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant