Files
hypr-chrome/src/ChromeConfig.hpp
T
darmanandClaude Opus 5 a22403d603
Version Bump / check-bump-label (pull_request) Skipped
Version Bump / apply-version-bump (pull_request) Successful in 23s
Add a solid outline tracing the frame's outer edge
New plugin:hyprchrome:outline_size (px, 0 = off) and outline_color
(default white) stroke the frame's outer silhouette - chamfers, title bar
plateau and side notches - with a flat color, so it reads as a drawn line
against the gradient-filled frame underneath. Off by default.

The line sits inside the frame rather than centred on the silhouette. The
outer path runs along the texture's own bounds, so half of a centred
stroke would fall off the surface and vanish on exactly those sides;
stroking at double width leaves the inner half, which comes to
outline_size on every edge.

The clip is the whole ring rather than just the outer path, so an outline
thicker than the frame stops at the window's edge instead of spilling
across the ring onto the window, and a miter spike at the plateau's dip
stays confined to the frame.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 02:00:06 +02:00

59 lines
1.9 KiB
C++

#pragma once
#include "Common.hpp"
struct ChromeConfig {
SP<BoolValue> enabled;
// How far the border extends past each window edge, in logical pixels.
SP<IntValue> extent;
// When true, the border tracks Hyprland's own resolved
// general:col.active_border/col.inactive_border instead of activeColor/
// inactiveColor below.
SP<BoolValue> followHyprlandBorderColor;
// Gradients (multiple stops + an optional angle), same syntax as
// Hyprland's general:col.active_border/col.inactive_border.
SP<GradientValue> activeColor;
SP<GradientValue> inactiveColor;
// How far the border's glow bleeds inward past the window edge, over the
// window's own pixels, in logical pixels. 0 disables the glow entirely.
SP<IntValue> glowSize;
// Peak opacity of that glow, at the window edge, as a fraction of the
// border color's own alpha.
SP<FloatValue> glowStrength;
// Thickness of the solid outline tracing the frame's edges, in logical
// pixels. 0 disables it entirely.
SP<IntValue> outlineSize;
// Color of that outline - a flat color rather than a gradient, so it reads
// as a drawn line against the gradient-filled frame it sits on.
SP<ColorValue> outlineColor;
// How far the frame's drop shadow reaches past its own outline, in logical
// pixels. 0 disables the shadow entirely.
SP<IntValue> shadowSize;
// Color the shadow is tinted with - its alpha is the shadow's opacity at
// full coverage.
SP<ColorValue> shadowColor;
// How far the shadow is displaced from the frame, in logical pixels;
// positive is right/down.
SP<Vec2Value> shadowOffset;
// Height of the title bar hanging off the floating top-border cutout, in
// logical pixels.
SP<IntValue> titlebarHeight;
// Font size of the title bar's text, in logical pixels.
SP<IntValue> titlebarTextSize;
// Font family of the title bar's text (passed to cairo_select_font_face).
SP<StringValue> titlebarFont;
};