summaryrefslogtreecommitdiff
path: root/src/config/constants.rs
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-07-26 10:32:55 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2024-07-26 10:32:55 +0200
commit6ca07d6af8a338e76817d06c6c6c6f13e64fba9c (patch)
tree32680f0942da8c45af8425ebc20330f5456a9213 /src/config/constants.rs
parent8b7c56df1940d2ac6e3ece3385464009e46382fa (diff)
add neosheetrc support
Diffstat (limited to 'src/config/constants.rs')
-rw-r--r--src/config/constants.rs23
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(),
+ }
+ };
+}