From 7055d0c138965679bb88ed4db60e2698db66bbf9 Mon Sep 17 00:00:00 2001 From: nyx Date: Thu, 6 Mar 2025 17:06:05 -0500 Subject: master: add option to keep master window position (#9537) --- src/config/ConfigDescriptions.hpp | 6 ++++++ src/config/ConfigManager.cpp | 1 + 2 files changed, 7 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp index 7ed0d03c..690d2e93 100644 --- a/src/config/ConfigDescriptions.hpp +++ b/src/config/ConfigDescriptions.hpp @@ -1770,4 +1770,10 @@ inline static const std::vector CONFIG_OPTIONS = { .type = CONFIG_OPTION_BOOL, .data = SConfigOptionDescription::SBoolData{false}, }, + SConfigOptionDescription{ + .value = "master:always_keep_position", + .description = "whether to keep the master window in its configured position when there are no slave windows", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{false}, + }, }; diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index f85010af..12b43b37 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -562,6 +562,7 @@ CConfigManager::CConfigManager() { registerConfigVar("master:allow_small_split", Hyprlang::INT{0}); registerConfigVar("master:smart_resizing", Hyprlang::INT{1}); registerConfigVar("master:drop_at_cursor", Hyprlang::INT{1}); + registerConfigVar("master:always_keep_position", Hyprlang::INT{0}); registerConfigVar("animations:enabled", Hyprlang::INT{1}); registerConfigVar("animations:first_launch_animation", Hyprlang::INT{1}); -- cgit v1.2.3