mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 12:05:48 +00:00
border patch: adding separate colour scheme for the border (rather than forcing SchemeSel)
This commit is contained in:
parent
de7f10513f
commit
d4ba5053ce
24
config.def.h
24
config.def.h
@ -54,6 +54,27 @@ static const unsigned int alphas[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
|
||||
#if BORDER_PATCH
|
||||
[SchemeBorder] = { OPAQUE, OPAQUE, OPAQUE },
|
||||
#endif // BORDER_PATCH
|
||||
#if MORECOLOR_PATCH
|
||||
[SchemeMid] = { OPAQUE, baralpha, borderalpha },
|
||||
#endif // MORECOLOR_PATCH
|
||||
#if HIGHLIGHT_PATCH || FUZZYHIGHLIGHT_PATCH
|
||||
[SchemeSelHighlight] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeNormHighlight] = { OPAQUE, baralpha, borderalpha },
|
||||
#endif // HIGHLIGHT_PATCH | FUZZYHIGHLIGHT_PATCH
|
||||
#if HIGHPRIORITY_PATCH
|
||||
[SchemeHp] = { OPAQUE, baralpha, borderalpha },
|
||||
#endif // HIGHPRIORITY_PATCH
|
||||
#if EMOJI_HIGHLIGHT_PATCH
|
||||
[SchemeHover] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeGreen] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeRed] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeYellow] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemeBlue] = { OPAQUE, baralpha, borderalpha },
|
||||
[SchemePurple] = { OPAQUE, baralpha, borderalpha },
|
||||
#endif // EMOJI_HIGHLIGHT_PATCH
|
||||
};
|
||||
#endif // ALPHA_PATCH
|
||||
|
||||
@ -66,6 +87,9 @@ char *colors[][2] = {
|
||||
[SchemeNorm] = { "#bbbbbb", "#222222" },
|
||||
[SchemeSel] = { "#eeeeee", "#005577" },
|
||||
[SchemeOut] = { "#000000", "#00ffff" },
|
||||
#if BORDER_PATCH
|
||||
[SchemeBorder] = { "#000000", "#005577" },
|
||||
#endif // BORDER_PATCH
|
||||
#if MORECOLOR_PATCH
|
||||
[SchemeMid] = { "#eeeeee", "#770000" },
|
||||
#endif // MORECOLOR_PATCH
|
||||
|
5
dmenu.c
5
dmenu.c
@ -59,6 +59,9 @@ enum {
|
||||
SchemeNorm,
|
||||
SchemeSel,
|
||||
SchemeOut,
|
||||
#if BORDER_PATCH
|
||||
SchemeBorder,
|
||||
#endif // BORDER_PATCH
|
||||
#if MORECOLOR_PATCH
|
||||
SchemeMid,
|
||||
#endif // MORECOLOR_PATCH
|
||||
@ -1684,7 +1687,7 @@ setup(void)
|
||||
);
|
||||
#if BORDER_PATCH
|
||||
if (border_width)
|
||||
XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
|
||||
XSetWindowBorder(dpy, win, scheme[SchemeBorder][ColBg].pixel);
|
||||
#endif // BORDER_PATCH
|
||||
XSetClassHint(dpy, win, &ch);
|
||||
#if WMTYPE_PATCH
|
||||
|
@ -39,6 +39,10 @@ readxresources(void)
|
||||
if (XrmGetResource(xdb, "dmenu.midforeground", "*", &type, &xval))
|
||||
colors[SchemeMid][ColFg] = strdup(xval.addr);
|
||||
#endif // MORECOLOR_PATCH
|
||||
#if BORDER_PATCH
|
||||
if (XrmGetResource(xdb, "dmenu.bordercolor", "*", &type, &xval))
|
||||
colors[SchemeBorder][ColBg] = strdup(xval.addr);
|
||||
#endif // BORDER_PATCH
|
||||
#if HIGHLIGHT_PATCH || FUZZYHIGHLIGHT_PATCH
|
||||
if (XrmGetResource(xdb, "dmenu.selhlbackground", "*", &type, &xval))
|
||||
colors[SchemeSelHighlight][ColBg] = strdup(xval.addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user