diff options
Diffstat (limited to 'src/config/constants.rs')
| -rw-r--r-- | src/config/constants.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/config/constants.rs b/src/config/constants.rs new file mode 100644 index 0000000..5a8283a --- /dev/null +++ b/src/config/constants.rs @@ -0,0 +1,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(), + } + }; +} |