Skip to content

Commit

Permalink
added -preview-cmd string option to program settings
Browse files Browse the repository at this point in the history
  • Loading branch information
giomatfois62 committed Feb 2, 2024
1 parent 5b64132 commit 423ee4e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions include/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions source/xrmoptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 423ee4e

Please sign in to comment.