mirror of
https://github.com/hyprwm/Hyprland.git
synced 2026-09-28 01:46:17 -04:00
config: fix decoration values to refresh on runtime eval/keyword change (#14590)
* config: fix decoration values to refresh on runtime eval/keyword change Signed-off-by: BlueManCZ <ivo97@centrum.cz> * config: fix border colors to refresh on runtime eval/keyword change Signed-off-by: BlueManCZ <ivo97@centrum.cz> * call damageMonitor in REFRESH_WINDOW_STATES Signed-off-by: BlueManCZ <ivo97@centrum.cz> --------- Signed-off-by: BlueManCZ <ivo97@centrum.cz>
This commit is contained in:
@@ -43,8 +43,12 @@ void CPropRefresher::scheduleRefresh(PropRefreshBits prop) {
|
||||
|
||||
if (m_propsTripped & REFRESH_BLUR_FB) {
|
||||
for (auto const& m : g_pCompositor->m_monitors) {
|
||||
if (m)
|
||||
m->m_blurFBDirty = true;
|
||||
if (!m)
|
||||
continue;
|
||||
|
||||
m->m_blurFBDirty = true;
|
||||
m->m_forceFullFrames = 2;
|
||||
g_pCompositor->scheduleFrameForMonitor(m);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +65,15 @@ void CPropRefresher::scheduleRefresh(PropRefreshBits prop) {
|
||||
}
|
||||
|
||||
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
||||
|
||||
for (auto const& m : g_pCompositor->m_monitors) {
|
||||
if (!m)
|
||||
continue;
|
||||
|
||||
m->m_forceFullFrames = 2;
|
||||
g_pHyprRenderer->damageMonitor(m);
|
||||
g_pCompositor->scheduleFrameForMonitor(m);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_propsTripped & REFRESH_MONITOR_STATES) {
|
||||
|
||||
@@ -170,10 +170,12 @@ std::vector<SP<IValue>> Values::getConfigValues() {
|
||||
MS<CssGap>("general:gaps_out", "gaps between windows and monitor edges", 20, {.refresh = Supplementary::REFRESH_LAYOUTS}),
|
||||
MS<CssGap>("general:float_gaps", "gaps between windows and monitor edges for floating windows", 0, {.refresh = Supplementary::REFRESH_LAYOUTS}),
|
||||
MS<Int>("general:gaps_workspaces", "gaps between workspaces. Stacks with gaps_out.", 0, {.min = 0, .max = 100, .refresh = Supplementary::REFRESH_LAYOUTS}),
|
||||
MS<Gradient>("general:col.inactive_border", "border color for inactive windows", CHyprColor{0xff444444}),
|
||||
MS<Gradient>("general:col.active_border", "border color for the active window", CHyprColor{0xffffffff}),
|
||||
MS<Gradient>("general:col.nogroup_border", "inactive border color for window that cannot be added to a group", CHyprColor{0xffffaaff}),
|
||||
MS<Gradient>("general:col.nogroup_border_active", "active border color for window that cannot be added to a group", CHyprColor{0xffff00ff}),
|
||||
MS<Gradient>("general:col.inactive_border", "border color for inactive windows", CHyprColor{0xff444444}, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Gradient>("general:col.active_border", "border color for the active window", CHyprColor{0xffffffff}, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Gradient>("general:col.nogroup_border", "inactive border color for window that cannot be added to a group", CHyprColor{0xffffaaff},
|
||||
{.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Gradient>("general:col.nogroup_border_active", "active border color for window that cannot be added to a group", CHyprColor{0xffff00ff},
|
||||
{.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<String>("general:layout", "which layout to use. [dwindle/master]", "dwindle", {.refresh = Supplementary::REFRESH_LAYOUTS}),
|
||||
MS<Bool>("general:no_focus_fallback", "if true, will not fall back to the next available window when moving focus in a direction where no window was found", false),
|
||||
MS<Bool>("general:resize_on_border", "enables resizing windows by clicking and dragging on borders and gaps", false),
|
||||
@@ -195,29 +197,36 @@ std::vector<SP<IValue>> Values::getConfigValues() {
|
||||
* decoration:
|
||||
*/
|
||||
|
||||
MS<Int>("decoration:rounding", "rounded corners' radius (in layout px)", 0, {.min = 0, .max = 20}),
|
||||
MS<Float>("decoration:rounding_power", "rounding power of corners (2 is a circle)", 2, {.min = 2, .max = 10}),
|
||||
MS<Float>("decoration:active_opacity", "opacity of active windows.", 1, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:inactive_opacity", "opacity of inactive windows.", 1, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:fullscreen_opacity", "opacity of fullscreen windows.", 1, {.min = 0, .max = 1}),
|
||||
MS<Bool>("decoration:shadow:enabled", "enable drop shadows on windows", true),
|
||||
MS<Int>("decoration:shadow:range", "Shadow range (size) in layout px", 4, {.min = 0, .max = 100}),
|
||||
MS<Int>("decoration:shadow:render_power", "in what power to render the falloff (more power, the faster the falloff)", 3, {.min = 1, .max = 4}),
|
||||
MS<Bool>("decoration:shadow:sharp", "whether the shadow should be sharp or not.", false),
|
||||
MS<Color>("decoration:shadow:color", "shadow's color. Alpha dictates shadow's opacity.", 0xee1a1a1a),
|
||||
MS<Color>("decoration:shadow:color_inactive", "inactive shadow color. (if not set, will fall back to col.shadow)", -1),
|
||||
MS<Vec2>("decoration:shadow:offset", "shadow's rendering offset.", Config::VEC2{}, {.validator = vec2Range(-250, -250, 250, 250)}),
|
||||
MS<Float>("decoration:shadow:scale", "shadow's scale.", 1, {.min = 0, .max = 1}),
|
||||
MS<Bool>("decoration:glow:enabled", "enable inner glow on windows", false),
|
||||
MS<Int>("decoration:glow:range", "glow range (size) in layout px", 10, {.min = 0, .max = 100}),
|
||||
MS<Int>("decoration:glow:render_power", "in what power to render the falloff (more power, the faster the falloff)", 3, {.min = 1, .max = 4}),
|
||||
MS<Color>("decoration:glow:color", "glow's color. Alpha dictates glow's opacity.", 0xee33ccff),
|
||||
MS<Color>("decoration:glow:color_inactive", "inactive glow color. (if not set, will fall back to decoration:glow:color)", 0x0033ccff),
|
||||
MS<Bool>("decoration:dim_modal", "enables dimming of parents of modal windows", true),
|
||||
MS<Bool>("decoration:dim_inactive", "enables dimming of inactive windows", false),
|
||||
MS<Float>("decoration:dim_strength", "how much inactive windows should be dimmed", 0.5, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:dim_special", "how much to dim the rest of the screen by when a special workspace is open.", 0.2, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:dim_around", "how much the dimaround window rule should dim by.", 0.4, {.min = 0, .max = 1}),
|
||||
MS<Int>("decoration:rounding", "rounded corners' radius (in layout px)", 0,
|
||||
{.min = 0, .max = 20, .refresh = Supplementary::REFRESH_WINDOW_STATES | Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:rounding_power", "rounding power of corners (2 is a circle)", 2,
|
||||
{.min = 2, .max = 10, .refresh = Supplementary::REFRESH_WINDOW_STATES | Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:active_opacity", "opacity of active windows.", 1, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:inactive_opacity", "opacity of inactive windows.", 1, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:fullscreen_opacity", "opacity of fullscreen windows.", 1, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Bool>("decoration:shadow:enabled", "enable drop shadows on windows", true, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Int>("decoration:shadow:range", "Shadow range (size) in layout px", 4, {.min = 0, .max = 100, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Int>("decoration:shadow:render_power", "in what power to render the falloff (more power, the faster the falloff)", 3,
|
||||
{.min = 1, .max = 4, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Bool>("decoration:shadow:sharp", "whether the shadow should be sharp or not.", false, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Color>("decoration:shadow:color", "shadow's color. Alpha dictates shadow's opacity.", 0xee1a1a1a, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Color>("decoration:shadow:color_inactive", "inactive shadow color. (if not set, will fall back to col.shadow)", -1, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Vec2>("decoration:shadow:offset", "shadow's rendering offset.", Config::VEC2{},
|
||||
{.validator = vec2Range(-250, -250, 250, 250), .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:shadow:scale", "shadow's scale.", 1, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Bool>("decoration:glow:enabled", "enable inner glow on windows", false, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Int>("decoration:glow:range", "glow range (size) in layout px", 10, {.min = 0, .max = 100, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Int>("decoration:glow:render_power", "in what power to render the falloff (more power, the faster the falloff)", 3,
|
||||
{.min = 1, .max = 4, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Color>("decoration:glow:color", "glow's color. Alpha dictates glow's opacity.", 0xee33ccff, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Color>("decoration:glow:color_inactive", "inactive glow color. (if not set, will fall back to decoration:glow:color)", 0x0033ccff,
|
||||
{.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Bool>("decoration:dim_modal", "enables dimming of parents of modal windows", true, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Bool>("decoration:dim_inactive", "enables dimming of inactive windows", false, {.refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:dim_strength", "how much inactive windows should be dimmed", 0.5, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:dim_special", "how much to dim the rest of the screen by when a special workspace is open.", 0.2,
|
||||
{.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<Float>("decoration:dim_around", "how much the dimaround window rule should dim by.", 0.4, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_WINDOW_STATES}),
|
||||
MS<String>("decoration:screen_shader", "a path to a custom shader to be applied at the end of rendering.", STRVAL_EMPTY, {.refresh = Supplementary::REFRESH_SCREEN_SHADER}),
|
||||
MS<Bool>("decoration:border_part_of_window", "whether the border should be treated as a part of the window.", true),
|
||||
|
||||
@@ -225,23 +234,24 @@ std::vector<SP<IValue>> Values::getConfigValues() {
|
||||
* blur:
|
||||
*/
|
||||
|
||||
MS<Bool>("decoration:blur:enabled", "enable kawase window background blur", true),
|
||||
MS<Int>("decoration:blur:size", "blur size (distance)", 8, {.min = 0, .max = 100}),
|
||||
MS<Int>("decoration:blur:passes", "the amount of passes to perform", 1, {.min = 0, .max = 10}),
|
||||
MS<Bool>("decoration:blur:ignore_opacity", "make the blur layer ignore the opacity of the window", true),
|
||||
MS<Bool>("decoration:blur:new_optimizations", "whether to enable further optimizations to the blur.", true),
|
||||
MS<Bool>("decoration:blur:xray", "if enabled, floating windows will ignore tiled windows in their blur.", false),
|
||||
MS<Float>("decoration:blur:noise", "how much noise to apply.", 0.0117, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:blur:contrast", "contrast modulation for blur.", 0.8916, {.min = 0, .max = 2}),
|
||||
MS<Float>("decoration:blur:brightness", "brightness modulation for blur.", 1, {.min = 0, .max = 2}),
|
||||
MS<Float>("decoration:blur:vibrancy", "Increase saturation of blurred colors.", 0.1696, {.min = 0, .max = 1}),
|
||||
MS<Float>("decoration:blur:vibrancy_darkness", "How strong the effect of vibrancy is on dark areas.", 0, {.min = 0, .max = 1}),
|
||||
MS<Bool>("decoration:blur:special", "whether to blur behind the special workspace (note: expensive)", false),
|
||||
MS<Bool>("decoration:blur:popups", "whether to blur popups (e.g. right-click menus)", false),
|
||||
MS<Float>("decoration:blur:popups_ignorealpha", "works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur.", 0.2, {.min = 0, .max = 1}),
|
||||
MS<Bool>("decoration:blur:input_methods", "whether to blur input methods (e.g. fcitx5)", false),
|
||||
MS<Bool>("decoration:blur:enabled", "enable kawase window background blur", true, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Int>("decoration:blur:size", "blur size (distance)", 8, {.min = 0, .max = 100, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Int>("decoration:blur:passes", "the amount of passes to perform", 1, {.min = 0, .max = 10, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:ignore_opacity", "make the blur layer ignore the opacity of the window", true, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:new_optimizations", "whether to enable further optimizations to the blur.", true, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:xray", "if enabled, floating windows will ignore tiled windows in their blur.", false, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:noise", "how much noise to apply.", 0.0117, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:contrast", "contrast modulation for blur.", 0.8916, {.min = 0, .max = 2, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:brightness", "brightness modulation for blur.", 1, {.min = 0, .max = 2, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:vibrancy", "Increase saturation of blurred colors.", 0.1696, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:vibrancy_darkness", "How strong the effect of vibrancy is on dark areas.", 0, {.min = 0, .max = 1, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:special", "whether to blur behind the special workspace (note: expensive)", false, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:popups", "whether to blur popups (e.g. right-click menus)", false, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:popups_ignorealpha", "works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur.", 0.2,
|
||||
{.min = 0, .max = 1, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Bool>("decoration:blur:input_methods", "whether to blur input methods (e.g. fcitx5)", false, {.refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
MS<Float>("decoration:blur:input_methods_ignorealpha", "works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur.", 0.2,
|
||||
{.min = 0, .max = 1}),
|
||||
{.min = 0, .max = 1, .refresh = Supplementary::REFRESH_BLUR_FB}),
|
||||
|
||||
/*
|
||||
* animations:
|
||||
|
||||
Reference in New Issue
Block a user