Commit Graph

45 Commits

Author SHA1 Message Date
bakkeby
761bc7939f inputw: improve correctness and startup performance
a massive amount of time inside readstdin() is spent trying to get the
max input width and then put it into inputw, only for it to get clamped
down to mw/3 inside setup().

it makes more sense to calculate inputw inside setup() once we have mw
available. similar to the last patch, i see noticeable startup
performance improvement:

before -> after
160ms  -> 60ms

additionally this will take fallback fonts into account compared to the
previous version, so it's not only more performant but also more correct.

ref. https://git.suckless.org/dmenu/commit/77526f756e23e362081ac807521f901f2e5cd5e6.html

Disclaimer: this may break the JSON patch
2022-03-28 11:10:31 +02:00
bakkeby
067aa41ac3 significantly improve performance on large strings
this replaces inefficient pattern of `MIN(TEXTW(..), n)` with
drw_fontset_getwidth_clamp() instead, which is far more efficient when
we only want up to a certain width.

dumping a decently sized (unicode) emoji file into dmenu, I see the
startup time drop significantly with this patch.

before -> after
360ms  -> 160ms

this should also noticeably improve input latency (responsiveness) given
that calcoffsets() and drawmenu() are pretty hot functions.

ref. https://git.suckless.org/dmenu/commit/7269c5355d257dd2ad2c53f15dc9c1cf6796aea5.html
2022-03-28 11:02:11 +02:00
bakkeby
40ee9e2b7d highpriority: adding check for malloc failure + cleanup on exit
ref. https://git.suckless.org/sites/commit/9bbc02d13a89e427a046817771c6f8fd332d0167.html
2022-03-27 22:38:32 +02:00
bakkeby
b210a99e31 multiselect + restrict return compatibilty 2022-03-14 11:39:19 +01:00
bakkeby
d4ba5053ce border patch: adding separate colour scheme for the border (rather than forcing SchemeSel) 2022-03-14 11:26:51 +01:00
bakkeby
6dd910f53c border patch: fix for no border on the right hand side 2021-10-20 17:52:57 +02:00
bakkeby
7fd7f72d5d xresources: Questionable solution to allowing command line arguments to take precedence over xresources 2021-10-20 17:41:28 +02:00
bakkeby
328a60e0d3 Addressing prefixcompletion vs fuzzymatch compatibility issue ref. #5 2021-08-24 16:54:57 +02:00
bakkeby
6f8e43ac08 add support for more keypad keys
The keypad Enter key was already supported. On some keyboard layouts like my
laptop the page-up and page-down key is more comfortable to use.
This adds a few lines but no complexity.

Ref. https://git.suckless.org/dmenu/commit/cd2133a5f66b42f992a9a1b92bbbce11dc26b941.html
2021-08-16 10:44:16 +02:00
bakkeby
3cb4dbdf7a [dmenu][patch][navhistory] Bug fix: Write first entry to history file
- Bug fix: Don't skip writing first entry to history file. This happened for
  `histnodup` = 1 (default) plus `histsz` = 0 (value when starting with an
  empty history).

Ref.
https://git.suckless.org/sites/commit/f759877d393eaed126dfc8e56932c49e7581a181.html
2021-07-26 12:10:44 +02:00
bakkeby
1d200d199b alpha: repurposing the -o option to enable or disable alpha ref. #4 2021-07-25 10:09:38 +02:00
bakkeby
c70b92c85c pango: addressing some lineheight and emoji patch compatibility issues 2021-07-14 10:22:51 +02:00
bakkeby
82aa682b40 Adding emoji-highlight patch 2021-05-24 13:29:40 +02:00
bakkeby
b6103ff6a7 Adding support for ctrl+v to paste 2021-05-23 13:16:26 +02:00
bakkeby
608fa3e837 Adding gridnav patch 2021-05-17 11:46:50 +02:00
bakkeby
f469820531 Adding plain prompt (listfullwidth) patch 2021-05-17 11:39:39 +02:00
bakkeby
24ff57a540 Adding no sort patch 2021-05-17 11:10:09 +02:00
bakkeby
d6894046f1 Adding restrict return patch 2021-05-17 10:59:48 +02:00
bakkeby
976d6bc04c Adding printindex patch 2021-05-15 14:40:05 +02:00
bakkeby
93f5b58d4e Adding tsv patch 2021-05-15 12:51:58 +02:00
bakkeby
e8da68a1a0 xresources: munmap_chunck(): Invalid Pointer when xrdb has not been loaded, ref. #2 2021-03-05 15:28:45 +01:00
bakkeby
088a083524 Proposed fix to make dynamic options and non-blocking stdin patch to work together 2020-09-17 11:14:04 +02:00
bakkeby
3eac73fe85 Adding json patch 2020-08-09 15:10:29 +02:00
bakkeby
1f6c8c1e7c MULTI_SELECT_PATCH --> MULTI_SELECTION_PATCH 2020-08-09 13:49:41 +02:00
bakkeby
240cce1c1a Adding multi-select patch 2020-08-09 13:30:03 +02:00
bakkeby
841a0cff2b Adding morecolor patch 2020-08-09 11:57:51 +02:00
bakkeby
478f49b1c4 Adding preselect patch 2020-08-09 11:51:34 +02:00
bakkeby
984476ba94 Adding managed patch 2020-08-09 11:28:27 +02:00
bakkeby
a96da272b3 Adding symbols patch 2020-08-09 11:07:25 +02:00
bakkeby
17d32014a3 Adding highpriority patch 2020-08-05 14:54:01 +02:00
bakkeby
aa50b3f2c5 Adding highlight patch 2020-08-05 13:19:30 +02:00
bakkeby
768b5527ab Adding numbers patch 2020-08-05 12:40:03 +02:00
bakkeby
73d2405635 Adding dynamic options patch 2020-08-05 12:27:15 +02:00
bakkeby
ee3e48fe0b Adding grid patch 2020-08-05 11:31:54 +02:00
bakkeby
419de40e2c Adding pango patch 2020-06-13 15:32:41 +02:00
bakkeby
9248bbb392 Addiing the case-insensitive patch 2020-06-10 12:53:27 +02:00
bakkeby
138f352052 Alpha vs wmtype patch correction 2020-05-29 17:13:17 +02:00
bakkeby
e9cfb59a5d Adding alpha patch 2020-05-29 17:01:40 +02:00
bakkeby
fcfde08faf Adding fuzzyhighlight patch 2020-04-04 09:58:35 +02:00
bakkeby
0f6d298600 Updating xresources patch as per 2020-03-02: [dmenu][patch] xresources: fixed patch, updated description 2020-03-29 12:45:39 +02:00
bakkeby
db891f3f9b [dmenu][border] Revised Dmenu Border Patch 2020-02-09 10:48:08 +01:00
bakkeby
d7f418468d Adding configurable minimum width when using the center patch #1 2020-01-27 09:43:10 +01:00
Stein
0344cdea20 [hackers] [dmenu][PATCH] Fix C warning about using '*' in boolean context 2020-01-02 10:09:26 +01:00
bakkeby
9147fb7202 Adding xresources patch 2019-12-29 14:13:22 +01:00
bakkeby
f128efa1b2 Added border, center, fuzzymatch, incremental, initialtext, instant, line-height, mouse-support, navhistory, non-blocking-stdin, password, pipeout, printinputtext, rejectnomatch, scroll, vertfull, wmtype and xyw patches 2019-09-19 00:33:15 +02:00