aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2024-06-20 12:50:19 +0200
committerNRK <nrk@disroot.org>2024-06-20 12:50:19 +0200
commit0620d473c2df34d02137fb22c23fb0f166b0e1a1 (patch)
treea20656575eb726cc62d9736a28f78d6ce581a39f /config.def.h
parent9b8cdcff482a518c24d31ce74524543bb7015102 (diff)
downloadnsxiv-0620d473c2df34d02137fb22c23fb0f166b0e1a1.tar.zst
allow {white,black}listing thumbnail cache dirs (#461)
this adds the cli flags --cache-{allow,deny} along with corresponding config.h vars which allows the user to control which directories will have thumbnail cache written. this is a more general version of the `cache-whitelist` patch that existed in the nsxiv-extra repo: https://codeberg.org/nsxiv/nsxiv-extra/src/commit/21cb27cee7/patches/cache-whitelist Closes: https://codeberg.org/nsxiv/nsxiv/issues/454
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 7fbfb17..ead1509 100644
--- a/config.def.h
+++ b/config.def.h
@@ -70,6 +70,14 @@ static const bool ANTI_ALIAS = true;
*/
static const bool ALPHA_LAYER = false;
+/* list of whitelisted/blacklisted directory for thumbnail cache
+ * (overwritten via --cache-{allow,deny} option).
+ * see THUMBNAIL CACHING section in nsxiv(1) manpage for more details.
+ */
+static const char TNS_FILTERS[] = "";
+/* set to true to treat `TNS_FILTERS` as a blacklist instead */
+static const bool TNS_FILTERS_IS_BLACKLIST = false;
+
#endif
#ifdef INCLUDE_THUMBS_CONFIG