fix(cli): add monitor-information command

This commit adds a new monitor-information command to make it easier for
people to find the values they need to use the display_index_preferences
configuration option.

re #860
This commit is contained in:
LGUG2Z
2024-06-01 16:48:28 -07:00
parent 1320b7440e
commit aa24c41967
7 changed files with 31 additions and 15 deletions

View File

@@ -834,6 +834,9 @@ enum SubCommand {
Gui,
/// Show a JSON representation of visible windows
VisibleWindows,
/// Show information about connected monitors
#[clap(alias = "monitor-info")]
MonitorInformation,
/// Query the current window manager state
#[clap(arg_required_else_help = true)]
Query(Query),
@@ -2144,6 +2147,9 @@ Stop-Process -Name:komorebi -ErrorAction SilentlyContinue
SubCommand::VisibleWindows => {
print_query(&SocketMessage::VisibleWindows.as_bytes()?);
}
SubCommand::MonitorInformation => {
print_query(&SocketMessage::MonitorInformation.as_bytes()?);
}
SubCommand::Query(arg) => {
print_query(&SocketMessage::Query(arg.state_query).as_bytes()?);
}