test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
32
.config/Code/User/History/fe0fa9d/01iS.cpp
Normal file
32
.config/Code/User/History/fe0fa9d/01iS.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", [void](void* ptr, ){
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/0QGy.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/0QGy.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
31
.config/Code/User/History/fe0fa9d/0crK.cpp
Normal file
31
.config/Code/User/History/fe0fa9d/0crK.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", [](void* ptr, SCallbackInfo& window, std::any a){
|
||||
std::cout<<"window switched\n";
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/0vjo.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/0vjo.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
27
.config/Code/User/History/fe0fa9d/3dxD.cpp
Normal file
27
.config/Code/User/History/fe0fa9d/3dxD.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [](void* data, SCallbackInfo& info, std::any event){
|
||||
std::cout<<"Nice\n";
|
||||
});
|
||||
|
||||
return {"sttracker", "Screen Time Tracker", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
}
|
34
.config/Code/User/History/fe0fa9d/3sY4.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/3sY4.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
PHLWINDOW window = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
26
.config/Code/User/History/fe0fa9d/7Epx.cpp
Normal file
26
.config/Code/User/History/fe0fa9d/7Epx.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/Bhy9.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/Bhy9.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
WINDOW.get();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/D8oz.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/D8oz.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
PHLWINDOW window = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
4
.config/Code/User/History/fe0fa9d/Fb3E.cpp
Normal file
4
.config/Code/User/History/fe0fa9d/Fb3E.cpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
34
.config/Code/User/History/fe0fa9d/JaV6.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/JaV6.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
std::cout<<data;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/JvzF.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/JvzF.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/LRbL.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/LRbL.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
auto callback = HyprlandAPI::registerCallbackDynamic(handle, "activewindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/MYt8.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/MYt8.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/MmkP.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/MmkP.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
27
.config/Code/User/History/fe0fa9d/N84O.cpp
Normal file
27
.config/Code/User/History/fe0fa9d/N84O.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [](void* data, SCallbackInfo& info, std::any event){
|
||||
|
||||
});
|
||||
|
||||
return {"sttracker", "Screen Time Tracker", "Me", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
}
|
34
.config/Code/User/History/fe0fa9d/Q4PN.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/Q4PN.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/TGtO.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/TGtO.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
CWindow* a = WINDOW.get();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
25
.config/Code/User/History/fe0fa9d/WK5s.cpp
Normal file
25
.config/Code/User/History/fe0fa9d/WK5s.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return {"sttracker", "Screen Time Tracker", "Me", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
}
|
26
.config/Code/User/History/fe0fa9d/XtmA.cpp
Normal file
26
.config/Code/User/History/fe0fa9d/XtmA.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/Y6Ms.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/Y6Ms.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/Y8N9.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/Y8N9.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
auto callback = HyprlandAPI::registerCallbackDynamic(handle, "openWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/Zbuy.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/Zbuy.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
24
.config/Code/User/History/fe0fa9d/aVUZ.cpp
Normal file
24
.config/Code/User/History/fe0fa9d/aVUZ.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
return {"MyPlugin", "An amazing plugin that is going to change the world!", "Me", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
// ...
|
||||
}
|
34
.config/Code/User/History/fe0fa9d/bxVm.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/bxVm.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
27
.config/Code/User/History/fe0fa9d/dhVy.cpp
Normal file
27
.config/Code/User/History/fe0fa9d/dhVy.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [](void* data, SCallbackInfo& info, std::any event){
|
||||
std::cout<<"Nice\n";
|
||||
});
|
||||
|
||||
return {"sttracker", "Screen Time Tracker", "Me", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
}
|
1
.config/Code/User/History/fe0fa9d/entries.json
Normal file
1
.config/Code/User/History/fe0fa9d/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/C%2B%2B/sttracker/main.cpp","entries":[{"id":"WK5s.cpp","timestamp":1715872358474},{"id":"N84O.cpp","timestamp":1715872587771},{"id":"dhVy.cpp","timestamp":1715872655861},{"id":"tcMa.cpp","timestamp":1715873675511},{"id":"3dxD.cpp","timestamp":1716432918229},{"id":"Fb3E.cpp","timestamp":1716620419737},{"id":"aVUZ.cpp","timestamp":1716620456155},{"id":"pdiQ.cpp","timestamp":1716620477242},{"id":"wDz9.cpp","timestamp":1716620514886},{"id":"7Epx.cpp","timestamp":1716622467139},{"id":"XtmA.cpp","timestamp":1716623711742},{"id":"01iS.cpp","timestamp":1716638020272},{"id":"fQnI.cpp","timestamp":1716638104524},{"id":"rwda.cpp","timestamp":1716638210182},{"id":"hflS.cpp","timestamp":1716638253260},{"id":"0crK.cpp","timestamp":1716638602073},{"id":"gKVN.cpp","timestamp":1716638661873},{"id":"ruZU.cpp","timestamp":1716638855603},{"id":"m2kM.cpp","timestamp":1716638866019},{"id":"Y6Ms.cpp","timestamp":1716638883755},{"id":"tOQL.cpp","timestamp":1716639075646},{"id":"vytY.cpp","timestamp":1716639090835},{"id":"zKny.cpp","timestamp":1716639120939},{"id":"kPWT.cpp","timestamp":1716639220252},{"id":"Y8N9.cpp","timestamp":1716639325799},{"id":"LRbL.cpp","timestamp":1716639385999},{"id":"gBPd.cpp","timestamp":1716639543667},{"id":"mi1M.cpp","timestamp":1716639688614},{"id":"xtcU.cpp","timestamp":1716639904234},{"id":"0QGy.cpp","timestamp":1716641309320},{"id":"JaV6.cpp","timestamp":1716641500350},{"id":"pHLV.cpp","timestamp":1716641516126},{"id":"MYt8.cpp","timestamp":1716641546095},{"id":"D8oz.cpp","timestamp":1716642704748},{"id":"3sY4.cpp","timestamp":1716642730538},{"id":"l6hm.cpp","timestamp":1716642780544},{"id":"Q4PN.cpp","timestamp":1716642799637},{"id":"bxVm.cpp","timestamp":1716642810281},{"id":"Zbuy.cpp","timestamp":1716642968316},{"id":"mX6z.cpp","timestamp":1716642988078},{"id":"l4wa.cpp","timestamp":1716643033635},{"id":"MmkP.cpp","timestamp":1716643063427},{"id":"qEQK.cpp","timestamp":1716643093145},{"id":"Bhy9.cpp","timestamp":1716643112030},{"id":"jEdi.cpp","timestamp":1716822859772},{"id":"wDSh.cpp","timestamp":1716822886692},{"id":"TGtO.cpp","timestamp":1716822928352},{"id":"wieI.cpp","timestamp":1716822984673},{"id":"0vjo.cpp","timestamp":1716822998836},{"id":"JvzF.cpp","timestamp":1716823039890}]}
|
31
.config/Code/User/History/fe0fa9d/fQnI.cpp
Normal file
31
.config/Code/User/History/fe0fa9d/fQnI.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", [](void* ptr, SCallbackInfo& window, std::any a){
|
||||
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/gBPd.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/gBPd.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
auto callback = HyprlandAPI::registerCallbackDynamic(handle, "activewindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
31
.config/Code/User/History/fe0fa9d/gKVN.cpp
Normal file
31
.config/Code/User/History/fe0fa9d/gKVN.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", [](void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
31
.config/Code/User/History/fe0fa9d/hflS.cpp
Normal file
31
.config/Code/User/History/fe0fa9d/hflS.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", [](void* ptr, SCallbackInfo& window, std::any a){
|
||||
std::cout<<"window switched\n";
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/jEdi.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/jEdi.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/kPWT.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/kPWT.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "openWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/l4wa.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/l4wa.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
std::vector<std::string> a;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/l6hm.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/l6hm.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW window = std::any_cast<PHLWINDOW>(data);
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/m2kM.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/m2kM.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", [](void* self, SCallbackInfo& info, std::any data){
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/mX6z.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/mX6z.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
WINDOW.operator->();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/mi1M.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/mi1M.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
auto callback = HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
34
.config/Code/User/History/fe0fa9d/pHLV.cpp
Normal file
34
.config/Code/User/History/fe0fa9d/pHLV.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
data.type();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
21
.config/Code/User/History/fe0fa9d/pdiQ.cpp
Normal file
21
.config/Code/User/History/fe0fa9d/pdiQ.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/qEQK.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/qEQK.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
WINDOW.get();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
36
.config/Code/User/History/fe0fa9d/ruZU.cpp
Normal file
36
.config/Code/User/History/fe0fa9d/ruZU.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
|
||||
}
|
||||
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activeWindow", [](void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
31
.config/Code/User/History/fe0fa9d/rwda.cpp
Normal file
31
.config/Code/User/History/fe0fa9d/rwda.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", [](void* ptr, SCallbackInfo& window, std::any a){
|
||||
|
||||
});
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/tOQL.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/tOQL.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
27
.config/Code/User/History/fe0fa9d/tcMa.cpp
Normal file
27
.config/Code/User/History/fe0fa9d/tcMa.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [](void* data, SCallbackInfo& info, std::any event){
|
||||
std::cout<<"Nice\n";
|
||||
});
|
||||
|
||||
return {"sttracker", "Screen Time Tracker", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){
|
||||
}
|
33
.config/Code/User/History/fe0fa9d/vytY.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/vytY.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "activewindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/wDSh.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/wDSh.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
WINDOW.get();
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
22
.config/Code/User/History/fe0fa9d/wDz9.cpp
Normal file
22
.config/Code/User/History/fe0fa9d/wDz9.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[MyPlugin] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
35
.config/Code/User/History/fe0fa9d/wieI.cpp
Normal file
35
.config/Code/User/History/fe0fa9d/wieI.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
const PHLWINDOW WINDOW = std::any_cast<PHLWINDOW>(data);
|
||||
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/xtcU.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/xtcU.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
auto callback = HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
33
.config/Code/User/History/fe0fa9d/zKny.cpp
Normal file
33
.config/Code/User/History/fe0fa9d/zKny.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
APICALL EXPORT std::string PLUGIN_API_VERSION(){
|
||||
return HYPRLAND_API_VERSION;
|
||||
}
|
||||
|
||||
void onChangeFocus(void* self, SCallbackInfo& info, std::any data){
|
||||
std::cout<<"window switched\n";
|
||||
}
|
||||
|
||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle){
|
||||
PHANDLE = handle;
|
||||
|
||||
const std::string HASH = __hyprland_api_get_hash();
|
||||
|
||||
// ALWAYS add this to your plugins. It will prevent random crashes coming from
|
||||
// mismatched header versions.
|
||||
if(HASH != GIT_COMMIT_HASH){
|
||||
HyprlandAPI::addNotification(PHANDLE, "[sttracker] Mismatched headers! Can't proceed.", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||
throw std::runtime_error("[sttracker] Version mismatch");
|
||||
}
|
||||
|
||||
std::cout<<"Plugin Started\n";
|
||||
|
||||
HyprlandAPI::registerCallbackDynamic(handle, "openwindow", onChangeFocus);
|
||||
|
||||
|
||||
return {"sttracker", "An amazing plugin that is going to change the world!", "rafay", "1.0"};
|
||||
}
|
||||
|
||||
APICALL EXPORT void PLUGIN_EXIT(){}
|
Loading…
Add table
Add a link
Reference in a new issue