Not use inotify on non-linux compile targets
This commit is contained in:
parent
9238688774
commit
e9af869a0a
2 changed files with 12 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ pub fn initialize_server(config_dir_override: Option<std::path::PathBuf>) -> 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<P: AsRef<Path>>(
|
||||
config_file_path: P,
|
||||
scss_file_path: P,
|
||||
evt_send: UnboundedSender<app::DaemonCommand>,
|
||||
) -> 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<P: AsRef<Path>>(
|
||||
config_file_path: P,
|
||||
scss_file_path: P,
|
||||
|
|
Loading…
Add table
Reference in a new issue