fix: make background id optional so usages of -b, --bg do not require a fallback background (as expected) fixes #300

This commit is contained in:
Almamu 2025-05-15 22:18:33 +02:00
parent 8b131fefb2
commit 555b488951

View File

@ -26,8 +26,11 @@ CApplicationContext::CApplicationContext (int argc, char* argv []) :
backgroundGroup.add_argument ("background id")
.help ("The background to use as default for screens with no background specified")
.default_value ("")
.action([this](const std::string& value) -> void {
this->settings.general.defaultBackground = translateBackground (value);
if (!value.empty()) {
this->settings.general.defaultBackground = translateBackground (value);
}
});
backgroundMode.add_argument ("-w", "--window")