2023-05-10 00:42:53 -07:00
|
|
|
#include <optional>
|
|
|
|
|
2023-04-27 11:14:11 -07:00
|
|
|
#include <hyprland/src/Compositor.hpp>
|
2023-06-07 03:22:17 -07:00
|
|
|
#include <hyprland/src/plugins/PluginAPI.hpp>
|
2023-04-12 01:33:00 -07:00
|
|
|
|
2023-06-28 21:36:08 -07:00
|
|
|
#include "dispatchers.hpp"
|
2023-04-17 00:53:02 -07:00
|
|
|
#include "globals.hpp"
|
2023-04-30 00:47:01 -07:00
|
|
|
#include "SelectionHook.hpp"
|
2023-04-12 01:33:00 -07:00
|
|
|
|
2023-06-07 03:22:17 -07:00
|
|
|
APICALL EXPORT std::string PLUGIN_API_VERSION() { return HYPRLAND_API_VERSION; }
|
2023-04-12 01:33:00 -07:00
|
|
|
|
|
|
|
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
|
|
|
PHANDLE = handle;
|
|
|
|
|
2023-04-30 00:47:01 -07:00
|
|
|
selection_hook::init();
|
|
|
|
|
2023-06-07 03:22:17 -07:00
|
|
|
HyprlandAPI::addConfigValue(
|
|
|
|
PHANDLE,
|
|
|
|
"plugin:hy3:no_gaps_when_only",
|
|
|
|
SConfigValue {.intValue = 0}
|
|
|
|
);
|
|
|
|
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}
|
|
|
|
);
|
2023-04-17 00:53:02 -07:00
|
|
|
|
2023-04-12 01:33:00 -07:00
|
|
|
g_Hy3Layout = std::make_unique<Hy3Layout>();
|
|
|
|
HyprlandAPI::addLayout(PHANDLE, "hy3", g_Hy3Layout.get());
|
|
|
|
|
2023-06-28 21:36:08 -07:00
|
|
|
registerDispatchers();
|
2023-04-12 01:33:00 -07:00
|
|
|
|
|
|
|
return {"hy3", "i3 like layout for hyprland", "outfoxxed", "0.1"};
|
|
|
|
}
|
|
|
|
|
|
|
|
APICALL EXPORT void PLUGIN_EXIT() {}
|