mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-11-25 11:45:59 +01:00
parent
2cc193e6dc
commit
69e596af68
3 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,8 @@ plugin {
|
||||||
|
|
||||||
`bar_text_font` -> (str) bar's title text font (default "Sans")
|
`bar_text_font` -> (str) bar's title text font (default "Sans")
|
||||||
|
|
||||||
|
`bar_part_of_window` -> (bool) whether the bar is a part of the main window (if it is, stuff like shadows render around it)
|
||||||
|
|
||||||
## Buttons Config
|
## Buttons Config
|
||||||
|
|
||||||
Use the `hyprbars-button` keyword.
|
Use the `hyprbars-button` keyword.
|
||||||
|
|
|
@ -466,7 +466,8 @@ eDecorationLayer CHyprBar::getDecorationLayer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t CHyprBar::getDecorationFlags() {
|
uint64_t CHyprBar::getDecorationFlags() {
|
||||||
return DECORATION_ALLOWS_MOUSE_INPUT | DECORATION_PART_OF_MAIN_WINDOW;
|
static auto* const PPART = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:bar_part_of_window")->intValue;
|
||||||
|
return DECORATION_ALLOWS_MOUSE_INPUT | (*PPART ? DECORATION_PART_OF_MAIN_WINDOW : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBox CHyprBar::assignedBoxGlobal() {
|
CBox CHyprBar::assignedBoxGlobal() {
|
||||||
|
|
|
@ -70,6 +70,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
||||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:col.text", SConfigValue{.intValue = configStringToInt("rgba(ffffffff)")});
|
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:col.text", SConfigValue{.intValue = configStringToInt("rgba(ffffffff)")});
|
||||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_size", SConfigValue{.intValue = 10});
|
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_size", SConfigValue{.intValue = 10});
|
||||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_font", SConfigValue{.strValue = "Sans"});
|
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_font", SConfigValue{.strValue = "Sans"});
|
||||||
|
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_part_of_window", SConfigValue{.intValue = 1});
|
||||||
|
|
||||||
HyprlandAPI::addConfigKeyword(PHANDLE, "hyprbars-button", [&](const std::string& k, const std::string& v) { onNewButton(k, v); });
|
HyprlandAPI::addConfigKeyword(PHANDLE, "hyprbars-button", [&](const std::string& k, const std::string& v) { onNewButton(k, v); });
|
||||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "preConfigReload", [&](void* self, SCallbackInfo& info, std::any data) { onPreConfigReload(); });
|
HyprlandAPI::registerCallbackDynamic(PHANDLE, "preConfigReload", [&](void* self, SCallbackInfo& info, std::any data) { onPreConfigReload(); });
|
||||||
|
|
Loading…
Reference in a new issue