1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 23:01:04 +02:00

fix(ipc): support querying against duplicate bar names

It is possible/valid to define multiple bars by the same name by setting `name` on the top-level bar object, but not specifying monitors. This updates IPC to support this scenario.

Allow IPC to act on multiple bars by the same name (#777)
This commit is contained in:
Ridan Vandenbergh 2024-11-16 21:48:12 +01:00 committed by GitHub
parent e7c56ee09b
commit 42e25f5ef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 75 additions and 45 deletions

View file

@ -46,6 +46,7 @@ pub fn handle_response(response: Response, format: Format) {
Format::Plain => match response {
Response::Ok => println!("ok"),
Response::OkValue { value } => println!("{value}"),
Response::Multi { values } => println!("{}", values.join("\n")),
Response::Err { message } => eprintln!("error\n{}", message.unwrap_or_default()),
},
Format::Json => println!(