]> git.armaanb.net Git - dmenu.git/commitdiff
Remove unnecesary highlight color options
authorArmaan Bhojwani <me@armaanb.net>
Tue, 29 Jun 2021 02:00:09 +0000 (22:00 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Tue, 29 Jun 2021 02:00:09 +0000 (22:00 -0400)
config.h
dmenu.1
dmenu.c

index b4d27d98c99928af9615b566e485149f0f1bedf6..1f8ab95af677092cbd7245f26eab1ee7376e8f00 100644 (file)
--- a/config.h
+++ b/config.h
@@ -12,8 +12,6 @@ static const char *colors[SchemeLast][2] = {
        //                        fg         bg
        [SchemeNorm] =          { "#000000", "#ffffff" },
        [SchemeSel] =           { "#ffffff", "#000000" },
-       [SchemeSelHighlight] =  { "#ffc978", "#000000" },
-       [SchemeNormHighlight] = { "#000000", "#ffffff" },
        [SchemeOut] =           { "#000000", "#00ffff" },
 };
 /* -l option; if nonzero, dmenu uses vertical list with given number of lines */
diff --git a/dmenu.1 b/dmenu.1
index 90aa7b59b1586207fe4a2f0e2d7cd49d6e1a6afc..762f7071c23f0a2bc3b2c872695fdb9cdc5317fd 100644 (file)
--- a/dmenu.1
+++ b/dmenu.1
@@ -20,14 +20,6 @@ dmenu \- dynamic menu
 .IR color ]
 .RB [ \-sf
 .IR color ]
-.RB [ \-nhb
-.IR color ]
-.RB [ \-nhf
-.IR color ]
-.RB [ \-shb
-.IR color ]
-.RB [ \-shf
-.IR color ]
 .RB [ \-w
 .IR windowid ]
 .P
@@ -86,18 +78,6 @@ defines the selected background color.
 .BI \-sf " color"
 defines the selected foreground color.
 .TP
-.BI \-nhb " color"
-defines the normal highlight background color.
-.TP
-.BI \-nhf " color"
-defines the normal highlight foreground color.
-.TP
-.BI \-shb " color"
-defines the selected highlight background color.
-.TP
-.BI \-shf " color"
-defines the selected highlight foreground color.
-.TP
 .B \-v
 prints version information to stdout, then exits.
 .TP
diff --git a/dmenu.c b/dmenu.c
index e22e054d4a4b8b04bdb6674dcf4ac1666c46dd74..1560b60466856fb86992f7f727bed73fd0dbb71e 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -29,8 +29,7 @@
 #define NUMBERSBUFSIZE        (NUMBERSMAXDIGITS * 2) + 1
 
 /* enums */
-enum { SchemeNorm, SchemeSel, SchemeNormHighlight, SchemeSelHighlight,
-       SchemeOut, SchemeLast }; /* color schemes */
+enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
 
 
 struct item {
@@ -130,9 +129,7 @@ drawhighlights(struct item *item, int x, int y, int maxw)
        if (!(strlen(item->text) && strlen(text)))
                return;
 
-       drw_setscheme(drw, scheme[item == sel
-                          ? SchemeSelHighlight
-                          : SchemeNormHighlight]);
+       drw_setscheme(drw, scheme[item == sel ? SchemeSel : SchemeNorm]);
        for (i = 0, highlight = item->text; *highlight && text[i];) {
                if (*highlight == text[i]) {
                        /* get indentation */
@@ -854,7 +851,7 @@ usage(void)
 {
        fputs("usage: dmenu [-bfivP] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
              "             [-nb color] [-nf color] [-sb color] [-sf color]\n"
-             "             [-nhb color] [-nhf color] [-shb color] [-shf color] [-w windowid]\n", stderr);
+             "             [-w windowid]\n", stderr);
        exit(1);
 }
 
@@ -899,14 +896,6 @@ main(int argc, char *argv[])
                        colors[SchemeSel][ColBg] = argv[++i];
                else if (!strcmp(argv[i], "-sf"))  /* selected foreground color */
                        colors[SchemeSel][ColFg] = argv[++i];
-               else if (!strcmp(argv[i], "-nhb")) /* normal hi background color */
-                       colors[SchemeNormHighlight][ColBg] = argv[++i];
-               else if (!strcmp(argv[i], "-nhf")) /* normal hi foreground color */
-                       colors[SchemeNormHighlight][ColFg] = argv[++i];
-               else if (!strcmp(argv[i], "-shb")) /* selected hi background color */
-                       colors[SchemeSelHighlight][ColBg] = argv[++i];
-               else if (!strcmp(argv[i], "-shf")) /* selected hi foreground color */
-                       colors[SchemeSelHighlight][ColFg] = argv[++i];
                else if (!strcmp(argv[i], "-w"))   /* embedding window id */
                        embed = argv[++i];
                else