summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/dialogs/drun.c97
-rw-r--r--source/dialogs/window.c82
-rw-r--r--source/xrmoptions.c118
3 files changed, 221 insertions, 76 deletions
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 33ce69f8..87efdd54 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -92,6 +92,28 @@ typedef struct
typedef struct
{
+ const char *entry_field_name;
+ gboolean enabled;
+} DRunEntryField;
+
+typedef enum
+{
+ DRUN_MATCH_FIELD_NAME,
+ DRUN_MATCH_FIELD_GENERIC,
+ DRUN_MATCH_FIELD_EXEC,
+ DRUN_MATCH_FIELD_CATEGORIES,
+ DRUN_MATCH_NUM_FIELDS,
+} DRunMatchingFields;
+
+static DRunEntryField matching_entry_fields[DRUN_MATCH_NUM_FIELDS] = {
+ { .entry_field_name = "name", .enabled = TRUE, },
+ { .entry_field_name = "generic", .enabled = TRUE, },
+ { .entry_field_name = "exec", .enabled = TRUE, },
+ { .entry_field_name = "categories", .enabled = TRUE, }
+};
+
+typedef struct
+{
NkXdgThemeContext *xdg_context;
DRunModeEntry *entry_list;
unsigned int cmd_list_length;
@@ -100,9 +122,9 @@ typedef struct
GHashTable *disabled_entries;
unsigned int disabled_entries_length;
GThreadPool *pool;
-
unsigned int expected_line_height;
DRunModeEntry quit_entry;
+
// Theme
const gchar *icon_theme;
} DRunModePrivateData;
@@ -112,6 +134,7 @@ struct RegexEvalArg
DRunModeEntry *e;
gboolean success;
};
+
static gboolean drun_helper_eval_cb ( const GMatchInfo *info, GString *res, gpointer data )
{
// TODO quoting is not right? Find description not very clear, need to check.
@@ -554,6 +577,42 @@ static void drun_icon_fetch ( gpointer data, gpointer user_data )
rofi_view_reload ();
}
+static void drun_mode_parse_entry_fields ()
+{
+ char *savept = NULL;
+ // Make a copy, as strtok will modify it.
+ char *switcher_str = g_strdup ( config.drun_match_fields );
+ const char * const sep = ",#";
+ // Split token on ','. This modifies switcher_str.
+ for ( unsigned int i = 0; i < DRUN_MATCH_NUM_FIELDS; i++ ) {
+ matching_entry_fields[i].enabled = FALSE;
+ }
+ for ( char *token = strtok_r ( switcher_str, sep, &savept ); token != NULL;
+ token = strtok_r ( NULL, sep, &savept ) ) {
+ if ( strcmp ( token, "all" ) == 0 ) {
+ for ( unsigned int i = 0; i < DRUN_MATCH_NUM_FIELDS; i++ ) {
+ matching_entry_fields[i].enabled = TRUE;
+ }
+ break;
+ }
+ else {
+ gboolean matched = FALSE;
+ for ( unsigned int i = 0; i < DRUN_MATCH_NUM_FIELDS; i++ ) {
+ const char * entry_name = matching_entry_fields[i].entry_field_name;
+ if ( strcmp ( token, entry_name ) == 0 ) {
+ matching_entry_fields[i].enabled = TRUE;
+ matched = TRUE;
+ }
+ }
+ if ( !matched ) {
+ g_warning ( "Invalid entry name :%s", token );
+ }
+ }
+ }
+ // Free string that was modified by strtok_r
+ g_free ( switcher_str );
+}
+
static int drun_mode_init ( Mode *sw )
{
if ( mode_get_private_data ( sw ) == NULL ) {
@@ -572,6 +631,7 @@ static int drun_mode_init ( Mode *sw )
pd->xdg_context = nk_xdg_theme_context_new ( drun_icon_fallback_themes, NULL );
nk_xdg_theme_preload_themes_icon ( pd->xdg_context, themes );
get_apps ( pd );
+ drun_mode_parse_entry_fields ();
}
return TRUE;
}
@@ -713,22 +773,30 @@ static int drun_token_match ( const Mode *data, rofi_int_matcher **tokens, unsig
int test = 0;
rofi_int_matcher *ftokens[2] = { tokens[j], NULL };
// Match name
- if ( rmpd->entry_list[index].name ) {
- test = helper_token_match ( ftokens, rmpd->entry_list[index].name );
+ if ( matching_entry_fields[DRUN_MATCH_FIELD_NAME].enabled ) {
+ if ( rmpd->entry_list[index].name ) {
+ test = helper_token_match ( ftokens, rmpd->entry_list[index].name );
+ }
}
- // Match generic name
- if ( test == tokens[j]->invert && rmpd->entry_list[index].generic_name ) {
- test = helper_token_match ( ftokens, rmpd->entry_list[index].generic_name );
+ if ( matching_entry_fields[DRUN_MATCH_FIELD_GENERIC].enabled ) {
+ // Match generic name
+ if ( test == tokens[j]->invert && rmpd->entry_list[index].generic_name ) {
+ test = helper_token_match ( ftokens, rmpd->entry_list[index].generic_name );
+ }
}
- // Match executable name.
- if ( test == tokens[j]->invert ) {
- test = helper_token_match ( ftokens, rmpd->entry_list[index].exec );
+ if ( matching_entry_fields[DRUN_MATCH_FIELD_EXEC].enabled ) {
+ // Match executable name.
+ if ( test == tokens[j]->invert ) {
+ test = helper_token_match ( ftokens, rmpd->entry_list[index].exec );
+ }
}
- // Match against category.
- if ( test == tokens[j]->invert ) {
- gchar **list = rmpd->entry_list[index].categories;
- for ( int iter = 0; test == tokens[j]->invert && list && list[iter]; iter++ ) {
- test = helper_token_match ( ftokens, list[iter] );
+ if ( matching_entry_fields[DRUN_MATCH_FIELD_CATEGORIES].enabled ) {
+ // Match against category.
+ if ( test == tokens[j]->invert ) {
+ gchar **list = rmpd->entry_list[index].categories;
+ for ( int iter = 0; test == tokens[j]->invert && list && list[iter]; iter++ ) {
+ test = helper_token_match ( ftokens, list[iter] );
+ }
}
}
if ( test == 0 ) {
@@ -736,6 +804,7 @@ static int drun_token_match ( const Mode *data, rofi_int_matcher **tokens, unsig
}
}
}
+
return match;
}
diff --git a/source/dialogs/window.c b/source/dialogs/window.c
index 1dac2610..d77369c3 100644
--- a/source/dialogs/window.c
+++ b/source/dialogs/window.c
@@ -54,11 +54,40 @@
#include "widgets/textbox.h"
#include "dialogs/window.h"
+#include "timings.h"
+
#define WINLIST 32
#define CLIENTSTATE 10
#define CLIENTWINDOWTYPE 10
+// Fields to match in window mode
+typedef struct
+{
+ char *field_name;
+ gboolean enabled;
+} WinModeField;
+
+typedef enum
+{
+ WIN_MATCH_FIELD_TITLE,
+ WIN_MATCH_FIELD_CLASS,
+ WIN_MATCH_FIELD_ROLE,
+ WIN_MATCH_FIELD_NAME,
+ WIN_MATCH_FIELD_DESKTOP,
+ WIN_MATCH_NUM_FIELDS,
+} WinModeMatchingFields;
+
+static WinModeField matching_window_fields[WIN_MATCH_NUM_FIELDS] = {
+ { .field_name = "title", .enabled = TRUE, },
+ { .field_name = "class", .enabled = TRUE, },
+ { .field_name = "role", .enabled = TRUE, },
+ { .field_name = "name", .enabled = TRUE, },
+ { .field_name = "desktop", .enabled = TRUE, }
+};
+
+static gboolean window_matching_fields_parsed = FALSE;
+
// a manageable window
typedef struct
{
@@ -344,22 +373,22 @@ static int window_match ( const Mode *sw, rofi_int_matcher **tokens, unsigned in
// If hack not in place it would not match queries spanning multiple fields.
// e.g. when searching 'title element' and 'class element'
rofi_int_matcher *ftokens[2] = { tokens[j], NULL };
- if ( c->title != NULL && c->title[0] != '\0' ) {
+ if ( c->title != NULL && c->title[0] != '\0' && matching_window_fields[WIN_MATCH_FIELD_TITLE].enabled ) {
test = helper_token_match ( ftokens, c->title );
}
- if ( test == tokens[j]->invert && c->class != NULL && c->class[0] != '\0' ) {
+ if ( test == tokens[j]->invert && c->class != NULL && c->class[0] != '\0' && matching_window_fields[WIN_MATCH_FIELD_CLASS].enabled ) {
test = helper_token_match ( ftokens, c->class );
}
- if ( test == tokens[j]->invert && c->role != NULL && c->role[0] != '\0' ) {
+ if ( test == tokens[j]->invert && c->role != NULL && c->role[0] != '\0' && matching_window_fields[WIN_MATCH_FIELD_ROLE].enabled ) {
test = helper_token_match ( ftokens, c->role );
}
- if ( test == tokens[j]->invert && c->name != NULL && c->name[0] != '\0' ) {
+ if ( test == tokens[j]->invert && c->name != NULL && c->name[0] != '\0' && matching_window_fields[WIN_MATCH_FIELD_NAME].enabled ) {
test = helper_token_match ( ftokens, c->name );
}
- if ( test == tokens[j]->invert && c->wmdesktopstr != NULL && c->wmdesktopstr[0] != '\0' ) {
+ if ( test == tokens[j]->invert && c->wmdesktopstr != NULL && c->wmdesktopstr[0] != '\0' && matching_window_fields[WIN_MATCH_FIELD_DESKTOP].enabled ) {
test = helper_token_match ( ftokens, c->wmdesktopstr );
}
@@ -372,6 +401,43 @@ static int window_match ( const Mode *sw, rofi_int_matcher **tokens, unsigned in
return match;
}
+static void window_mode_parse_fields ()
+{
+ window_matching_fields_parsed = TRUE;
+ char *savept = NULL;
+ // Make a copy, as strtok will modify it.
+ char *switcher_str = g_strdup ( config.window_match_fields );
+ const char * const sep = ",#";
+ // Split token on ','. This modifies switcher_str.
+ for ( unsigned int i = 0; i < WIN_MATCH_NUM_FIELDS; i++ ) {
+ matching_window_fields[i].enabled = FALSE;
+ }
+ for ( char *token = strtok_r ( switcher_str, sep, &savept ); token != NULL;
+ token = strtok_r ( NULL, sep, &savept ) ) {
+ if ( strcmp ( token, "all" ) == 0 ) {
+ for ( unsigned int i = 0; i < WIN_MATCH_NUM_FIELDS; i++ ) {
+ matching_window_fields[i].enabled = TRUE;
+ }
+ break;
+ }
+ else {
+ gboolean matched = FALSE;
+ for ( unsigned int i = 0; i < WIN_MATCH_NUM_FIELDS; i++ ) {
+ const char * field_name = matching_window_fields[i].field_name;
+ if ( strcmp ( token, field_name ) == 0 ) {
+ matching_window_fields[i].enabled = TRUE;
+ matched = TRUE;
+ }
+ }
+ if ( !matched ) {
+ g_warning ( "Invalid window field name :%s", token );
+ }
+ }
+ }
+ // Free string that was modified by strtok_r
+ g_free ( switcher_str );
+}
+
static unsigned int window_mode_get_num_entries ( const Mode *sw )
{
const ModeModePrivateData *pd = (const ModeModePrivateData *) mode_get_private_data ( sw );
@@ -523,6 +589,9 @@ static int window_mode_init ( Mode *sw )
pd->window_regex = g_regex_new ( "{[-\\w]+(:-?[0-9]+)?}", 0, 0, NULL );
mode_set_private_data ( sw, (void *) pd );
_window_mode_load_data ( sw, FALSE );
+ if ( !window_matching_fields_parsed ) {
+ window_mode_parse_fields ();
+ }
}
return TRUE;
}
@@ -533,6 +602,9 @@ static int window_mode_init_cd ( Mode *sw )
pd->window_regex = g_regex_new ( "{[-\\w]+(:-?[0-9]+)?}", 0, 0, NULL );
mode_set_private_data ( sw, (void *) pd );
_window_mode_load_data ( sw, TRUE );
+ if ( !window_matching_fields_parsed ) {
+ window_mode_parse_fields ();
+ }
}
return TRUE;
}
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index 9a0f155e..9491db9e 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -81,126 +81,130 @@ typedef struct
* Currently supports string, boolean and number (signed and unsigned).
*/
static XrmOption xrmOptions[] = {
- { xrm_String, "switchers", { .str = &config.modi }, NULL,
+ { xrm_String, "switchers", { .str = &config.modi }, NULL,
"", CONFIG_DEFAULT },
- { xrm_String, "modi", { .str = &config.modi }, NULL,
+ { xrm_String, "modi", { .str = &config.modi }, NULL,
"Enabled modi", CONFIG_DEFAULT },
- { xrm_SNumber, "width", { .snum = &config.menu_width }, NULL,
+ { xrm_SNumber, "width", { .snum = &config.menu_width }, NULL,
"Window width", CONFIG_DEFAULT },
- { xrm_Number, "lines", { .num = &config.menu_lines }, NULL,
+ { xrm_Number, "lines", { .num = &config.menu_lines }, NULL,
"Number of lines", CONFIG_DEFAULT },
- { xrm_Number, "columns", { .num = &config.menu_columns }, NULL,
+ { xrm_Number, "columns", { .num = &config.menu_columns }, NULL,
"Number of columns", CONFIG_DEFAULT },
- { xrm_String, "font", { .str = &config.menu_font }, NULL,
+ { xrm_String, "font", { .str = &config.menu_font }, NULL,
"Font to use", CONFIG_DEFAULT },
- { xrm_Number, "borderwidth", { .num = &config.menu_bw }, NULL,
+ { xrm_Number, "borderwidth", { .num = &config.menu_bw }, NULL,
"", CONFIG_DEFAULT },
- { xrm_Number, "bw", { .num = &config.menu_bw }, NULL,
+ { xrm_Number, "bw", { .num = &config.menu_bw }, NULL,
"Border width", CONFIG_DEFAULT },
- { xrm_Number, "location", { .num = &config.location }, NULL,
+ { xrm_Number, "location", { .num = &config.location }, NULL,
"Location on screen", CONFIG_DEFAULT },
- { xrm_Number, "padding", { .num = &config.padding }, NULL,
+ { xrm_Number, "padding", { .num = &config.padding }, NULL,
"Padding", CONFIG_DEFAULT },
- { xrm_SNumber, "yoffset", { .snum = &config.y_offset }, NULL,
+ { xrm_SNumber, "yoffset", { .snum = &config.y_offset }, NULL,
"Y-offset relative to location", CONFIG_DEFAULT },
- { xrm_SNumber, "xoffset", { .snum = &config.x_offset }, NULL,
+ { xrm_SNumber, "xoffset", { .snum = &config.x_offset }, NULL,
"X-offset relative to location", CONFIG_DEFAULT },
- { xrm_Boolean, "fixed-num-lines", { .num = &config.fixed_num_lines }, NULL,
+ { xrm_Boolean, "fixed-num-lines", { .num = &config.fixed_num_lines }, NULL,
"Always show number of lines", CONFIG_DEFAULT },
- { xrm_Boolean, "show-icons", { .snum = &config.show_icons }, NULL,
+ { xrm_Boolean, "show-icons", { .snum = &config.show_icons }, NULL,
"Whether to load and show icons", CONFIG_DEFAULT },
- { xrm_String, "terminal", { .str = &config.terminal_emulator }, NULL,
+ { xrm_String, "terminal", { .str = &config.terminal_emulator }, NULL,
"Terminal to use", CONFIG_DEFAULT },
- { xrm_String, "ssh-client", { .str = &config.ssh_client }, NULL,
+ { xrm_String, "ssh-client", { .str = &config.ssh_client }, NULL,
"Ssh client to use", CONFIG_DEFAULT },
- { xrm_String, "ssh-command", { .str = &config.ssh_command }, NULL,
+ { xrm_String, "ssh-command", { .str = &config.ssh_command }, NULL,
"Ssh command to execute", CONFIG_DEFAULT },
- { xrm_String, "run-command", { .str = &config.run_command }, NULL,
+ { xrm_String, "run-command", { .str = &config.run_command }, NULL,
"Run command to execute", CONFIG_DEFAULT },
- { xrm_String, "run-list-command", { .str = &config.run_list_command }, NULL,
+ { xrm_String, "run-list-command", { .str = &config.run_list_command }, NULL,
"Command to get extra run targets", CONFIG_DEFAULT },
- { xrm_String, "run-shell-command", { .str = &config.run_shell_command }, NULL,
+ { xrm_String, "run-shell-command", { .str = &config.run_shell_command }, NULL,
"Run command to execute that runs in shell", CONFIG_DEFAULT },
- { xrm_String, "window-command", { .str = &config.window_command }, NULL,
+ { xrm_String, "window-command", { .str = &config.window_command }, NULL,
"Command executed on accep-entry-custom for window modus", CONFIG_DEFAULT },
- { xrm_String, "drun-icon-theme", { .str = &config.drun_icon_theme }, NULL,
+ { xrm_String, "window-match-fields", { .str = &config.window_match_fields }, NULL,
+ "Window fields to match in window mode", CONFIG_DEFAULT },
+ { xrm_String, "drun-icon-theme", { .str = &config.drun_icon_theme }, NULL,
"Theme to use to look for icons", CONFIG_DEFAULT },
- { xrm_Boolean, "disable-history", { .num = &config.disable_history }, NULL,
+ { xrm_String, "drun-match-fields", { .str = &config.drun_match_fields }, NULL,
+ "Desktop entry fields to match in drun", CONFIG_DEFAULT },
+ { xrm_Boolean, "disable-history", { .num = &config.disable_history }, NULL,
"Disable history in run/ssh", CONFIG_DEFAULT },
- { xrm_Boolean, "sort", { .num = &config.sort }, NULL,
+ { xrm_Boolean, "sort", { .num = &config.sort }, NULL,
"Use sorting", CONFIG_DEFAULT },
- { xrm_Boolean, "levenshtein-sort", { .num = &config.levenshtein_sort }, NULL,
+ { xrm_Boolean, "levenshtein-sort", { .num = &config.levenshtein_sort }, NULL,
"Use levenshtein sorting also for fuzzy matching", CONFIG_DEFAULT },
- { xrm_Boolean, "case-sensitive", { .num = &config.case_sensitive }, NULL,
+ { xrm_Boolean, "case-sensitive", { .num = &config.case_sensitive }, NULL,
"Set case-sensitivity", CONFIG_DEFAULT },
- { xrm_Boolean, "cycle", { .num = &config.cycle }, NULL,
+ { xrm_Boolean, "cycle", { .num = &config.cycle }, NULL,
"Cycle through the results list", CONFIG_DEFAULT },
- { xrm_Boolean, "sidebar-mode", { .num = &config.sidebar_mode }, NULL,
+ { xrm_Boolean, "sidebar-mode", { .num = &config.sidebar_mode }, NULL,
"Enable sidebar-mode", CONFIG_DEFAULT },
- { xrm_SNumber, "eh", { .snum = &config.element_height }, NULL,
+ { xrm_SNumber, "eh", { .snum = &config.element_height }, NULL,
"Row height (in chars)", CONFIG_DEFAULT },
- { xrm_Boolean, "auto-select", { .num = &config.auto_select }, NULL,
+ { xrm_Boolean, "auto-select", { .num = &config.auto_select }, NULL,
"Enable auto select mode", CONFIG_DEFAULT },
- { xrm_Boolean, "parse-hosts", { .num = &config.parse_hosts }, NULL,
+ { xrm_Boolean, "parse-hosts", { .num = &config.parse_hosts }, NULL,
"Parse hosts file for ssh mode", CONFIG_DEFAULT },
- { xrm_Boolean, "parse-known-hosts", { .num = &config.parse_known_hosts }, NULL,
+ { xrm_Boolean, "parse-known-hosts", { .num = &config.parse_known_hosts }, NULL,
"Parse known_hosts file for ssh mode", CONFIG_DEFAULT },
- { xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL,
+ { xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL,
"Set the modi to combine in combi mode", CONFIG_DEFAULT },
- { xrm_String, "matching", { .str = &config.matching }, NULL,
+ { xrm_String, "matching", { .str = &config.matching }, NULL,
"Set the matching algorithm. (normal, regex, glob, fuzzy)", CONFIG_DEFAULT },
- { xrm_Boolean, "tokenize", { .num = &config.tokenize }, NULL,
+ { xrm_Boolean, "tokenize", { .num = &config.tokenize }, NULL,
"Tokenize input string", CONFIG_DEFAULT },
- { xrm_String, "monitor", { .str = &config.monitor }, NULL,
+ { xrm_String, "monitor", { .str = &config.monitor }, NULL,
"", CONFIG_DEFAULT },
/* Alias for dmenu compatibility. */
- { xrm_String, "m", { .str = &config.monitor }, NULL,
+ { xrm_String, "m", { .str = &config.monitor }, NULL,
"Monitor id to show on", CONFIG_DEFAULT },
- { xrm_Number, "line-margin", { .num = &config.line_margin }, NULL,
+ { xrm_Number, "line-margin", { .num = &config.line_margin }, NULL,
"Margin between rows *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Number, "line-padding", { .num = &config.line_padding }, NULL,
+ { xrm_Number, "line-padding", { .num = &config.line_padding }, NULL,
"Padding within rows *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_String, "filter", { .str = &config.filter }, NULL,
+ { xrm_String, "filter", { .str = &config.filter }, NULL,
"Pre-set filter", CONFIG_DEFAULT },
- { xrm_String, "separator-style", { .str = &config.separator_style }, NULL,
+ { xrm_String, "separator-style", { .str = &config.separator_style }, NULL,
"Separator style (none, dash, solid) *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Boolean, "hide-scrollbar", { .num = &config.hide_scrollbar }, NULL,
+ { xrm_Boolean, "hide-scrollbar", { .num = &config.hide_scrollbar }, NULL,
"Hide scroll-bar *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Boolean, "fullscreen", { .num = &config.fullscreen }, NULL,
+ { xrm_Boolean, "fullscreen", { .num = &config.fullscreen }, NULL,
"Fullscreen", CONFIG_DEFAULT },
- { xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL,
+ { xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL,
"Fake transparency *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_SNumber, "dpi", { .snum = &config.dpi }, NULL,
+ { xrm_SNumber, "dpi", { .snum = &config.dpi }, NULL,
"DPI", CONFIG_DEFAULT },
- { xrm_Number, "threads", { .num = &config.threads }, NULL,
+ { xrm_Number, "threads", { .num = &config.threads }, NULL,
"Threads to use for string matching", CONFIG_DEFAULT },
- { xrm_Number, "scrollbar-width", { .num = &config.scrollbar_width }, NULL,
+ { xrm_Number, "scrollbar-width", { .num = &config.scrollbar_width }, NULL,
"Scrollbar width *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Number, "scroll-method", { .num = &config.scroll_method }, NULL,
+ { xrm_Number, "scroll-method", { .num = &config.scroll_method }, NULL,
"Scrolling method. (0: Page, 1: Centered)", CONFIG_DEFAULT },
- { xrm_String, "fake-background", { .str = &config.fake_background }, NULL,
+ { xrm_String, "fake-background", { .str = &config.fake_background }, NULL,
"Background to use for fake transparency. (background or screenshot)", CONFIG_DEFAULT },
- { xrm_String, "window-format", { .str = &config.window_format }, NULL,
+ { xrm_String, "window-format", { .str = &config.window_format }, NULL,
"Window Format. w (desktop name), t (title), n (name), r (role), c (class) *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Boolean, "click-to-exit", { .snum = &config.click_to_exit }, NULL,
+ { xrm_Boolean, "click-to-exit", { .snum = &config.click_to_exit }, NULL,
"Click outside the window to exit", CONFIG_DEFAULT },
- { xrm_Boolean, "show-match", { .snum = &config.show_match }, NULL,
+ { xrm_Boolean, "show-match", { .snum = &config.show_match }, NULL,
"Indicate how it match by underlining it.", CONFIG_DEFAULT },
- { xrm_String, "theme", { .str = &config.theme }, NULL,
+ { xrm_String, "theme", { .str = &config.theme }, NULL,
"New style theme file", CONFIG_DEFAULT },
- { xrm_String, "color-normal", { .str = &config.color_normal }, NULL,
+ { xrm_String, "color-normal", { .str = &config.color_normal }, NULL,
"Color scheme for normal row", CONFIG_DEFAULT },
- { xrm_String, "color-urgent", { .str = &config.color_urgent }, NULL,
+ { xrm_String, "color-urgent", { .str = &config.color_urgent }, NULL,
"Color scheme for urgent row", CONFIG_DEFAULT },
- { xrm_String, "color-active", { .str = &config.color_active }, NULL,
+ { xrm_String, "color-active", { .str = &config.color_active }, NULL,
"Color scheme for active row", CONFIG_DEFAULT },
- { xrm_String, "color-window", { .str = &config.color_window }, NULL,
+ { xrm_String, "color-window", { .str = &config.color_window }, NULL,
"Color scheme window", CONFIG_DEFAULT },
{ xrm_Number, "max-history-size", { .num = &config.max_history_size }, NULL,
"Max history size (WARNING: can cause slowdowns when set to high).", CONFIG_DEFAULT },