diff --git a/config/config.c b/config/config.c index 7bde97035..4fa34eda7 100644 --- a/config/config.c +++ b/config/config.c @@ -45,6 +45,9 @@ Settings config = { /** Whether to load and show icons */ .show_icons = FALSE, + + /** Custom command to generate preview icons */ + .preview_cmd = NULL, /** Terminal to use. (for ssh and open in terminal) */ .terminal_emulator = "rofi-sensible-terminal", diff --git a/include/settings.h b/include/settings.h index 1af9b9527..5da4279fc 100644 --- a/include/settings.h +++ b/include/settings.h @@ -60,6 +60,9 @@ typedef struct { /** Whether to load and show icons */ gboolean show_icons; + + /** Custom command to generate preview icons */ + char *preview_cmd; /** Terminal to use */ char *terminal_emulator; diff --git a/source/xrmoptions.c b/source/xrmoptions.c index c2f6efc28..72e16bc1b 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -128,6 +128,13 @@ static XrmOption xrmOptions[] = { NULL, "Whether to load and show icons", CONFIG_DEFAULT}, + + {xrm_String, + "preview-cmd", + {.str = &config.preview_cmd}, + NULL, + "Custom command to generate preview icons", + CONFIG_DEFAULT}, {xrm_String, "terminal",