diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index fe4e7d67..63411a28 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -121,6 +121,7 @@ void CConfigManager::setDefaultVars() { configValues["group:insert_after_current"].intValue = 1; configValues["group:focus_removed_window"].intValue = 1; + configValues["group:groupbar:font"].strValue = "Sans"; configValues["group:groupbar:gradients"].intValue = 1; configValues["group:groupbar:render_titles"].intValue = 1; configValues["group:groupbar:scrolling"].intValue = 1; diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 3994e332..5da531ec 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -180,6 +180,7 @@ CTitleTex::CTitleTex(CWindow* pWindow, const Vector2D& bufferSize) { static auto* const PTITLEFONTSIZE = &g_pConfigManager->getConfigValuePtr("group:groupbar:titles_font_size")->intValue; static auto* const PTEXTCOLOR = &g_pConfigManager->getConfigValuePtr("group:groupbar:text_color")->intValue; + static auto* const PFONT = &g_pConfigManager->getConfigValuePtr("group:groupbar:font")->strValue; const CColor COLOR = CColor(*PTEXTCOLOR); @@ -193,7 +194,7 @@ CTitleTex::CTitleTex(CWindow* pWindow, const Vector2D& bufferSize) { PangoLayout* layout = pango_cairo_create_layout(CAIRO); pango_layout_set_text(layout, szContent.c_str(), -1); - PangoFontDescription* fontDesc = pango_font_description_from_string("Sans"); + PangoFontDescription* fontDesc = pango_font_description_from_string(PFONT->c_str()); pango_font_description_set_size(fontDesc, *PTITLEFONTSIZE * PANGO_SCALE); pango_layout_set_font_description(layout, fontDesc); pango_font_description_free(fontDesc);