summaryrefslogtreecommitdiff
path: root/src/config.c
AgeCommit message (Collapse)Author
3 daysDon't make dmenu compat new config file optionszachir
4 daysAdd -r require flagZachIR
4 daysAdd -P password flagZachIR
4 daysAdd -b flag for bottomZachIR
2023-07-16Add --physical-keybindings option.Phil Jones
2023-05-14Add --print-index option.Phil Jones
2023-04-30Replace `strto[u]l` with `strto[u]ll`.Phil Jones
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.
2023-04-17Add --matching-algorithm option.Phil Jones
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.
2023-04-09Add --auto-accept-single option.Phil Jones
2023-03-06Add fractional scaling support.Phil Jones
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.
2023-03-03Convert to using wp_viewporter.Phil Jones
This is the next step in supporting fractional scaling, as wl_surface_set_buffer_scale only supports integer scale factors.
2023-02-28Convert to using Cairo scale.Phil Jones
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.
2022-12-21Add text cursor support.Phil Jones
This turned out to be much more complex than anticipated, and the potential for bugs is therefore quite high.
2022-12-11Add home path substitution for --font option.niki-on-github
2022-12-06Add config file unit tests and fix some bugs.Phil Jones
2022-12-01Add --ascii-input option.Phil Jones
2022-11-25Fix potentially uninitialised variable.Phil Jones
2022-11-24Avoid some unnecessary copying in config parser.Phil Jones
2022-11-24Fix more potential char parsing errors.Phil Jones
2022-11-24Don't set options if they failed to parse.Phil Jones
Also fix a potential segfault in character parsing found by AFLplusplus.
2022-11-22Fix new theme options not following scale factor.Phil Jones
2022-11-21Add --clip-to-padding option.Phil Jones
2022-11-21Overhaul text theming.Phil Jones
Each piece of text is now individually themable, with foreground and background colours and optionally rounded background corners.
2022-11-21Add --font-variations option.Phil Jones
2022-11-20Add --font-features option.Phil Jones
2022-11-19Add --history-file option.Phil Jones
2022-11-16Add placeholder text options.Phil Jones
2022-10-25Add --multi-instance option.Phil Jones
2022-10-23Replace wchar and friends with Unicode handling.Phil Jones
All text handling should now be explicitly UTF-8 or UTF-32, removing the ambiguity around wchar_t and related functions.
2022-10-22Add --terminal option.Phil Jones
2022-10-18Fix --exclusive-zone=-1 not working.Phil Jones
2022-10-14Add --exclusive-zone option.Phil Jones
2022-10-05Add options to hide input for passwords etc.Phil Jones
2022-09-27Add --include option.Phil Jones
This allows config files to include other files, so you can e.g. split style and behaviour options into different files.
2022-09-08Make --scale default to true.Phil Jones
This also stops font sizes from scaling when --scale=false is set.
2022-08-22Add --prompt-padding option.Phil Jones
2022-08-21Add --require-match option.Phil Jones
2022-08-20Fix double scaling of min-input-width.Dima Krasner
2022-08-20Add scale option.Phil Jones
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.
2022-08-12Add --fuzzy_match option.Phil Jones
This enables some simple fuzzy matching logic for searches.
2022-08-07Delay scaling of percentage values.Phil Jones
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.
2022-08-03Make --drun-print-exec always be true.Phil Jones
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.
2022-07-30Add option to colour matching portion of results.Phil Jones
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.
2022-07-30Improve error message for invalid colours.Phil Jones
2022-07-29Make a selection-padding of -1 be infinite.Phil Jones
2022-07-29Add --selection-padding option.Phil Jones
This adds some extra padding in the selection background, rather than tightly wrapping the selection text.
2022-07-27Fix window workspaces in drun mode.Phil Jones
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.
2022-07-24Add drun mode.Phil Jones
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).
2022-06-26Add optional background around selected result.Phil Jones
2022-06-26Fix multiple output handling.Phil Jones
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.