From 6ca07d6af8a338e76817d06c6c6c6f13e64fba9c Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Fri, 26 Jul 2024 10:32:55 +0200 Subject: add neosheetrc support --- src/config/constants.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/config/constants.rs (limited to 'src/config/constants.rs') 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(), + } + }; +} -- cgit v1.2.3-70-g09d2