summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-10-24 21:46:39 +0200
committerDave Davenport <qball@gmpclient.org>2016-10-24 21:47:36 +0200
commit440756af947322d956d10311956f38dfd721c047 (patch)
treef9f1b1864d7a9b766498526c9b5b71707ce1da76
parentb19ab62e1796a0570e6943e04aed904970f9e6e8 (diff)
Option to disable/enable the highlighting of match.
-rw-r--r--config/config.c1
-rw-r--r--include/settings.h3
-rw-r--r--source/view.c2
-rw-r--r--source/xrmoptions.c2
4 files changed, 7 insertions, 1 deletions
diff --git a/config/config.c b/config/config.c
index ff2351b7..195ed241 100644
--- a/config/config.c
+++ b/config/config.c
@@ -131,4 +131,5 @@ Settings config = {
.fake_background = "screenshot",
.window_format = "{w} {c} {t}",
.click_to_exit = TRUE,
+ .show_match = TRUE,
};
diff --git a/include/settings.h b/include/settings.h
index 83357bfa..078a356a 100644
--- a/include/settings.h
+++ b/include/settings.h
@@ -1,6 +1,8 @@
#ifndef ROFI_SETTINGS_H
#define ROFI_SETTINGS_H
+#include <glib.h>
+
/**
* Enumeration indicating the matching method to use.
*
@@ -148,6 +150,7 @@ typedef struct
char *window_format;
/** Click outside the window to exit */
int click_to_exit;
+ gboolean show_match;
} Settings;
/** Global Settings structure. */
extern Settings config;
diff --git a/source/view.c b/source/view.c
index 30a6da14..a8d027b7 100644
--- a/source/view.c
+++ b/source/view.c
@@ -698,7 +698,7 @@ static void update_callback ( textbox *t, unsigned int index, void *udata, TextB
// Move into list view.
textbox_text ( t, text );
- if ( state->tokens ) {
+ if ( state->tokens && config.show_match ) {
PangoAttrList *list = textbox_get_pango_attributes ( t );
if ( list != NULL ) {
pango_attr_list_ref ( list );
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index 6d69e1d9..c176d6df 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -194,6 +194,8 @@ static XrmOption xrmOptions[] = {
"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,
"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 */