Compare commits

..

10 commits

Author SHA1 Message Date
Luke Smith
c1819f18c0
Merge pull request #18 from i13e/master
Remove libxft-bgra from README
2022-10-22 14:00:29 +00:00
i13e
d8d0995fb7
Update README.md 2022-10-21 06:11:11 -04:00
Luke Smith
8d6175da85 Merge branch 'master' of github.com:LukeSmithxyz/dmenu 2022-10-01 08:16:18 -04:00
Luke Smith
ee8871c046 libxft 2022-10-01 08:16:02 -04:00
Luke Smith
705b3c7c9f
Merge pull request #17 from kronikpillow/font-fix
fix font name
2022-08-19 18:25:07 +00:00
Dejan Kutle
d07de2ea5f
fix font name 2022-08-01 12:17:32 +02:00
Luke Smith
575252ee75 Merge branch 'master' of github.com:LukeSmithxyz/dmenu 2022-06-28 10:23:59 -04:00
Luke Smith
c1152e1336 fix #2 2022-06-28 10:23:49 -04:00
Luke Smith
d074f4786e
Merge pull request #14 from kronikpillow/default-font
change default font to a installed one
2022-06-28 14:04:09 +00:00
Dejan Kutle
9b1b209c88
change default font to a installed one 2022-06-24 09:40:36 +02:00
4 changed files with 20 additions and 20 deletions

View file

@ -1,3 +1,2 @@
custom: ["https://lukesmith.xyz/donate.html"]
github: lukesmithxyz
custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"]
patreon: lukesmith

View file

@ -4,13 +4,11 @@ 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 (libxft-bgra is required for this reason)
- can view color characters like emoji
- `-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.

View file

@ -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",
"JoyPixels:pixelsize=8:antialias=true:autohint=true"
"NotoColorEmoji:pixelsize=8:antialias=true:autohint=true"
};
static const unsigned int bgalpha = 0xe0;
static const unsigned int fgalpha = OPAQUE;
@ -31,3 +31,4 @@ static unsigned int lines = 0;
* for example: " /?\"&[]"
*/
static const char worddelimiters[] = " ";

30
dmenu.c
View file

@ -918,6 +918,21 @@ 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 */
@ -958,20 +973,6 @@ 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;
@ -993,3 +994,4 @@ main(int argc, char *argv[])
return 1; /* unreachable */
}