core/command: filter instance selection by current display

This commit is contained in:
outfoxxed committed 2025-10-12 17:33:21 -07:00
1 parent 1e8cc2e78d
commit 00858812f2
9 files changed
+50 -9

No files matched your search

+6 -2
View File
@@ -16,7 +16,7 @@ int parseCommand(int argc, char** argv, CommandState& state) {
.argv = argv,
};
auto addConfigSelection = [&](CLI::App* cmd, bool withNewestOption = false) {
auto addConfigSelection = [&](CLI::App* cmd, bool filtering = false) {
auto* group =
cmd->add_option_group("Config Selection")
->description(
@@ -49,9 +49,13 @@ int parseCommand(int argc, char** argv, CommandState& state) {
->envname("QS_MANIFEST")
->excludes(path);
if (withNewestOption) {
if (filtering) {
group->add_flag("-n,--newest", state.config.newest)
->description("Operate on the most recently launched instance instead of the oldest");
group->add_flag("--any-display", state.config.anyDisplay)
->description("If passed, instances will not be filtered by the display connection they "
"were launched on.");
}
return group;