Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hyprbars/barDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,21 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
static auto* const PENABLEBLUR = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:bar_blur")->getDataStaticPtr();
static auto* const PENABLEBLURGLOBAL = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "decoration:blur:enabled")->getDataStaticPtr();
static auto* const PINACTIVECOLOR = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:inactive_button_color")->getDataStaticPtr();
static auto* const PINACTIVEBARCOLOR = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:bar_inactive_color")->getDataStaticPtr();

if (**PINACTIVECOLOR > 0) {
{
bool currentWindowFocus = PWINDOW == Desktop::focusState()->window();
if (currentWindowFocus != m_bWindowHasFocus) {
m_bWindowHasFocus = currentWindowFocus;
m_bButtonsDirty = true;
}
}

const CHyprColor DEST_COLOR = m_bForcedBarColor.value_or(**PCOLOR);
CHyprColor DEST_COLOR;
if (**PINACTIVEBARCOLOR != -1 && !m_bWindowHasFocus)
DEST_COLOR = CHyprColor(**PINACTIVEBARCOLOR);
else
DEST_COLOR = m_bForcedBarColor.value_or(**PCOLOR);
if (DEST_COLOR != m_cRealBarColor->goal())
*m_cRealBarColor = DEST_COLOR;

Expand Down
1 change: 1 addition & 0 deletions hyprbars/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:enabled", Hyprlang::INT{1});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:icon_on_hover", Hyprlang::INT{0});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:inactive_button_color", Hyprlang::INT{0}); // unset
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_inactive_color", Hyprlang::INT{-1}); // unset
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:on_double_click", Hyprlang::STRING{""});

HyprlandAPI::addConfigKeyword(PHANDLE, "plugin:hyprbars:hyprbars-button", onNewButton, Hyprlang::SHandlerOptions{});
Expand Down