Age | Commit message (Collapse) | Author |
|
|
|
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 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.
|
|
|
|
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.
|
|
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 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.
|
|
|
|
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.
|
|
|
|
|
|
This isn't a great workaround, but the "correct" solution (implement
proper resizing logic and don't parse the config until our window is
shown) would incur significant extra complexity.
|
|
This allows config files to include other files, so you can e.g. split
style and behaviour options into different files.
|
|
This also stops font sizes from scaling when --scale=false is set.
|
|
|
|
|
|
|
|
Ctrl-u is just a whole line delete for now, as there's no sense of a
cursor position in tofi (so the whole line is "left" of the cursor).
|
|
Previously, tofi wouldn't scale pixel values by the output's scale
factor. This allows pixel-perfect sizes on displays with scale factors
>1, but means that configs need to be changed on a per-monitor basis,
and is at odds with how other applications (notable Sway) behave.
This commit adds a new option, --scale, to scale pixel values by the
output's scale factor. For backwards compatibility, this currently
defaults to false, and font scaling is performed regardless (the
existing behaviour). In the next release, this will default to true, and
font scaling will follow the same behaviour as everything else.
|
|
This enables some simple fuzzy matching logic for searches.
|
|
The config file code now delays calculation of percentage values until
`config_fix_percentages()` is called. This allows the config file to be
parsed before output configuration is complete, thus allowing `--output`
and `--late-keyboard-init` to be specified in the config file.
|
|
Pagination was broken in horizontal mode before, and in general tried to
render too many results (leading to a cut-off last result). This commit
fixes both of those, with the minor caveat that you can no longer scroll
straight to the last result.
|
|
The option is now deprecated, and a warning will be printed if it's
used. It may be removed in a future version of tofi, so it should be
removed from any configs now.
|
|
|
|
|