diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2023-08-21 16:12:23 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2023-08-21 16:12:23 +0300 |
| commit | d1fe8e5999a5b16cfed7519f80b9710a7fbe1411 (patch) | |
| tree | 5e13c09e6a11398fe5d2f936ad3a33863b9c77f5 /src/state.rs | |
| parent | f4fe586d35dee16ff13930451e79b23a0079129c (diff) | |
| download | i3bar-mango-d1fe8e5999a5b16cfed7519f80b9710a7fbe1411.tar.gz | |
allow setting config path via cli args
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/state.rs b/src/state.rs index f98e037..dcf7fbe 100644 --- a/src/state.rs +++ b/src/state.rs @@ -5,6 +5,7 @@ use crate::wm_info_provider::*; use std::fmt::Display; use std::os::unix::io::{AsRawFd, RawFd}; +use std::path::Path; use wayrs_client::global::{GlobalExt, Globals, GlobalsExt}; use wayrs_client::proxy::Proxy; @@ -52,10 +53,10 @@ struct Pointer { } impl State { - pub fn new(conn: &mut Connection<Self>, globals: &Globals) -> Self { + pub fn new(conn: &mut Connection<Self>, globals: &Globals, config_path: Option<&Path>) -> Self { let mut error = Ok(()); - let config = Config::new() + let config = Config::new(config_path) .map_err(|e| error = Err(e)) .unwrap_or_default(); |
