summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-06-23Add config file name to error messages.Phil Jones
2022-06-23Allow percentages for window size & margins.Phil Jones
2022-06-21Add result selection.Phil Jones
2022-06-21Minor parsing bugfixes.Phil Jones
2022-06-21Add config file handling.Phil Jones
Single letter style arguments have been removed.
2022-06-21Add various command line arguments.Phil Jones
There are too many really to use single-character args, so the next step should be a config file.
2022-06-11Add compgen caching.Phil Jones
A list of commands is now stored in $XDG_CACHE_HOME/.cache/tofi-compgen, and regenerated as necessary.
2022-06-10Various small changes.Phil Jones
- Split the compgen and history sorting parts of compgen(), for future dmenu-like work. - Add a separate tofi-compgen executable. - Remove harfbuzz-glib usage, as we shouldn't be doing any complicated unicode stuff.
2022-06-10Minor cleanup.Phil Jones
2022-06-10Cleanup and comment HarfBuzz code.Phil Jones
2022-06-10Space Pango lines correctly.Phil Jones
2022-06-10Add indents to log functions.Phil Jones
2022-06-10Use doubles for harfbuzz glyph coordinates.Phil Jones
Previously integers were used, effectively removing any sub-pixel positioning.
2022-06-10Remove unneeded Pango layouts.Phil Jones
We don't actually need a separate pango layout for each piece of text, as we only use them one-by-one anyway, so just use one instead.
2022-06-10Comment out malloc debug logs.Phil Jones
2022-06-10Delay second buffer initialisation.Phil Jones
We don't actually need to initialise our second Cairo context / surface until after the first one has been painted to the screen. This commit therefore delays this initialisation (or at least the expensive memcpy), granting a significant reduction in startup time. The downside is that main() and entry_init() are now tied together somewhat, but hopefully the comments help.
2022-06-10Avoid an unnecessary copy of the image buffer.Phil Jones
By pointing Cairo at the mmap-ed file used to create wl_shm buffers, we can eliminate a memcpy() on every draw, providing a decent speedup (especially for large window sizes). This comes at the expense of having to keep track of two Cairo contexts, one for each of our two buffers used for double buffering. Additionally, a single memcpy() is still required for initialisation of the second buffer, so the startup latency isn't affected much.
2022-06-09Minor cleanup.Phil Jones
2022-06-09Speed up Cairo initialisation.Phil Jones
Rather than using cairo_paint() and re-drawing the middle of the window multiple times, use cairo_rectangle() + cairo_stroke(). This especially helps for large (e.g. fullscreen) windows.
2022-06-09Add Harfbuzz backend.Phil Jones
Another source of slow startup is initialising Pango. If the user supplies a ttf file, we can skip any Pango stuff and use Harfbuzz directly with Cairo to do our font rendering, providing a large speedup.
2022-06-07Switch from using (E)GL to wl_shm.Phil Jones
eglInitialize() is slow (~50-100ms), and uses a fair amount of memory (~100 MB). For such a small, simple program that just wants to launch as quickly as possible, wl_shm performs better.
2021-11-17Add sorting by run frequency.Phil Jones
This implements a rofi-like run cache. Other smaller changes include simplification of resize logic now that there's only one surface.
2021-11-15Multiple smaller changes.Phil Jones
- Remove the background image and libpng dependency - Add a prompt - Add xmalloc with out-of-memory handling - Add beginnings of a rofi-like run cache
2021-11-15Switch from subsurface setup to just one surface.Phil Jones
The subsurface was playing havoc with layer shell stuff, and I don't think any potential efficiency gain is worth the complicated code to work out how big the subsurface should be. Instead, the entry code now just draws directly onto the main surface. Damage information should be passed to glTexSubImage2D() in future, to avoid redrawing the entire window every keypress.
2021-11-14Initial experiments with layer shell.Phil Jones
2021-11-14Rename main struct to tofi.Phil Jones
2021-11-07Initial working build.Phil Jones
2021-11-06Start conversion to tofi.Phil Jones
2021-11-04Generate xdg-shell protocol files at build time.Phil Jones
2021-11-04Print both real and cpu time in debug logs.Phil Jones
Also various minor cleanup.
2021-11-04Correct element buffer data type.Phil Jones
OpenGL ES 2 only allows byte or short indices in the element buffer, not int.
2021-11-03Add missing -T option to manpage and usage string.Phil Jones
2021-11-03Don't use Pango by default.Phil Jones
Initialising Pango makes up a large portion of the startup time, and we can achieve neater rendering with pure Cairo if we're just drawing circles anyway. Therefore, this commit avoids loading Pango if no options which require it are specified (such as --font-name or --password-character). This reduces startup time with no background image to ~40ms on my machine (2015 MacBook Pro).
2021-11-03Fix crash when closing a debug build.Phil Jones
2021-11-02Add option to hide the cursor.Phil Jones
2021-11-02Remove some unnecessary forward-declarations.Phil Jones
2021-11-01Change texture swizzling to work with ES 2.Phil Jones
2021-11-01Change default password character to full-stop.Phil Jones
2021-11-01Add missing include.Phil Jones
2021-11-01Switch from OpenGL ES 3 to 2.Phil Jones
2021-11-01Add extra cleanup code to debug builds.Phil Jones
Also fix some memory leaks.
2021-11-01Add bash completion.Phil Jones
2021-11-01Add manpage and usage help.Phil Jones
2021-10-31Add actual greetd functionality.Phil Jones
Useable, but very barebones — not even any error message reporting.
2021-10-31Include shaders in install.Phil Jones
2021-10-31Also clear entry when Ctrl-C is pressed.Phil Jones
2021-10-31Don't log which font is being used in release.Phil Jones
This speeds up Pango initialisation, which is by far the slowest part.
2021-10-31Add HiDPI support and lots of cleanup.Phil Jones
2021-10-29Basic text entry working.Phil Jones
2021-10-28Add basic HiDPI scaling and a subsurface.Phil Jones