elkowar/eww · error
The configuration file
Error message
The configuration file `{}` does not exist What it means
EwwConfig::read_from_dir loads the eww configuration from the user's config directory. Before parsing, it checks that the main yuck file (usually eww.yuck) exists; if not, it bails with this error. Eww refuses to start without a main configuration file.
Solutions
- Create the config directory and a main eww.yuck file (`mkdir -p ~/.config/eww && touch ~/.config/eww/eww.yuck`)
- Copy one of eww's example configurations into the expected directory
- Pass --config <dir> pointing at the directory that actually contains eww.yuck
- Verify the expected path printed in the error message exists (`ls <path>`)
Example fix
// before eww open bar # fails: The configuration file `/home/user/.config/eww/eww.yuck` does not exist // after mkdir -p ~/.config/eww printf '(defwindow bar :geometry (geometry :width "100%" :height "32"))' > ~/.config/eww/eww.yuck eww open bar
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
const yuck = `${configDir}/eww.yuck`;
if (!fs.existsSync(yuck)) throw new Error(`Create config first: ${yuck} missing`); Type guard
function hasEwwConfig(dir) { try { return fs.statSync(`${dir}/eww.yuck`).isFile(); } catch { return false; } } Try / catch
try { execSync('eww open bar'); } catch (e) { if (String(e).includes('does not exist')) { console.error('No eww config found; create ~/.config/eww/eww.yuck'); } else { throw e; } } Prevention
- Always create eww.yuck in the config dir before running eww commands
- Use `eww --config <dir>` only with directories containing eww.yuck
- Keep configs under XDG_CONFIG_HOME/eww
- Copy an example config when starting fresh
When it happens
Trigger: Running any eww command (e.g. `eww open`, `eww daemonize`) when the yuck file at eww_paths.get_yuck_path() (typically ~/.config/eww/eww.yuck) does not exist.
Common situations: Fresh install with no config created yet; misspelled config directory passed via --config; config lives in a legacy location after upgrading eww; file renamed or deleted.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- Please provide the path to the config directory, not a file…
- Configuration directory
- Encountered both an SCSS and CSS file. Only one of these…
AI-assisted analysis of elkowar/eww@48f5aa8b37 (2026-09-08).
Data as JSON: /api/errors/dc316807fa05824b.
Report an issue: GitHub.
Appendix: source
Thrown at crates/eww/src/config/eww_config.rs:43
/// Eww configuration structure.
#[derive(Debug, Clone, Default)]
pub struct EwwConfig {
widgets: HashMap<String, WidgetDefinition>,
windows: HashMap<String, WindowDefinition>,
initial_variables: HashMap<VarName, DynVal>,
script_vars: HashMap<VarName, ScriptVarDefinition>,
// map of variables to all pollvars which refer to them in their run-while-expression
run_while_mentions: HashMap<VarName, Vec<VarName>>,
}
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_yuck_path();
if !yuck_path.exists() {
bail!("The configuration file `{}` does not exist", yuck_path.display());
}
let config = Config::generate_from_main_file(files, yuck_path)?;
// run some validations on the configuration
let magic_globals: Vec<_> =
inbuilt::INBUILT_VAR_NAMES.iter().chain(inbuilt::MAGIC_CONSTANT_NAMES).map(|x| VarName::from(*x)).collect();
yuck::config::validate::validate(&config, magic_globals)?;
for (name, def) in &config.widget_definitions {
if widget_definitions::BUILTIN_WIDGET_NAMES.contains(&name.as_str()) {
return Err(
DiagError(ValidationError::AccidentalBuiltinOverride(def.span, name.to_string()).to_diagnostic()).into()
);
}
}
let Config { widget_definitions, window_definitions, mut var_definitions, mut script_vars } = config;
script_vars.extend(inbuilt::get_inbuilt_vars());View on GitHub (pinned to 48f5aa8b37)