Comments (1)
Hey, sorry for the slow response, been busy with work recently.
Is there a way to calculate num_results_drawn without actually rendering the text?
Not with the current way things are done unfortunately. Tofi is designed to start up as fast as possible, and quite a few shortcuts are taken to achieve that (especially for the first two frames).
The whole problem of auto-detecting how many results to draw is a tough one. In vertical mode it's fine — you can just divide the space available by the size of each entry, as they're all the same height. In horizontal mode, the only way to know how many results will be drawn is to draw (or at least shape) them all. This is kind of the crux of the issues behind #21 and #73.
I think it might be possible to solve this if the shaping and drawing were split up, so you'd shape all the text, measure that, do any shifting necessary, and finally render all the text. That'd be a pretty significant overhaul of how tofi handles drawing though, so it's unlikely to happen in the near future. I'll try and look into it at some point though.
Thanks for the suggestion!
from tofi.
Related Issues (20)
- Issues with tofi on river and dual monitor setup HOT 2
- Tofi windows open on a different monitor when another window is active on the actual monitor. HOT 2
- che
- --auto-accept-single true should also close if there's nothing HOT 1
- Unable to open flatpak applications
- Segmentation Fault in GNOME HOT 3
- Running no match commands HOT 2
- Fully hide the input prompt + empty space?
- Minimal calculator function for tofi HOT 1
- `tofi-drun` does not list `.desktop`-file-missing apps, including some GUI and console apps
- Specify custom history file HOT 2
- Being able to put a title
- Segmentation fault when cache is not readable
- How do I make the window transparent? HOT 2
- Stretch issue with a taller geometry ratio on niri wm HOT 8
- -selected-row
- Text cuts at the bottom of the screen HOT 1
- Keyboard configurations not respected HOT 1
- Tofi app list not updating HOT 1
- Font size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tofi.