Compare commits
No commits in common. "c1819f18c07df6984bbfd2ca7207295eec85806f" and "b60e438b069c5e5beffdf6c7546e1e2e87aed305" have entirely different histories.
c1819f18c0
...
b60e438b06
4 changed files with 20 additions and 20 deletions
|
@ -1,2 +1,3 @@
|
|||
custom: ["https://lukesmith.xyz/donate.html"]
|
||||
github: lukesmithxyz
|
||||
custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"]
|
||||
patreon: lukesmith
|
||||
|
|
|
@ -4,11 +4,13 @@ Extra stuff added to vanilla dmenu:
|
|||
|
||||
- reads Xresources (ergo pywal compatible)
|
||||
- alpha patch, which importantly allows this build to be embedded in transparent st
|
||||
- can view color characters like emoji
|
||||
- can view color characters like emoji (libxft-bgra is required for this reason)
|
||||
- `-P` for password mode: hide user input
|
||||
- `-r` to reject non-matching input
|
||||
- dmenu options are mouse clickable
|
||||
|
||||
## Installation
|
||||
|
||||
You must have `libxft-bgra` installed until the libxft upstream is fixed.
|
||||
|
||||
After making any config changes that you want, but `make`, `sudo make install` it.
|
||||
|
|
3
config.h
3
config.h
|
@ -5,7 +5,7 @@ static int topbar = 1; /* -b option; if 0, dmenu appears a
|
|||
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||
static const char *fonts[] = {
|
||||
"monospace:size=10",
|
||||
"NotoColorEmoji:pixelsize=8:antialias=true:autohint=true"
|
||||
"JoyPixels:pixelsize=8:antialias=true:autohint=true"
|
||||
};
|
||||
static const unsigned int bgalpha = 0xe0;
|
||||
static const unsigned int fgalpha = OPAQUE;
|
||||
|
@ -31,4 +31,3 @@ static unsigned int lines = 0;
|
|||
* for example: " /?\"&[]"
|
||||
*/
|
||||
static const char worddelimiters[] = " ";
|
||||
|
||||
|
|
30
dmenu.c
30
dmenu.c
|
@ -918,21 +918,6 @@ main(int argc, char *argv[])
|
|||
XWindowAttributes wa;
|
||||
int i, fast = 0;
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||
fputs("warning: no locale support\n", stderr);
|
||||
if (!(dpy = XOpenDisplay(NULL)))
|
||||
die("cannot open display");
|
||||
screen = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, screen);
|
||||
if (!embed || !(parentwin = strtol(embed, NULL, 0)))
|
||||
parentwin = root;
|
||||
if (!XGetWindowAttributes(dpy, parentwin, &wa))
|
||||
die("could not get embedding window attributes: 0x%lx",
|
||||
parentwin);
|
||||
xinitvisual();
|
||||
drw = drw_create(dpy, screen, root, wa.width, wa.height, visual, depth, cmap);
|
||||
read_Xresources();
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
/* these options take no arguments */
|
||||
if (!strcmp(argv[i], "-v")) { /* prints version information */
|
||||
|
@ -973,6 +958,20 @@ main(int argc, char *argv[])
|
|||
else
|
||||
usage();
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||
fputs("warning: no locale support\n", stderr);
|
||||
if (!(dpy = XOpenDisplay(NULL)))
|
||||
die("cannot open display");
|
||||
screen = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, screen);
|
||||
if (!embed || !(parentwin = strtol(embed, NULL, 0)))
|
||||
parentwin = root;
|
||||
if (!XGetWindowAttributes(dpy, parentwin, &wa))
|
||||
die("could not get embedding window attributes: 0x%lx",
|
||||
parentwin);
|
||||
xinitvisual();
|
||||
drw = drw_create(dpy, screen, root, wa.width, wa.height, visual, depth, cmap);
|
||||
read_Xresources();
|
||||
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
|
||||
die("no fonts could be loaded.");
|
||||
lrpad = drw->fonts->h;
|
||||
|
@ -994,4 +993,3 @@ main(int argc, char *argv[])
|
|||
|
||||
return 1; /* unreachable */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue