1
0
Fork 0
mirror of https://gitlab.com/dwt1/dotfiles.git synced 2023-02-13 20:55:19 -05:00

Adding new dmenu build with lots of patching!

This commit is contained in:
Derek Taylor 2020-02-28 18:28:46 -06:00
parent 55e3aabada
commit 3ec12d3d38
5 changed files with 12 additions and 5 deletions

View file

@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = {
[SchemeSelHighlight] = { "#ffc978", "#005577" },
[SchemeNormHighlight] = { "#ffc978", "#222222" },
[SchemeOut] = { "#000000", "#00ffff" },
[SchemeMid] = { "#eeeeee", "#770000" },
};
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;
@ -28,4 +29,4 @@ static unsigned int lineheight = 0; /* -h option; minimum height of a me
static const char worddelimiters[] = " ";
/* Size of the window border */
static const unsigned int border_width = 5;
static unsigned int border_width = 0;

View file

@ -3,7 +3,7 @@
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
static int centered = 0; /* -c option; centers dmenu on screen */
static int min_width = 500; /* minimum width when centered */
static int min_width = 600; /* minimum width when centered */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"Mononoki Nerd Font:size=10"
@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = {
[SchemeSelHighlight] = { "#82aaff", "#000000" },
[SchemeNormHighlight] = { "#f1fa8c", "#000000" },
[SchemeOut] = { "#000000", "#00ffff" },
[SchemeMid] = { "#eeeeee", "#770000" },
};
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;
@ -28,4 +29,4 @@ static unsigned int lineheight = 22; /* -h option; minimum height of a m
static const char worddelimiters[] = " ";
/* Size of the window border */
static const unsigned int border_width = 0;
static unsigned int border_width = 1;

Binary file not shown.

View file

@ -28,7 +28,7 @@
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
/* enums */
enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeLast }; /* color schemes */
enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeMid, SchemeLast }; /* color schemes */
struct item {
char *text;
@ -166,6 +166,8 @@ drawitem(struct item *item, int x, int y, int w)
{
if (item == sel)
drw_setscheme(drw, scheme[SchemeSel]);
else if (item->left == sel || item->right == sel)
drw_setscheme(drw, scheme[SchemeMid]);
else if (item->out)
drw_setscheme(drw, scheme[SchemeOut]);
else
@ -740,7 +742,8 @@ setup(void)
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width,
CopyFromParent, CopyFromParent, CopyFromParent,
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
if (border_width)
XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
XSetClassHint(dpy, win, &ch);
/* open input methods */
@ -817,6 +820,8 @@ main(int argc, char *argv[])
colors[SchemeSel][ColFg] = argv[++i];
else if (!strcmp(argv[i], "-w")) /* embedding window id */
embed = argv[++i];
else if (!strcmp(argv[i], "-bw"))
border_width = atoi(argv[++i]); /* border width */
else
usage();

Binary file not shown.