From 72e787a706d372c9a92e424e9b13ece929cb2bce Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 24 Aug 2025 00:44:00 +0200 Subject: Remove the stale legacy-cpp implementation The Rust rewrite (crates/) has fully superseded it - keeping both around was actively misleading (main looked like it still shipped a C++ build), and nothing here still depends on it. --- legacy-cpp/src/config/config_manager.h | 101 --------------------------------- 1 file changed, 101 deletions(-) delete mode 100644 legacy-cpp/src/config/config_manager.h (limited to 'legacy-cpp/src/config/config_manager.h') diff --git a/legacy-cpp/src/config/config_manager.h b/legacy-cpp/src/config/config_manager.h deleted file mode 100644 index 97f751e..0000000 --- a/legacy-cpp/src/config/config_manager.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef SRDWM_CONFIG_MANAGER_H -#define SRDWM_CONFIG_MANAGER_H - -#include -#include -#include -#include -#include // Added missing include - -// Forward declarations -class WindowManager; - -// Configuration manager for srdwm -class ConfigManager { -public: - struct KeyBinding { - std::string key; - std::string command; - std::string description; - }; - - struct LayoutConfig { - std::string name; - std::string type; // "tiling", "dynamic", "floating" - std::map properties; - }; - - struct ThemeConfig { - std::string name; - std::map colors; - std::map fonts; - std::map dimensions; - }; - - ConfigManager(); - ~ConfigManager(); - - // Configuration loading - bool load_config(const std::string& config_path); - bool reload_config(); - - // Configuration access - std::string get_string(const std::string& key, const std::string& default_value = "") const; - int get_int(const std::string& key, int default_value = 0) const; - bool get_bool(const std::string& key, bool default_value = false) const; - double get_float(const std::string& key, double default_value = 0.0) const; - - // Key bindings - std::vector get_key_bindings() const; - bool add_key_binding(const std::string& key, const std::string& command, const std::string& description = ""); - bool remove_key_binding(const std::string& key); - - // Layout configuration - std::vector get_layout_configs() const; - LayoutConfig get_layout_config(const std::string& name) const; - - // Theme configuration - ThemeConfig get_theme_config() const; - bool set_theme(const std::string& theme_name); - - // Window rules - struct WindowRule { - std::string match_type; // "class", "title", "role" - std::string match_value; - std::map properties; - }; - - std::vector get_window_rules() const; - bool add_window_rule(const WindowRule& rule); - - // Configuration validation - bool validate_config() const; - std::vector get_validation_errors() const; - -private: - std::string config_path_; - std::map string_values_; - std::map int_values_; - std::map bool_values_; - std::map float_values_; - - std::vector key_bindings_; - std::vector layout_configs_; - std::vector window_rules_; - ThemeConfig current_theme_; - - std::vector validation_errors_; - - // Private methods - void parse_config_file(const std::string& content); - void setup_default_config(); - bool validate_key_binding(const KeyBinding& binding) const; - bool validate_layout_config(const LayoutConfig& config) const; - bool validate_window_rule(const WindowRule& rule) const; - - // Lua integration (placeholder for future implementation) - bool execute_lua_config(const std::string& lua_code); -}; - -#endif // SRDWM_CONFIG_MANAGER_H - -- cgit v1.2.3