Skip to content

T4: Per-app layout switching — focus watcher → layout push #10

Description

@jonocodes

Parent

#6

What to build

Connect the existing focus watcher to layout selection so the daemon automatically pushes the correct layout when the focused application changes. The daemon loads all YAML files from a layouts directory (not a single file), matches each focused app's AppInfo against the match list in each layout, and pushes the matching layout to all connected clients. Falls back to the default layout when no match is found.

Acceptance criteria

  • Daemon accepts a --layouts-dir argument (or scans a layouts/ directory) and loads all YAML files at startup
  • When the focused app changes, the daemon pushes the layout whose match list contains the app's app_id or wm_class
  • When no layout matches, the daemon pushes the layout with match: [default]
  • Switching between two apps that each have a layout pushes the correct layout each time
  • FakeFocusBackend drives focus changes in tests; assertions verify correct LayoutMessage is pushed
  • just watch-focus still works (focus backend unchanged)

Blocked by

Activity

  1. jonocodes commented on Jul 16, 2026

    @jonocodes
    OwnerAuthor

    Verified end-to-end with the real GNOME focus watcher: the daemon reads the initial focus from the deckd-focus@local extension, resolves it to the matching layout, and pushes live layout changes when the focused window switches. T4 shipped in 8d3b024, with two main.py follow-up fixes in 25d95ef (dbus bus factory wired, focus watcher started inside the event loop).

  2. added a commit that references this issue on Jul 17, 2026
    8d3b024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestoneMilestone work item (post-spike)ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions