mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-20 07:31:39 +01:00
feat(wm): a monitor changes size
When an output gets another resolution or scale, or a panel starts, grows or hides, the work area the layout fills is not the one komorebi tiled in, and nothing moved the windows until something else tiled them again. The bridge now sends the outputs, with their geometry and the work area of the desktop each shows, when KWin says they changed, when a dock window opens, closes or moves, and once a second, because KWin has no signal for the room a panel leaves. The table turns a monitor whose size or work area changed into a monitor notification. It is not a window event, since it is about no window: it goes to the monitor reconciliator, a thread that takes the window manager's lock as the threads of events and messages do, reads the size and work area of every monitor again and tiles the workspace in front of the focused monitor. Another monitor's windows keep their tiles until a retile. Every subscriber is notified of it, whether or not the state changed. vm-hotplug starts with the scale of one of two outputs changing under a running daemon. The VM library gets kde.outputs, which lists, disables, enables and scales outputs, for the commits that unplug and plug them.
This commit is contained in:
1 parent
c03e5d2970
commit
c8dc92a236
27 files changed
+1044
-75
No files matched your search
@@ -110,9 +110,14 @@ the run.
|
||||
- `Kde` is one KWin session. `Kde.headless(machine, name, size=, outputs=,
|
||||
scale=)` starts the units and waits for KWin to own its name on the private
|
||||
bus. `wid`, `rect`, `title` and `active` read windows through `kdotool`,
|
||||
`outputs` counts the enabled outputs through `kscreen-doctor`, `spawn` starts
|
||||
`outputs()` counts the enabled outputs through `kscreen-doctor`, `spawn` starts
|
||||
a client, and `wait_for(predicate, timeout)` polls, with the timeout
|
||||
multiplied by `scale`.
|
||||
- `Kde.outputs` has the outputs: `names()` lists them from left to right, and
|
||||
`disable(name)`, `enable(name)` and `scale(name, factor)` change them with
|
||||
`kscreen-doctor`, which is how a suite changes the monitors under the daemon.
|
||||
A disabled output keeps its name, so `names(enabled=False)` finds it to enable
|
||||
again.
|
||||
- `Kde.session(machine, scale=)` attaches to the session node's own Plasma
|
||||
session once its desktop is up, and `shot(name)` returns a screenshot as a
|
||||
Pillow image, keeping `NAME.png` in the output directory.
|
||||
|
||||
Reference in new issue
Block a user