mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-26 21:58:10 +01:00
Add some comments
This commit is contained in:
parent
6802afe04a
commit
fd637d2256
2 changed files with 9 additions and 0 deletions
|
@ -75,6 +75,12 @@ pub struct Metaconfig {
|
|||
pub no_xwayland: Option<bool>,
|
||||
}
|
||||
|
||||
/// A metaconfig with fields resolved.
|
||||
///
|
||||
/// The priority is:
|
||||
/// 1. CLI options
|
||||
/// 2. Metaconfig options
|
||||
/// 3. Default metaconfig options where applicable
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct ResolvedMetaconfig {
|
||||
pub command: Vec<String>,
|
||||
|
|
|
@ -136,6 +136,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
.clone()
|
||||
.unwrap_or_else(|| get_config_dir(&base_dirs));
|
||||
|
||||
// Parse the metaconfig once to resolve it with CLI flags.
|
||||
// The metaconfig is parsed a second time when `start_config`
|
||||
// is called below which is not ideal but I'm lazy.
|
||||
let metaconfig = match parse_metaconfig(&config_dir) {
|
||||
Ok(metaconfig) => metaconfig,
|
||||
Err(err) => {
|
||||
|
|
Loading…
Reference in a new issue