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:
parent
6dcae66570
commit
1e38719996
4 changed files with 15 additions and 0 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue