pub fn write<Output: Write>(&self, output: &mut Output) -> Result<()> {
        if let Some(config_dirs) = Config::get_default_locations() {
            let xdg_conf_path = &config_dirs[1];
            if let Some(parent) = xdg_conf_path.parent() {
                if !parent.exists() {
                    fs::create_dir_all(parent)?;
                }
            }
            let contents = toml::to_string(&self)?;
            writeln!(
                output,
                "{} {} {}",
                FOUND_EMOTICON.magenta(),
                "writing the default configuration to".green().bold(),
                format!("{:?}", xdg_conf_path).white().italic()
            )?;
            fs::write(xdg_conf_path, contents)?;
        }
        Ok(())
    }
Writes the configuration file to the default location (XDG style).
src/config.rs