From 43ca66779b7d267cc6c52bdea75d3ff8eb60132f Mon Sep 17 00:00:00 2001 From: Tuur Vanhoutte <4633209+zjeffer@users.noreply.github.com> Date: Fri, 27 Dec 2024 15:40:46 +0100 Subject: hyprpm: use glaze to parse hyprctl plugin list (#8812) * Use std::filesystem::path in hyprpm DataState to avoid concatenating strings with (folder + "/" + file) * Added getPluginStates helper method in DataState * Small clang-tidy improvements --- hyprpm/src/core/DataState.hpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'hyprpm/src/core/DataState.hpp') diff --git a/hyprpm/src/core/DataState.hpp b/hyprpm/src/core/DataState.hpp index 70788f72..ebb550ba 100644 --- a/hyprpm/src/core/DataState.hpp +++ b/hyprpm/src/core/DataState.hpp @@ -1,4 +1,5 @@ #pragma once +#include #include #include #include "Plugin.hpp" @@ -9,14 +10,15 @@ struct SGlobalState { }; namespace DataState { - std::string getDataStatePath(); - std::string getHeadersPath(); - void ensureStateStoreExists(); - void addNewPluginRepo(const SPluginRepository& repo); - void removePluginRepo(const std::string& urlOrName); - bool pluginRepoExists(const std::string& urlOrName); - void updateGlobalState(const SGlobalState& state); - SGlobalState getGlobalState(); - bool setPluginEnabled(const std::string& name, bool enabled); - std::vector getAllRepositories(); + std::filesystem::path getDataStatePath(); + std::string getHeadersPath(); + std::vector getPluginStates(); + void ensureStateStoreExists(); + void addNewPluginRepo(const SPluginRepository& repo); + void removePluginRepo(const std::string& urlOrName); + bool pluginRepoExists(const std::string& urlOrName); + void updateGlobalState(const SGlobalState& state); + SGlobalState getGlobalState(); + bool setPluginEnabled(const std::string& name, bool enabled); + std::vector getAllRepositories(); }; \ No newline at end of file -- cgit v1.2.3