Skip to content

Workspace Policies: Implement per-compositor policy configuration #37

Description

@dskvr

Description

Different compositors have different workspace behaviors. Need a policy system to configure how hyprlax handles each compositor's quirks and features.

Current Status

  • Hard-coded behaviors
  • No configuration options
  • No policy system
  • Limited flexibility

Tasks

Policy Framework

  • Create policy configuration structure
  • Implement policy loading from config
  • Support runtime policy changes
  • Add default policies per compositor
  • Allow user policy overrides

Workspace Policies

  • Workspace binding to output (sticky/floating)
  • Workspace stealing behavior
  • Workspace creation (dynamic/static)
  • Workspace numbering (sequential/arbitrary)
  • Hidden workspace handling

Animation Policies

  • Trigger conditions (focus/workspace/both)
  • Animation on workspace creation
  • Animation on workspace deletion
  • Multi-monitor animation sync
  • Gesture animation support

Tag/Set Policies (River/Wayfire)

  • Tag selection when multiple visible
  • Tag combination handling
  • Set switching behavior
  • Tag-to-offset mapping
  • Multi-tag animation

Special Cases

  • Fullscreen window behavior
  • Urgent workspace handling
  • Floating window treatment
  • Scratchpad/special workspaces
  • Virtual desktop behavior

Configuration Example

[policies.hyprland]
bind_workspace_to_output = false
animate_on_focus_change = true
handle_special_workspace = true
detect_split_monitor_plugin = true

[policies.sway]
handle_workspace_stealing = true
sticky_workspaces = false
animate_steal_events = true

[policies.river]
tag_policy = "highest"  # highest/lowest/first/none
multi_tag_parallax = false
animate_tag_toggle = true

[policies.niri]
continuous_scroll = true
per_output_stacks = true
smooth_animation = true

[policies.wayfire]
handle_workspace_sets = true
grid_animation = "both"  # horizontal/vertical/both
detect_wsets_plugin = true

Implementation Notes

  • Policies should be compositor-specific
  • Allow graceful degradation
  • Provide sensible defaults
  • Document policy effects

References

  • memory/compositor-workspace-analysis.md
  • Individual compositor issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestp:2

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions