Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Emacs like keybindings for when Tofi is displayed horizontally.
|
|
|
|
|
|
|
|
This is the correct way to check if we have execute permissions for a
file (rather than checking `S_IXUSR`), and it isn't any slower. Should
result in very few differences (on my system, only `cupsd` disappears
from the list with this change).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also generally clean up input handling a bit.
|
|
|
|
On 32-bit systems, using `strtoul` was causing negative values for
unsigned options to be treated as valid, as the value was being parsed
as a 32-bit unsigned int, then cast to a 64-bit signed int, which
remained positive.
|
|
|
|
This replaces the --fuzzy-match algorithm. Available choices are normal,
prefix and fuzzy. Levenshtein distance was investigated, but it seems
pretty rubbish for tofi's use case, where you normally want a good match when
you've only typed a small portion of the target string.
|
|
I had misunderstood the purpose of the OpenType line gap field 'hlgp'. I
thought this was a suggested total line spacing, but it's actually extra
spacing to be added to (ascender - descender).
|
|
|
|
This was broken in the recent changes to allow fractional scaling, as a
calculation hadn't been updated.
|
|
|
|
|
|
|
|
I now understand how this was supposed to be done.
|
|
|
|
The main change is that we now always have to set up the dummy surface
which was previously only used when multiple monitors were present. This
is because there's no way to determine an output's fractional scale
factor without displaying a surface on it, and we need to know the scale
factor before we create our main window surface.
The extra compositor round-trips lead to a slight slowdown for single
monitor setups (to the same speed as multi-monitor setups), but it's
currently unavoidable as far as I know.
|
|
|
|
This is the next step in supporting fractional scaling, as
wl_surface_set_buffer_scale only supports integer scale factors.
|
|
|
|
Instead of scaling various theme parameters ourselves, just set the
scale in Cairo. This shouldn't result in any visible changes, but lays
the ground work for fractional scaling support.
|
|
|
|
|
|
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.
|