Skip to content

Commit

Permalink
hyprbars: fix if formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterio77 committed Jul 3, 2024
1 parent 4eb37e0 commit 34c312e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions hyprbars/barDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,22 +555,19 @@ void CHyprBar::updateRules() {
applyRule(r);
}

if (prev_m_bHidden != m_bHidden) {
if (prev_m_bHidden != m_bHidden)
g_pDecorationPositioner->repositionDeco(this);
}
if (prev_m_bForcedTitleColor != m_bForcedTitleColor) {
if (prev_m_bForcedTitleColor != m_bForcedTitleColor)
m_bTitleColorChanged = true;
}
}

void CHyprBar::applyRule(const SWindowRule& r) {
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;
} else if (r.szRule.starts_with("plugin:hyprbars:bar_color")) {
else if (r.szRule.starts_with("plugin:hyprbars:bar_color"))
m_bForcedBarColor = CColor(configStringToInt(arg));
} else if (r.szRule.starts_with("plugin:hyprbars:title_color")) {
else if (r.szRule.starts_with("plugin:hyprbars:title_color"))
m_bForcedTitleColor = CColor(configStringToInt(arg));
}
}

0 comments on commit 34c312e

Please sign in to comment.