mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-03 13:44:14 +01:00
The stock KDE Rounded Corners has one color for the active window and one for the others, and komorebi colors a window by what it is to the layout: the focused window, the others, a locked container that does not have the focus, a floating window that has it, a stack, a monocle. komorebi's build of the effect takes a color for each window over D-Bus. After every event and message the border manager works out the kind of each window and tells the backend, which sends the effect what changed, and tells it that no window has a color when borders are off. Without that build the borders are the look's two colors, and the backend says so once. komorebic gets border-colour. The fake desktop keeps the colors it was told, and gets window_commands, which leaves the look out of the list of what the window manager asked for. vm-features reads the colors of the kinds of window in a real session. The colors of a stack and of a monocled window are read from the fake and, in vm-features, from the pixels. The border_colours key of komorebi.json is not here: its colors are written as the Colour of komorebi-themes, which the themes (49) bring, and 49 adds the key. The maximize check of vm-features, which was the whole suite, reads a pixel a quarter of the way into the window and not the middle one: komorebi puts the pointer in the middle of the window it focuses, and a screenshot has the arrow on it, white. It read the arrow on most runs once the border effect was loaded. vm-features waits for the panel's room too, where it starts the daemon for its sections B to E: the border colors of section C are read from the pixels around a window, which the panel can cover.
35 lines
1.8 KiB
Nix
35 lines
1.8 KiB
Nix
{ kde-rounded-corners, fetchFromGitHub }:
|
|
|
|
# nixpkgs ships 0.10.0, which draws its outline in the wrong place on KWin 6.8: 6.8 inverted the
|
|
# texture coordinates of the offscreen window, and with Breeze's shadow (deeper below a window than
|
|
# above it) the whole ring lands about 24px too low, across the title bar. 0.11.0 is the release
|
|
# that handles it ("KWin 6.8 compatibility for inverted texture coordinates").
|
|
kde-rounded-corners.overrideAttrs (old: {
|
|
version = "0.11.0";
|
|
|
|
# per-window outline colors, set over D-Bus (org.komorebi.BorderColours1): komorebi colors a
|
|
# window by what it is to the layout (the focused one on each monitor, a stack, a monocle, a
|
|
# floating window, a locked container), which "the active window" cannot say. Without this the
|
|
# effect still works, with the colors of the settings for the active and the other windows. The
|
|
# patch also redraws a window from a fresh texture when only its opacity changes, which the
|
|
# effect's texture would not show otherwise.
|
|
patches = (old.patches or [ ]) ++ [ ./kde-rounded-corners/komorebi-border-colours.patch ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matinlotfali";
|
|
repo = "KDE-Rounded-Corners";
|
|
rev = "v0.11.0";
|
|
hash = "sha256-rdVXukBh7doyuZaFGVQghwKqkWGtuLOXxJgvZbZG0hQ=";
|
|
};
|
|
|
|
# KWin loads every effect that is enabled by default when it starts, with the settings the effect
|
|
# has then, and at its defaults this one draws a one pixel black outline inside every window,
|
|
# over its title bar. Disabled by default, it stays unloaded until it is asked for (`loadEffect`
|
|
# on KWin's `/Effects`), which can happen after its settings are written. KWin reads the flag
|
|
# from the metadata compiled into the plugin.
|
|
postPatch = (old.postPatch or "") + ''
|
|
substituteInPlace src/metadata.json \
|
|
--replace-fail '"EnabledByDefault": true' '"EnabledByDefault": false'
|
|
'';
|
|
})
|