Clean up config option definitions

This commit is contained in:
outfoxxed 2023-07-31 23:00:25 -07:00
parent 42aae529ad
commit 71f9c39129
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -14,63 +14,31 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
selection_hook::init();
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:no_gaps_when_only",
SConfigValue {.intValue = 0}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:node_collapse_policy",
SConfigValue {.intValue = 2}
);
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:group_inset", SConfigValue {.intValue = 10});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:height", SConfigValue {.intValue = 15});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:padding", SConfigValue {.intValue = 5});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:from_top", SConfigValue {.intValue = 0});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:rounding", SConfigValue {.intValue = 3});
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:render_text", SConfigValue {.intValue = 1});
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:text_font",
SConfigValue {.strValue = "Sans"}
);
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:text_height", SConfigValue {.intValue = 8});
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:text_padding",
SConfigValue {.intValue = 3}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.active",
SConfigValue {.intValue = 0xff32b4ff}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.urgent",
SConfigValue {.intValue = 0xffff4f4f}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.inactive",
SConfigValue {.intValue = 0x80808080}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.text.active",
SConfigValue {.intValue = 0xff000000}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.text.urgent",
SConfigValue {.intValue = 0xff000000}
);
HyprlandAPI::addConfigValue(
PHANDLE,
"plugin:hy3:tabs:col.text.inactive",
SConfigValue {.intValue = 0xff000000}
);
#define CONF(NAME, TYPE, VALUE) \
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:" NAME, SConfigValue {.TYPE##Value = VALUE})
// general
CONF("no_gaps_when_only", int, 0);
CONF("node_collapse_policy", int, 2);
CONF("group_inset", int, 10);
// tabs
CONF("tabs:height", int, 15);
CONF("tabs:padding", int, 5);
CONF("tabs:from_top", int, 0);
CONF("tabs:rounding", int, 3);
CONF("tabs:render_text", int, 1);
CONF("tabs:text_font", str, "Sans");
CONF("tabs:text_height", int, 8);
CONF("tabs:text_padding", int, 3);
CONF("tabs:col.active", int, 0xff32b4ff);
CONF("tabs:col.urgent", int, 0xffff4f4f);
CONF("tabs:col.inactive", int, 0x80808080);
CONF("tabs:col.text.active", int, 0xff000000);
CONF("tabs:col.text.urgent", int, 0xff000000);
CONF("tabs:col.text.inactive", int, 0xff000000);
#undef CONF
g_Hy3Layout = std::make_unique<Hy3Layout>();
HyprlandAPI::addLayout(PHANDLE, "hy3", g_Hy3Layout.get());