Age | Commit message (Collapse) | Author |
|
Previously, string vectors were built by reading input line-by line, and
multiple copies of string vectors were made when searching.
Now, input is read into one big buffer, and string vectors only contain
references to the strings in this buffer. This both speeds up reading of
input, and avoids unnecessary copying of strings in various places.
The main downside currently is that input read from stdin is no longer
UTF-8 normalised. This means, for example, that a search for `e` won't
necessarily match `é`. Normalisation is very slow relative to the rest
of tofi, however, and not needed for most use-cases. This could either
be solved by accepting the slowdown, or making this an option, such as
--unicode or --unicode-normalize.
|
|
We can assume that string vectors generated by tofi are already
normalised, so don't waste time normalising them again.
Also make sure to validate strings from the user.
|
|
This adds `_sorted` to the names of `string_vec_find` and
`desktop_vec_find`, to make it clear that these functions require their
input to already be sorted.
Also fix a potential bug from not sorting the list of desktops in drun
mode.
|
|
By using a hash table rather than binary search to find existing items,
we can avoid the need to sort the input.
|
|
Some of the string vec code was still assuming that it was just a list
of `char *`s, rather than `struct scored_string`s. Correcting that makes
future changes a little less error prone, and allows significantly
simpler history sorting for tofi-run.
|
|
All text handling should now be explicitly UTF-8 or UTF-32, removing the
ambiguity around wchar_t and related functions.
|
|
This should allow case-insensitive matching for non-Latin characters,
and fix matching for characters with diacritics.
|
|
|
|
This enables some simple fuzzy matching logic for searches.
|
|
This is a pretty simple implementation, but it should work for most
use cases. Notably, generic application names aren't used (though that
could be added without too much hassle), and neither are keywords (that
would be more difficult).
|
|
Search results will now be sorted by history first, then by the position
of the match, such that a match at the start of a result will appear
before a match later in the result.
|
|
Single letter style arguments have been removed.
|
|
There are too many really to use single-character args, so the next step
should be a config file.
|
|
A list of commands is now stored in $XDG_CACHE_HOME/.cache/tofi-compgen,
and regenerated as necessary.
|
|
eglInitialize() is slow (~50-100ms), and uses a fair amount of memory
(~100 MB). For such a small, simple program that just wants to launch as
quickly as possible, wl_shm performs better.
|
|
This implements a rofi-like run cache. Other smaller changes include
simplification of resize logic now that there's only one surface.
|
|
- Remove the background image and libpng dependency
- Add a prompt
- Add xmalloc with out-of-memory handling
- Add beginnings of a rofi-like run cache
|
|
|
|
|