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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
All text handling should now be explicitly UTF-8 or UTF-32, removing the
ambiguity around wchar_t and related functions.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
This was done by breaking the selected result into three parts, and
rendering each separately. A side-effect is that ligatures split when a
match ends inside them, but I think that's the correct behaviour (rather
than highlighting the whole ligature).
There may be issues with some non-latin languages that make much more
extensive use of ligatures / combining characters, however.
|
|
|
|
|
|
This adds some extra padding in the selection background, rather than
tightly wrapping the selection text.
|
|
Previously, tofi-drun would print the filename of the selected
.desktop file to stdout. This could then be passed to
`xargs swaymsg exec gio launch` to be executed.
The problem is that this ends up defeating the purpose of passing the
command to swaymsg exec, and the workspace the command was selected on
may not be the one that it starts up on, if for example it takes a long
time and the user switches workspaces in the meantime.
The solution is to instead print the Exec= line from the .desktop file,
and pass that directly to `xargs swaymsg exec --` for execution.
To avoid too much breaking of configs for the few people who use tofi
currently, this commit adds a new option, --drun-print-exec, to enable
the fixed behaviour. A future release will change this to be the
default, however.
|
|
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).
|
|
|
|
The --output option can be passed to select a specific output to appear
on. Which output is chosen otherwise is currently random, as I don't
know yet how to determine which one the user's currently on.
|
|
|
|
Also change --font-name option to just --font.
|
|
|
|
Also improve text on non-hidpi screens.
|
|
|
|
Implement horizontal mode for Pango, and add min-input-width option.
|
|
|
|
The scale factor is now only used to scale font sizes, not all Cairo
drawing operations. This makes pixel-sized options correct.
|
|
Invoking 'tofi' now acts like dmenu, expecting newline-separated options
on stdin.
Also fix history file handling and add an option to disable it.
|