~ob/dmenu

Make input width dynamic
Change height calculation

It now uses a ratio. It is different than dwm but it will show up as
high as the dwm bar. I'm unsure why, I might investigate some other
time.
Apply password patch

By applying this patch, dmenu will not directly display the keyboard
input, but instead replace it with dots. All data from stdin will be
ignored.

The patch has been changed a bit to have '-' as the character showed.
Also fixed the patch as the diff was done the wrong way.
Add personal configuration and gitignore
1d2b462a — Hiltjo Posthuma a month ago
bump version to 5.2
dmenu: use die() to print the usage message
fce06f43 — Hiltjo Posthuma 2 months ago
remove workaround for a crash with color emojis on some systems, now fixed in libXft 2.3.5

https://gitlab.freedesktop.org/xorg/lib/libxft/-/blob/libXft-2.3.5/NEWS
1e8c5b68 — Hiltjo Posthuma 2 months ago
fix a regression in the previous commit for tab complete

Reported by Santtu Lakkala <inz@inz.fi>, thanks!
tab-complete: figure out the size before copying

we already need to know the string length since `cursor` needs to be
adjusted.

so just calculate the length beforehand and use `memcpy` to copy exactly
as much as needed (as opposed to `strncpy` which always writes `n`
bytes).
readstdin: use getline(3)

currently readstdin():
   - fgets() into a local buffer,
   - strchr() the buffer to eleminate the newline
   - stdups() the buffer into items

a simpler way is to just use getline(3), which will do the allocation
for us; eliminating the need for stdup()-ing.

additionally getline returns back the amount of bytes read, which
eliminates the need for strchr()-ing to find the newline.
e35976f4 — Hiltjo Posthuma 3 months ago
sync code-style patch from libsl
28fb3e28 — Hiltjo Posthuma 6 months ago
Makefile: add manual path for OpenBSD
fe5d5c67 — Hiltjo Posthuma 6 months ago
fix incorrect comment, math is hard
e1e1de7b — Hiltjo Posthuma 6 months ago
inputw: improve correctness and startup performance, by NRK

Always use ~30% of the monitor width for the input in horizontal mode.

Patch adapted from NRK patches.
This also does not calculate inputw when using vertical mode anymore (because
the code is removed).
drw_text: account for fallback fonts in ellipsis_width

additionally, ellipsis_width (which shouldn't change) is made static to
avoid re-calculating it on each drw_text() call.
drw_text: don't segfault when called with 0 width

this patch just rejects *any* 0 width draws, which is surely an error by
the caller.

this also guards against cases where the width is too small for the
ellipsis to fit, so ellipsis_w will remain 0.
reported by Bakkeby <bakkeby@gmail.com>
e73651f1 — Hiltjo Posthuma 8 months ago
fix UB with the function iscntrl()

From commit 6818e07291f3b2913e687c8ec3d3fe4711724050 by NRK, thanks
31fa07b9 — Hiltjo Posthuma 8 months ago
Revert "avoid redraw when there's no change"

This reverts commit 6818e07291f3b2913e687c8ec3d3fe4711724050.

This broke keys such as ^W to delete-backward-word
avoid redraw when there's no change

while i was timing the performance issue, i noticed that there was lots
of random redrawing going on.

turns out there were coming from here; if someone presses CTRL/ALT etc
without pressing anything else, nothing will be inserted, so nothing
will change. but the code will `break`, go down and do a needless redraw.

this patch changes it to simply return if the keypress iscntrl()

also avoid potential UB by casting *buf into an unsigned char.
free all allocated items, use %zu for size_t

`items` itself is not checked for NULL as calling free on NULL is defined to be
a no-op.
Next