aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2024-04-05 13:30:39 -0400
committeralyx <alyx@aleteoryx.me>2024-04-05 13:30:39 -0400
commitca7c46e535ac60a976a8c60477fa9424c46b6e3f (patch)
tree61dc653b6992fb08d8b316ca165e77b6bb44f674 /src/config.rs
parentd7727c21586734f19d016fc84f94eaf0764eda34 (diff)
downloadlfm_embed-ca7c46e535ac60a976a8c60477fa9424c46b6e3f.tar.gz
lfm_embed-ca7c46e535ac60a976a8c60477fa9424c46b6e3f.tar.bz2
lfm_embed-ca7c46e535ac60a976a8c60477fa9424c46b6e3f.zip
lua loading
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 350786d..008eb7a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -21,7 +21,8 @@ pub struct Config {
pub(crate) default_theme: Arc<str>,
pub(crate) theme_dir: Option<Arc<str>>,
- pub(crate) theme_ext: Arc<str>,
+ pub(crate) theme_ext_hbs: Arc<str>,
+ pub(crate) theme_ext_lua: Arc<str>,
pub(crate) theme_debug: bool,
pub(crate) allowlist: BTreeSet<String>,
@@ -45,7 +46,8 @@ impl Config {
default_theme: var("LFME_THEME_DEFAULT").map(Into::into).unwrap_or_else(|_| "plain".into()),
theme_dir: var("LFME_THEME_DIR").ok().map(Into::into),
- theme_ext: var("LFME_THEME_EXT").unwrap_or_else(|_| ".hbs".into()).into(),
+ theme_ext_hbs: var("LFME_THEME_EXT_HBS").unwrap_or_else(|_| ".hbs".into()).into(),
+ theme_ext_lua: var("LFME_THEME_EXT_LUA").unwrap_or_else(|_| ".lua".into()).into(),
theme_debug: var("LFME_THEME_DEV").map(|h| &h == "1").unwrap_or(false),
allowlist: var("LFME_WHITELIST").or_else(|_| var("LFME_ALLOWLIST")).ok().map(|w| w.split(',').map(|s| s.trim().to_string()).collect()).unwrap_or_default(),