diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-05-07 00:39:04 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-05-07 00:39:04 +0100 |
| commit | 4fab2afced44e745d5af85184fd9c3997af2374a (patch) | |
| tree | f38b89f120ac4a96c04ff470e4abd770b22ba546 /src/config/lua | |
| parent | 78b8ce229c098a9911e2fe0dbc02f4b8340f70a9 (diff) | |
config: use lua by default, generate lua if no config present
Diffstat (limited to 'src/config/lua')
| -rw-r--r-- | src/config/lua/ConfigManager.cpp | 6 | ||||
| -rw-r--r-- | src/config/lua/DefaultConfig.hpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/config/lua/ConfigManager.cpp b/src/config/lua/ConfigManager.cpp index 0f0c1030..8b90b4be 100644 --- a/src/config/lua/ConfigManager.cpp +++ b/src/config/lua/ConfigManager.cpp @@ -805,10 +805,10 @@ std::expected<void, std::string> CConfigManager::generateDefaultConfig(const std return std::unexpected("Config could not be generated."); if (!safeMode) { - ofs << AUTOGENERATED_PREFIX; - ofs << EXAMPLE_CONFIG; + ofs << AUTOGENERATED_PREFIX_LUA; + ofs << EXAMPLE_CONFIG_LUA; } else { - std::string n = std::string{EXAMPLE_CONFIG}; + std::string n = std::string{EXAMPLE_CONFIG_LUA}; replaceInString(n, "\nlocal menu = \"hyprlauncher\"\n", "\nlocal menu = \"hyprland-run\"\n"); ofs << n; } diff --git a/src/config/lua/DefaultConfig.hpp b/src/config/lua/DefaultConfig.hpp index 6fe92679..8911a8cb 100644 --- a/src/config/lua/DefaultConfig.hpp +++ b/src/config/lua/DefaultConfig.hpp @@ -2,7 +2,7 @@ #include <string_view> -inline constexpr std::string_view AUTOGENERATED_PREFIX = R"#( +inline constexpr std::string_view AUTOGENERATED_PREFIX_LUA = R"#( -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- AUTOGENERATED HYPRLAND CONFIG. -- -- EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS. -- @@ -11,8 +11,8 @@ inline constexpr std::string_view AUTOGENERATED_PREFIX = R"#( hl.config({ autogenerated = true }) -- remove this line to remove the warning )#"; -inline constexpr char EXAMPLE_CONFIG_BYTES[] = { +inline constexpr char EXAMPLE_CONFIG_BYTES_LUA[] = { #embed "../../../example/hyprland.lua" }; -inline constexpr std::string_view EXAMPLE_CONFIG = {EXAMPLE_CONFIG_BYTES, sizeof(EXAMPLE_CONFIG_BYTES)}; +inline constexpr std::string_view EXAMPLE_CONFIG_LUA = {EXAMPLE_CONFIG_BYTES_LUA, sizeof(EXAMPLE_CONFIG_BYTES_LUA)}; |
