feat(wm): transparency for the windows without the focus

The window in front of every container is see-through, unless its container has
the focus on the focused monitor, so that the window being worked in stands out.
The opacity of a window is a property KWin has: komorebi sets it through the
bridge, as a fraction of 255, and KWin draws the window so. The window manager
keeps the opacity it gave each window and, after every event and message, sends
only the difference, makes a window opaque again when it should no longer be
see-through, and makes every one opaque when it stops. Windows an ignore rule
covers, and workspaces that do not tile, are left as they are.

The patched border effect already draws a window again when its opacity changes,
so the border follows it. komorebic gets transparency, transparency-alpha and
toggle-transparency, and the state of the daemon says what the settings are.
vm-features checks the pixels in the middle of a focused window and of one that
is not.

A monocled window is opaque on the focused monitor and see-through on another.
komorebi.json takes transparency, transparency_alpha and
transparency_ignore_rules.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:49 -07:00
1 parent abfa8c6a5c
commit fa1e822e44
36 files changed
+974 -30

No files matched your search

+27
View File
@@ -303,6 +303,33 @@
],
"default": "CenterAndResize"
},
"transparency": {
"description": "Add transparency to unfocused windows (default: false)",
"type": [
"boolean",
"null"
]
},
"transparency_alpha": {
"description": "Alpha value for unfocused window transparency [[0-255]] (default: 200)",
"type": [
"integer",
"null"
],
"format": "uint8",
"maximum": 255,
"minimum": 0
},
"transparency_ignore_rules": {
"description": "Individual window transparency ignore rules",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/MatchingRule"
}
},
"unmanaged_window_operation_behaviour": {
"description": "Determine what happens when commands are sent while an unmanaged window is in the foreground",
"anyOf": [