Age | Commit message (Collapse) | Author |
|
This allows rounded background corners to work when a padding of -1 is
specified.
|
|
|
|
|
|
This turned out to be much more complex than anticipated, and the
potential for bugs is therefore quite high.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Also fix a potential segfault in character parsing found by AFLplusplus.
|
|
|
|
|
|
Each piece of text is now individually themable, with foreground and
background colours and optionally rounded background corners.
|
|
The list was getting far too long, and is about to get even longer with
text styling options. The user is instead directed to the manpage.
Also, don't print usage to stderr if `-h` was passed.
|
|
This change avoids warning about old compositors on newer versions of
Sway. Sway never actually supported version 4, and recently changed to
report only version 3 as supported.
|
|
|
|
|
|
|
|
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.
|
|
This is a short-term workaround for history sorting not working, due to
the binary search used to find exiting items relying on the input
already being sorted.
|
|
|
|
|
|
|
|
|
|
|
|
This is required on e.g. FreeBSD to define S_IRUSR / S_IWUSR.
|
|
|
|
|
|
|
|
This fixes an issue where receiving multiple keypresses in the time
taken to draw a frame could cause input to be out of sync with the
display.
|
|
All text handling should now be explicitly UTF-8 or UTF-32, removing the
ambiguity around wchar_t and related functions.
|
|
|
|
|
|
Fuzzy matching could previously take a very long time for long input
lines, as the number of possible matches quickly explodes. This commit
sets a line length limit of 100 characters - longer lines will only
return the first fuzzy match, rather than the best one.
|
|
Also changed keyboard shortcuts to use physical keycodes, rather than
XKB keysyms. This means shortcuts don't shift when keyboard layout is
changed.
|
|
|
|
This should allow case-insensitive matching for non-Latin characters,
and fix matching for characters with diacritics.
|
|
|
|
This allows tofi to show up on top of fullscreen windows.
|
|
Also fix unbound keys and modifiers resetting the selection.
|
|
|