Skip to content

Use i3 IPC to schedule xrandr block updates #1433

@ammgws

Description

@ammgws

Xrandr block seems to have a few issues, which might be due to xrandr itself, but is exacerbated by the fact we call it every x seconds just to update the block.

I use sway not i3, but when reading through the i3 IPC docs, I saw that it apparently sends out events when there are RandR changes. Perhaps instead of polling xrandr every x seconds, we could instead subscribe to these events and only call xrandr when there are actual updates to display

https://i3wm.org/docs/ipc.html#_events

output (1)
Sent when RandR issues a change notification (of either screens, outputs, CRTCs or output properties).

Perhaps someone on i3 can look into it?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions