diff --git a/Cargo.toml b/Cargo.toml index 2f60722..5937eb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,6 @@ tokio-stream = "0.1" async-stream = "0.3" futures-core = "0.3" futures-util = "0.3" -inotify = "0.9" tokio-util = "0.6" diff --git a/src/server.rs b/src/server.rs index f04750a..4dc24b9 100644 --- a/src/server.rs +++ b/src/server.rs @@ -26,7 +26,8 @@ pub fn initialize_server(config_dir_override: Option) -> Res .parent() .context("config file did not have a parent?!")? .to_owned(); - std::env::set_current_dir(&config_dir).with_context(|| { format!("Failed to change working directory to {}", config_dir.display()) } )?; + std::env::set_current_dir(&config_dir) + .with_context(|| format!("Failed to change working directory to {}", config_dir.display()))?; let scss_file_path = config_dir.join("eww.scss"); log::info!("reading configuration from {:?}", &config_file_path); @@ -108,7 +109,17 @@ fn init_async_part(config_file_path: PathBuf, scss_file_path: PathBuf, ui_send: }); } +#[cfg(not(target_os = "linux"))] +async fn run_filewatch>( + config_file_path: P, + scss_file_path: P, + evt_send: UnboundedSender, +) -> Result<()> { + Ok(()) +} + /// Watch configuration files for changes, sending reload events to the eww app when the files change. +#[cfg(target_os = "linux")] async fn run_filewatch>( config_file_path: P, scss_file_path: P,