1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-02 11:11:04 +02:00

feat: introduce logging in some areas

This commit is contained in:
Jake Stanger 2022-08-25 21:53:57 +01:00
parent 6dcae66570
commit 1e38719996
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 15 additions and 0 deletions

View file

@ -110,12 +110,16 @@ fn create_bars(app: &Application, display: &Display, config: &Config) -> Result<
let outputs = serde_json::from_slice::<Vec<SwayOutput>>(&outputs)?;
debug!("Received {} outputs from Sway IPC", outputs.len());
let num_monitors = display.n_monitors();
for i in 0..num_monitors {
let monitor = display.monitor(i).ok_or_else(|| Report::msg("GTK and Sway are reporting a different number of outputs - this is a severe bug and should never happen"))?;
let monitor_name = &outputs.get(i as usize).ok_or_else(|| Report::msg("GTK and Sway are reporting a different set of outputs - this is a severe bug and should never happen"))?.name;
info!("Creating bar on '{}'", monitor_name);
config.monitors.as_ref().map_or_else(
|| create_bar(app, &monitor, monitor_name, config.clone()),
|config| {