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:
parent
55e3aabada
commit
3ec12d3d38
5 changed files with 12 additions and 5 deletions
|
@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = {
|
||||||
[SchemeSelHighlight] = { "#ffc978", "#005577" },
|
[SchemeSelHighlight] = { "#ffc978", "#005577" },
|
||||||
[SchemeNormHighlight] = { "#ffc978", "#222222" },
|
[SchemeNormHighlight] = { "#ffc978", "#222222" },
|
||||||
[SchemeOut] = { "#000000", "#00ffff" },
|
[SchemeOut] = { "#000000", "#00ffff" },
|
||||||
|
[SchemeMid] = { "#eeeeee", "#770000" },
|
||||||
};
|
};
|
||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
static unsigned int lines = 0;
|
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[] = " ";
|
static const char worddelimiters[] = " ";
|
||||||
|
|
||||||
/* Size of the window border */
|
/* Size of the window border */
|
||||||
static const unsigned int border_width = 5;
|
static unsigned int border_width = 0;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||||
static int centered = 0; /* -c option; centers dmenu on screen */
|
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 */
|
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||||
static const char *fonts[] = {
|
static const char *fonts[] = {
|
||||||
"Mononoki Nerd Font:size=10"
|
"Mononoki Nerd Font:size=10"
|
||||||
|
@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = {
|
||||||
[SchemeSelHighlight] = { "#82aaff", "#000000" },
|
[SchemeSelHighlight] = { "#82aaff", "#000000" },
|
||||||
[SchemeNormHighlight] = { "#f1fa8c", "#000000" },
|
[SchemeNormHighlight] = { "#f1fa8c", "#000000" },
|
||||||
[SchemeOut] = { "#000000", "#00ffff" },
|
[SchemeOut] = { "#000000", "#00ffff" },
|
||||||
|
[SchemeMid] = { "#eeeeee", "#770000" },
|
||||||
};
|
};
|
||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
static unsigned int lines = 0;
|
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[] = " ";
|
static const char worddelimiters[] = " ";
|
||||||
|
|
||||||
/* Size of the window border */
|
/* Size of the window border */
|
||||||
static const unsigned int border_width = 0;
|
static unsigned int border_width = 1;
|
||||||
|
|
BIN
dmenu/dmenu
BIN
dmenu/dmenu
Binary file not shown.
|
@ -28,7 +28,7 @@
|
||||||
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeLast }; /* color schemes */
|
enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeMid, SchemeLast }; /* color schemes */
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
char *text;
|
char *text;
|
||||||
|
@ -166,6 +166,8 @@ drawitem(struct item *item, int x, int y, int w)
|
||||||
{
|
{
|
||||||
if (item == sel)
|
if (item == sel)
|
||||||
drw_setscheme(drw, scheme[SchemeSel]);
|
drw_setscheme(drw, scheme[SchemeSel]);
|
||||||
|
else if (item->left == sel || item->right == sel)
|
||||||
|
drw_setscheme(drw, scheme[SchemeMid]);
|
||||||
else if (item->out)
|
else if (item->out)
|
||||||
drw_setscheme(drw, scheme[SchemeOut]);
|
drw_setscheme(drw, scheme[SchemeOut]);
|
||||||
else
|
else
|
||||||
|
@ -740,7 +742,8 @@ setup(void)
|
||||||
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width,
|
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width,
|
||||||
CopyFromParent, CopyFromParent, CopyFromParent,
|
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||||
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
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);
|
XSetClassHint(dpy, win, &ch);
|
||||||
|
|
||||||
/* open input methods */
|
/* open input methods */
|
||||||
|
@ -817,6 +820,8 @@ main(int argc, char *argv[])
|
||||||
colors[SchemeSel][ColFg] = argv[++i];
|
colors[SchemeSel][ColFg] = argv[++i];
|
||||||
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
||||||
embed = argv[++i];
|
embed = argv[++i];
|
||||||
|
else if (!strcmp(argv[i], "-bw"))
|
||||||
|
border_width = atoi(argv[++i]); /* border width */
|
||||||
else
|
else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
|
BIN
dmenu/dmenu.o
BIN
dmenu/dmenu.o
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue