elkowar/eww · error

Error, the value: for atribute join is not valid

Error message

Error, the value: {} for atribute join is not valid

What it means

During graph drawing, eww parses the `join` attribute style value into a `cairo::LineJoin` (with an associated line cap). Any string other than the accepted values falls through the match's `_` arm and returns this error, which propagates up through `draw` and is reported by the error-handling context. It is an invalid-enum-value error for a widget styling attribute.

Solutions

  1. Change the `join` attribute value in your config to one of the accepted values (e.g. "miter", "round", or "bevel" — lowercase, as matched in apply_line_style).
  2. Check for case/whitespace typos in the attribute string.
  3. Remove the `join` attribute to use the default.

Example fix

// before
(graph :join "smooth" ...)
// after
(graph :join "round" ...)
Defensive patterns

Strategy: validation

Validate before calling

fn valid_join(v: &str) -> bool { matches!(v, "miter" | "round" | "bevel") }

Type guard

fn parse_join(v: &str) -> Option<&'static str> {
    ["miter", "round", "bevel"].into_iter().find(|ok| v.eq_ignore_ascii_case(ok))
}

Prevention

When it happens

Trigger: Setting `:join` on a graph widget to a value other than "miter", "round", or "bevel" (as accepted by apply_line_style's match).

Common situations: Typos in eww config such as `:join "Round"` (wrong case) or `:join "smooth"`; copying stroke styles from CSS/other toolkits that use different join names.


AI-assisted analysis of elkowar/eww@48f5aa8b37 (2026-09-08). Data as JSON: /api/errors/7947cfa0285fd60e. Report an issue: GitHub.

Appendix: source

Thrown at crates/eww/src/widgets/graph.rs:322

        glib::Propagation::Proceed
    }
}

fn apply_line_style(style: &str, cr: &cairo::Context) -> Result<()> {
    match style {
        "miter" => {
            cr.set_line_cap(cairo::LineCap::Butt);
            cr.set_line_join(cairo::LineJoin::Miter);
        }
        "bevel" => {
            cr.set_line_cap(cairo::LineCap::Square);
            cr.set_line_join(cairo::LineJoin::Bevel);
        }
        "round" => {
            cr.set_line_cap(cairo::LineCap::Round);
            cr.set_line_join(cairo::LineJoin::Round);
        }
        _ => Err(anyhow!("Error, the value: {} for atribute join is not valid", style))?,
    };
    Ok(())
}

View on GitHub (pinned to 48f5aa8b37)