EPIC: RAGE against the dying dotfiles — Qtile desktop becomes topology-aware #106

Open
opened 2026-08-22 22:00:45 +00:00 by lost-rob0t · 1 comment
lost-rob0t commented 2026-08-22 22:00:45 +00:00 (Migrated from github.com)

Why this exists

The current Qtile bar is effectively cloned onto every screen. That made sense when the config was tiny; it is now actively fighting the desktop. widgets() returns one giant kitchen-sink bar and generate_screens() only special-cases the systray. Weather, MPRIS, resource graphs, telemetry and everything else are duplicated regardless of physical role.

This epic replaces that with a screen-role model that is deterministic for N=1,2,3,4 and remains sane for arbitrary output order.

Code-review findings first

  • generate_screens() sorts X positions only to select the tray output, then still gives every output the same widget list.
  • Screen identity is implicit/index-based instead of derived from physical geometry.
  • The bar has no reusable role-specific builders, so adding another feature duplicates policy rather than expressing it.
  • Active-screen styling is global; there is no per-screen accent identity.
  • Weather is embedded directly in the generic widget list and therefore cannot be cleanly scoped or disabled.
  • MPRIS is embedded directly in the generic widget list and therefore appears everywhere.

Required topology contract

Assign roles from physical X geometry, never enumeration order:

screens roles
1 center
2 left, center
3 left, center, right
4 left, center, right, aux
>4 left, center, right, aux-*

The center role is the output closest to the horizontal desktop midpoint; remaining roles are assigned by physical side. Replug/reorder must not silently swap policy because XRandR/libqtile happened to enumerate outputs differently.

Bar policy

Every screen

  • Groups / navigation.
  • Sane minimal desktop status necessary to operate the WM.
  • Screen-specific current-screen accent color.

Center

  • OpenRouter/LLM stats, including restored balance.
  • Systray (exactly one instance).
  • Pomodoro.
  • No MPRIS.
  • No weather.

Left

  • Current Org clocked task.
  • Org TODO launcher backed by Emacs; opens a compact dropdown-style emacsclient frame.
  • Emacs interaction must not block Qtile's event loop.

Right

  • MPRIS only here.

Aux

  • Minimal bar; no duplicated singleton services.

Acceptance gates

  • Unit-test role assignment for shuffled N=1, N=2, N=3, N=4 geometries.
  • Assert exactly one Systray whenever at least one screen exists.
  • Assert MPRIS exists only on the right role and is absent when there is no right role.
  • Assert weather does not exist in any role.
  • Assert OpenRouter widgets exist only on center.
  • Assert Org widgets exist only on left.
  • Assert each physical screen receives a deterministic, distinct active-screen accent for configurations up to four screens.
  • Existing Qtile/literate parity tests stay green.
  • python -m compileall / relevant Qtile tests pass.
  • Documentation states the role-collapse behavior explicitly.

RAGE rule

Do as much work as possible in each pass. Do not stop after moving one widget. The point is to kill the architectural cause of the drift, test the monitor matrix, and leave the config easier to extend than we found it.

## Why this exists The current Qtile bar is effectively cloned onto every screen. That made sense when the config was tiny; it is now actively fighting the desktop. `widgets()` returns one giant kitchen-sink bar and `generate_screens()` only special-cases the systray. Weather, MPRIS, resource graphs, telemetry and everything else are duplicated regardless of physical role. This epic replaces that with a **screen-role model that is deterministic for N=1,2,3,4 and remains sane for arbitrary output order**. ## Code-review findings first - `generate_screens()` sorts X positions only to select the tray output, then still gives every output the same widget list. - Screen identity is implicit/index-based instead of derived from physical geometry. - The bar has no reusable role-specific builders, so adding another feature duplicates policy rather than expressing it. - Active-screen styling is global; there is no per-screen accent identity. - Weather is embedded directly in the generic widget list and therefore cannot be cleanly scoped or disabled. - MPRIS is embedded directly in the generic widget list and therefore appears everywhere. ## Required topology contract Assign roles from physical X geometry, never enumeration order: | screens | roles | | --- | --- | | 1 | center | | 2 | left, center | | 3 | left, center, right | | 4 | left, center, right, aux | | >4 | left, center, right, aux-* | The center role is the output closest to the horizontal desktop midpoint; remaining roles are assigned by physical side. Replug/reorder must not silently swap policy because XRandR/libqtile happened to enumerate outputs differently. ## Bar policy ### Every screen - Groups / navigation. - Sane minimal desktop status necessary to operate the WM. - Screen-specific current-screen accent color. ### Center - OpenRouter/LLM stats, including restored balance. - Systray (exactly one instance). - Pomodoro. - No MPRIS. - No weather. ### Left - Current Org clocked task. - Org TODO launcher backed by Emacs; opens a compact dropdown-style `emacsclient` frame. - Emacs interaction must not block Qtile's event loop. ### Right - MPRIS only here. ### Aux - Minimal bar; no duplicated singleton services. ## Acceptance gates - [ ] Unit-test role assignment for shuffled N=1, N=2, N=3, N=4 geometries. - [ ] Assert exactly one Systray whenever at least one screen exists. - [ ] Assert MPRIS exists only on the right role and is absent when there is no right role. - [ ] Assert weather does not exist in any role. - [ ] Assert OpenRouter widgets exist only on center. - [ ] Assert Org widgets exist only on left. - [ ] Assert each physical screen receives a deterministic, distinct active-screen accent for configurations up to four screens. - [ ] Existing Qtile/literate parity tests stay green. - [ ] `python -m compileall` / relevant Qtile tests pass. - [ ] Documentation states the role-collapse behavior explicitly. ## RAGE rule Do as much work as possible in each pass. Do not stop after moving one widget. The point is to kill the architectural cause of the drift, test the monitor matrix, and leave the config easier to extend than we found it.
lost-rob0t commented 2026-08-22 22:20:08 +00:00 (Migrated from github.com)

RAGE slice landed in #109 (merged to master as 4a37779). Geometry-based screen roles, role-scoped bars, distinct per-role active accents, right-only MPRIS, center-only systray/LLM/Pomodoro, left Org controls, and active-runtime weather removal are now merged. Keeping this epic open for any follow-up topology regressions / live desktop QA.

RAGE slice landed in #109 (merged to `master` as `4a37779`). Geometry-based screen roles, role-scoped bars, distinct per-role active accents, right-only MPRIS, center-only systray/LLM/Pomodoro, left Org controls, and active-runtime weather removal are now merged. Keeping this epic open for any follow-up topology regressions / live desktop QA.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/dotfiles#106
No description provided.