hypr-chrome v0.1

This commit is contained in:
2026-07-28 21:22:13 +02:00
commit a28a899874
18 changed files with 1227 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include <hyprutils/memory/SharedPtr.hpp>
#include <hyprland/src/config/values/types/BoolValue.hpp>
#include <hyprland/src/config/values/types/ColorValue.hpp>
#include <hyprland/src/config/values/types/IntValue.hpp>
#include <hyprland/src/config/values/types/StringValue.hpp>
#include <hyprland/src/plugins/PluginAPI.hpp>
using IntValue = Config::Values::CIntValue;
using BoolValue = Config::Values::CBoolValue;
using ColorValue = Config::Values::CColorValue;
using StringValue = Config::Values::CStringValue;
// Hyprland's raw color ints (and CHyprColor(uint64_t)) are AARRGGBB, but
// literals are easier to read/write as the more common RRGGBBAA. Convert so
// config defaults can be written in that order.
constexpr uint64_t RGBAToARGB(uint64_t rgba) {
const uint64_t r = (rgba >> 24) & 0xFF;
const uint64_t g = (rgba >> 16) & 0xFF;
const uint64_t b = (rgba >> 8) & 0xFF;
const uint64_t a = rgba & 0xFF;
return (a << 24) | (r << 16) | (g << 8) | b;
}