#pragma once #include "Common.hpp" #include "ChromeConfig.hpp" #include class ChromeDecoration; struct GlobalState { ChromeConfig config; std::vector> decorations; GlobalState(HANDLE plugin) { config = ChromeConfig{ .enabled = makeShared( "plugin:hyprchrome:enabled", "Whether the border decoration is enabled", true), .extent = makeShared( "plugin:hyprchrome:extent", "How far the border extends past each window edge, in pixels", 12), .followHyprlandBorderColor = makeShared( "plugin:hyprchrome:follow_hyprland_border_color", "Whether the border tracks Hyprland's own active/inactive border color instead of active_color/inactive_color", true), .activeColor = makeShared( "plugin:hyprchrome:active_color", "Color (or gradient) of the border on the focused window, used when follow_hyprland_border_color is false", CHyprColor{RGBAToARGB(0xFFD063FF)}), .inactiveColor = makeShared( "plugin:hyprchrome:inactive_color", "Color (or gradient) of the border on unfocused windows, used when follow_hyprland_border_color is false", CHyprColor{RGBAToARGB(0x6C6C6CFF)}), .titlebarHeight = makeShared( "plugin:hyprchrome:titlebar_height", "Height of the title bar hanging off the floating top-border cutout, in pixels", 8), .titlebarTextSize = makeShared( "plugin:hyprchrome:titlebar_text_size", "Font size of the title bar's text, in pixels", 12), .titlebarFont = makeShared( "plugin:hyprchrome:titlebar_font", "Font family of the title bar's text", "sans-serif"), }; HyprlandAPI::addConfigValueV2(plugin, config.enabled); HyprlandAPI::addConfigValueV2(plugin, config.extent); HyprlandAPI::addConfigValueV2(plugin, config.followHyprlandBorderColor); HyprlandAPI::addConfigValueV2(plugin, config.activeColor); HyprlandAPI::addConfigValueV2(plugin, config.inactiveColor); HyprlandAPI::addConfigValueV2(plugin, config.titlebarHeight); HyprlandAPI::addConfigValueV2(plugin, config.titlebarTextSize); HyprlandAPI::addConfigValueV2(plugin, config.titlebarFont); } };