This commit is contained in:
Mars 2025-05-05 23:19:41 -04:00
parent 013ecdda58
commit 3f4e26ec0f
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
19 changed files with 3244 additions and 427 deletions

45
src/ui/ui.hpp Normal file
View file

@ -0,0 +1,45 @@
#pragma once
#include <ftxui/dom/elements.hpp> // ftxui::Element
#include <ftxui/screen/color.hpp> // ftxui::Color
#include "src/config/config.hpp"
#include "src/core/system_data.hpp"
#include "src/util/types.hpp"
namespace ui {
struct Theme {
ftxui::Color::Palette16 icon;
ftxui::Color::Palette16 label;
ftxui::Color::Palette16 value;
ftxui::Color::Palette16 border;
};
extern const Theme DEFAULT_THEME;
struct Icons {
util::types::StringView user;
util::types::StringView palette;
util::types::StringView calendar;
util::types::StringView host;
util::types::StringView kernel;
util::types::StringView os;
util::types::StringView memory;
util::types::StringView weather;
util::types::StringView music;
util::types::StringView disk;
util::types::StringView shell;
util::types::StringView package;
util::types::StringView desktop;
util::types::StringView windowManager;
};
extern const Icons ICON_TYPE;
/**
* @brief Creates the main UI element based on system data and configuration.
* @param config The application configuration.
* @param data The collected system data. @return The root ftxui::Element for rendering.
*/
fn CreateUI(const Config& config, const os::SystemData& data) -> ftxui::Element;
} // namespace ui