hyprbars: chase hyprland

This commit is contained in:
Vaxry 2024-12-17 00:27:36 +00:00
parent d39901fe17
commit 17ef806444
2 changed files with 6 additions and 6 deletions

View file

@ -562,13 +562,13 @@ void CHyprBar::updateRules() {
m_bTitleColorChanged = true; m_bTitleColorChanged = true;
} }
void CHyprBar::applyRule(const SWindowRule& r) { void CHyprBar::applyRule(const SP<CWindowRule>& r) {
auto arg = r.szRule.substr(r.szRule.find_first_of(' ') + 1); auto arg = r->szRule.substr(r->szRule.find_first_of(' ') + 1);
if (r.szRule == "plugin:hyprbars:nobar") if (r->szRule == "plugin:hyprbars:nobar")
m_bHidden = true; m_bHidden = true;
else if (r.szRule.starts_with("plugin:hyprbars:bar_color")) else if (r->szRule.starts_with("plugin:hyprbars:bar_color"))
m_bForcedBarColor = CHyprColor(configStringToInt(arg).value_or(0)); m_bForcedBarColor = CHyprColor(configStringToInt(arg).value_or(0));
else if (r.szRule.starts_with("plugin:hyprbars:title_color")) else if (r->szRule.starts_with("plugin:hyprbars:title_color"))
m_bForcedTitleColor = CHyprColor(configStringToInt(arg).value_or(0)); m_bForcedTitleColor = CHyprColor(configStringToInt(arg).value_or(0));
} }

View file

@ -35,7 +35,7 @@ class CHyprBar : public IHyprWindowDecoration {
PHLWINDOW getOwner(); PHLWINDOW getOwner();
void updateRules(); void updateRules();
void applyRule(const SWindowRule&); void applyRule(const SP<CWindowRule>&);
private: private:
SBoxExtents m_seExtents; SBoxExtents m_seExtents;