On Mon, 25 Jul 2016 11:39:55 -0700 Eric Pruitt <eric.pru...@gmail.com> wrote:
> The attached patch adds a "-g" flag to dmenu so it can be used for > password entry. Typed text is replaced with asterisks. I looked more closely at the patch and I've found potential to simplify it. Why not go with a static char asterisks[BUFSIZ]; and do a drw_font_getexts(drw->fonts, text, cursor, &curpos, NULL); memset(asterisks, '*', curpos / 8); asterisks[curpos / 8] = '\0'; drw_text(drw, x, 0, w, bh, lrpad / 2, asterisks, 0); or something along the lines. Cheers FRIGN -- FRIGN <d...@frign.de>