{"record":{"id":"16fda8b91e0a2b73","repo":"elkowar/eww","slug":"script-var-is-not-polling","errorCode":null,"errorMessage":"Script var '{}' is not polling","messagePattern":"Script var '(.+?)' is not polling","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/eww/src/app.rs","lineNumber":380,"sourceCode":"                    Ok(Err(err)) => error_handling_ctx::print_error(anyhow!(err)),\n                    Err(err) => error_handling_ctx::print_error(anyhow!(err)),\n                };\n            }\n        }\n    }\n\n    fn force_poll_variable(&mut self, name: VarName) {\n        match self.eww_config.get_script_var(&name) {\n            Err(err) => error_handling_ctx::print_error(err),\n            Ok(var) => {\n                if let ScriptVarDefinition::Poll(poll_var) = var {\n                    log::debug!(\"force-polling var {}\", &name);\n                    match script_var_handler::run_poll_once(&poll_var) {\n                        Err(err) => error_handling_ctx::print_error(err),\n                        Ok(value) => self.update_global_variable(name, value),\n                    }\n                } else {\n                    error_handling_ctx::print_error(anyhow!(\"Script var '{}' is not polling\", name))\n                }\n            }\n        }\n    }\n\n    /// Close a window and do all the required cleanups in the scope_graph and script_var_handler\n    fn close_window(&mut self, instance_id: &str, auto_reopen: bool) -> Result<()> {\n        if let Some(old_abort_send) = self.window_close_timer_abort_senders.remove(instance_id) {\n            _ = old_abort_send.send(());\n        }\n        let eww_window = self\n            .open_windows\n            .remove(instance_id)\n            .with_context(|| format!(\"Tried to close window with id '{instance_id}', but no such window was open\"))?;\n\n        let scope_index = eww_window.scope_index;\n        eww_window.close();\n","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/elkowar/eww/blob/48f5aa8b379adf29da0b0bb9ca04164f65d8bdaa/crates/eww/src/app.rs#L362-L398","documentation":"Eww's script-var poller keeps two kinds of script variables: polling vars (re-run on an interval) and listen vars (read from a long-running process). When a `poll` command arrives for a variable name, force_poll_variable only finds polling vars in its map; if the name is registered as a listen var (or not a script var at all), it prints this error instead of polling.","triggerScenarios":"Calling the `poll` client command (e.g. `eww poll <name>`) on a variable whose definition uses `:listen` instead of `:interval`/polling, or on a name that is not a script variable.","commonSituations":"Users convert a variable from `:listen` to a polled script or vice versa and forget to update scripts/automation that calls `eww poll`; typos in the variable name passed to `eww poll`.","solutions":["Only call `eww poll` on variables defined with a polling `:interval`, not `:listen` vars","Check the variable definition in eww.yuck/eww.rasi to confirm it is a poll-style script var","Verify the variable name spelling matches the configured script var"],"exampleFix":"; before\n(deflisten disk \"df -h / | tail -1 | awk '{print $5}'\")\n;; $ eww poll disk  -> error\n\n; after: polling var supports `eww poll`\n(defpoll disk :interval \"5s\" \"df -h / | tail -1 | awk '{print $5}'\")","handlingStrategy":"validation","validationCode":"// shell: confirm var is pollable before calling\nconfig=$(grep -E \"defpoll\\s+${name}\" ~/.config/eww/eww.yuck)\nif [ -z \"$config\" ]; then echo \"$name is not a polled var\"; exit 1; fi\neww poll \"$name\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only poll vars defined with :interval/defpoll","Document which vars are listen vs poll in your config","Verify names with `eww state` before scripting against them"],"tags":["eww","script-var","polling"],"backgroundTag":"unsupported-operation","analyzedSha":"48f5aa8b379adf29da0b0bb9ca04164f65d8bdaa","analyzedAt":"2026-09-08T03:13:26.897Z","contentChangedAt":"2026-09-08T03:13:26.897Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}