[hackers] [dmenu] init colors using SchemeLast || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Fri, 3 Nov 2017 21:07:43 +0100 (CET)

commit 41379f7c39e6aa0a17d7807b22b49ea148f5b0fa
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri Nov 3 21:05:29 2017 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri Nov 3 21:05:29 2017 +0100

    init colors using SchemeLast
    
    this makes it slightly easier to add colors to schemes.

diff --git a/dmenu.c b/dmenu.c
index 85e5060..91330f1 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -553,9 +553,8 @@ setup(void)
 #endif
 
         /* init appearance */
- scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 2);
- scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 2);
- scheme[SchemeOut] = drw_scm_create(drw, colors[SchemeOut], 2);
+ for (j = 0; j < SchemeLast; j++)
+ scheme[j] = drw_scm_create(drw, colors[j], 2);
 
         clip = XInternAtom(dpy, "CLIPBOARD", False);
         utf8 = XInternAtom(dpy, "UTF8_STRING", False);
Received on Fri Nov 03 2017 - 21:07:43 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 03 2017 - 21:12:19 CET