1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Option to disable/enable the highlighting of match.

This commit is contained in:
Dave Davenport 2016-10-24 21:46:39 +02:00
parent b19ab62e17
commit 440756af94
4 changed files with 7 additions and 1 deletions

View file

@ -131,4 +131,5 @@ Settings config = {
.fake_background = "screenshot", .fake_background = "screenshot",
.window_format = "{w} {c} {t}", .window_format = "{w} {c} {t}",
.click_to_exit = TRUE, .click_to_exit = TRUE,
.show_match = TRUE,
}; };

View file

@ -1,6 +1,8 @@
#ifndef ROFI_SETTINGS_H #ifndef ROFI_SETTINGS_H
#define ROFI_SETTINGS_H #define ROFI_SETTINGS_H
#include <glib.h>
/** /**
* Enumeration indicating the matching method to use. * Enumeration indicating the matching method to use.
* *
@ -148,6 +150,7 @@ typedef struct
char *window_format; char *window_format;
/** Click outside the window to exit */ /** Click outside the window to exit */
int click_to_exit; int click_to_exit;
gboolean show_match;
} Settings; } Settings;
/** Global Settings structure. */ /** Global Settings structure. */
extern Settings config; extern Settings config;

View file

@ -698,7 +698,7 @@ static void update_callback ( textbox *t, unsigned int index, void *udata, TextB
// Move into list view. // Move into list view.
textbox_text ( t, text ); textbox_text ( t, text );
if ( state->tokens ) { if ( state->tokens && config.show_match ) {
PangoAttrList *list = textbox_get_pango_attributes ( t ); PangoAttrList *list = textbox_get_pango_attributes ( t );
if ( list != NULL ) { if ( list != NULL ) {
pango_attr_list_ref ( list ); pango_attr_list_ref ( list );

View file

@ -194,6 +194,8 @@ static XrmOption xrmOptions[] = {
"Window Format. w (desktop name), t (title), n (name), r (role), c (class)", CONFIG_DEFAULT }, "Window Format. w (desktop name), t (title), n (name), r (role), c (class)", 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 }, "Click outside the window to exit", CONFIG_DEFAULT },
{ xrm_Boolean, "show-match", { .snum = &config.show_match }, NULL,
"Indicate how it match by underlining it.", CONFIG_DEFAULT },
}; };
/** Dynamic array of extra options */ /** Dynamic array of extra options */