refactor: replacing yuck references with rhai

This commit is contained in:
Byson94
2025-07-25 19:46:54 +05:30
parent 509395383a
commit d7548392dd
4 changed files with 6 additions and 6 deletions

View File

@@ -40,11 +40,11 @@ pub struct EwwConfig {
impl EwwConfig {
/// Load an [`EwwConfig`] from the config dir of the given [`crate::EwwPaths`], reading the main config file.
pub fn read_from_dir(files: &mut FileDatabase, eww_paths: &EwwPaths) -> Result<Self> {
let yuck_path = eww_paths.get_rhai_path();
if !yuck_path.exists() {
bail!("The configuration file `{}` does not exist", yuck_path.display());
let rhai_path = eww_paths.get_rhai_path();
if !rhai_path.exists() {
bail!("The configuration file `{}` does not exist", rhai_path.display());
}
let config = Config::generate_from_main_file(files, yuck_path)?;
let config = Config::generate_from_main_file(files, rhai_path)?;
// run some validations on the configuration
let magic_globals: Vec<_> =

View File

@@ -85,7 +85,7 @@ impl EwwPaths {
// Modified this code with rhai (the new yuck replacer in ewwii)
pub fn get_rhai_path(&self) -> PathBuf {
self.config_dir.join("eww.rhai")
self.config_dir.join("ewwii.rhai")
}
}

View File

@@ -2,7 +2,7 @@ use iirhai::parser::parse_widget_code;
use std::fs;
fn main() {
let input = fs::read_to_string("examples/eww-bar/eww.rhai") // run from root of ewwii/
let input = fs::read_to_string("examples/eww-bar/ewwii.rhai") // run from root of ewwii/
.expect("Should have been able to read the file");
let result = parse_widget_code(&input);