diff --git a/Cargo.lock b/Cargo.lock index 8be6d9e..28e1e0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,7 +859,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "owlry" -version = "0.1.2" +version = "0.1.3" dependencies = [ "clap", "dirs", diff --git a/Cargo.toml b/Cargo.toml index 61fefc3..ce542f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "owlry" -version = "0.1.2" +version = "0.1.3" edition = "2024" rust-version = "1.90" description = "A lightweight, owl-themed application launcher for Wayland" diff --git a/src/main.rs b/src/main.rs index f1b1ce8..7eca455 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ mod ui; use app::OwlryApp; use cli::CliArgs; -use log::info; +use log::{info, warn}; fn main() { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); @@ -17,6 +17,18 @@ fn main() { info!("Starting Owlry launcher"); + // Diagnostic: log critical environment variables + let home = std::env::var("HOME").unwrap_or_else(|_| "".to_string()); + let path = std::env::var("PATH").unwrap_or_else(|_| "".to_string()); + let xdg_data = std::env::var("XDG_DATA_HOME").unwrap_or_else(|_| "".to_string()); + info!("HOME={}", home); + info!("PATH={}", path); + info!("XDG_DATA_HOME={}", xdg_data); + + if home == "" || path == "" { + warn!("Critical environment variables missing! Items may not load correctly."); + } + let app = OwlryApp::new(args); std::process::exit(app.run()); } diff --git a/src/providers/mod.rs b/src/providers/mod.rs index ea68a92..b825c29 100644 --- a/src/providers/mod.rs +++ b/src/providers/mod.rs @@ -10,6 +10,7 @@ pub use uuctl::UuctlProvider; use fuzzy_matcher::FuzzyMatcher; use fuzzy_matcher::skim::SkimMatcherV2; +use log::info; /// Represents a single searchable/launchable item #[derive(Debug, Clone)] @@ -110,6 +111,11 @@ impl ProviderManager { pub fn refresh_all(&mut self) { for provider in &mut self.providers { provider.refresh(); + info!( + "Provider '{}' loaded {} items", + provider.name(), + provider.items().len() + ); } }