* install pango in CI * <includes> xml support and EwwConfig merging * Moved EwwConfig changes after merge * Implemented relative paths * Implemented paths in error messages * Corrected include's error context message * Written merge_includes test, fixed a simple bug * Added "includes" label error check * cargo format * install pango in CI * <includes> xml support and EwwConfig merging * Moved EwwConfig changes after merge * Implemented relative paths * Implemented paths in error messages * Corrected include's error context message * Written merge_includes test, fixed a simple bug * Added "includes" label error check * cargo format * Removed outdated comments and unused imports * Fix dependency error * Updated docs to add the <includes> block * Removed unnecessary comment Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com> * Removed duplicated test block Should'nt be there in the first place. My bad. Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com> * Better error context handling in eww_config.rs Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com> * Better error context handling in eww_config.rs (again) Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com> * Removed unnecessary error check Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com> Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com> Co-authored-by: druskus20@gmail.com <druskus20>
35 lines
716 B
Rust
35 lines
716 B
Rust
use crate::{
|
|
util,
|
|
value::{PrimitiveValue, VarName},
|
|
};
|
|
|
|
use anyhow::*;
|
|
|
|
use element::*;
|
|
use xml_ext::*;
|
|
|
|
pub mod element;
|
|
pub mod eww_config;
|
|
pub mod script_var;
|
|
pub mod window_definition;
|
|
pub mod window_geometry;
|
|
pub mod xml_ext;
|
|
pub use eww_config::*;
|
|
pub use script_var::*;
|
|
pub use window_definition::*;
|
|
pub use window_geometry::*;
|
|
|
|
#[macro_export]
|
|
macro_rules! ensure_xml_tag_is {
|
|
($element:ident, $name:literal) => {
|
|
ensure!(
|
|
$element.tag_name() == $name,
|
|
anyhow!(
|
|
"{} | Tag needed to be of type '{}', but was: {}",
|
|
$element.text_pos(),
|
|
$name,
|
|
$element.as_tag_string()
|
|
)
|
|
)
|
|
};
|
|
}
|