summaryrefslogtreecommitdiff
path: root/src/config/constants.rs
blob: 5a8283a7c3fbbecf35012d9a6c3af4bf9c12d1b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use lazy_static::lazy_static;

lazy_static! {
    pub static ref USER_CONFIG_DIR: String = {
        match dirs::config_local_dir() {
            Some(mut d) => {
                d.push("neosheet");
                d.as_path().to_str().unwrap_or("").to_string()
            }
            None => String::new(),
        }
    };
    pub static ref USER_RC_PATH: String = {
        match dirs::config_local_dir() {
            Some(mut d) => {
                d.push("neosheet");
                d.push("init.lua");
                d.as_path().to_str().unwrap_or("").to_string()
            }
            None => String::new(),
        }
    };
}