Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable <small>(emoji description)</small> text in fuzzel... #209

Closed
salman-farooq-sh opened this issue Dec 18, 2024 · 14 comments
Closed

Comments

@salman-farooq-sh
Copy link

...or make fuzzel render it properly instead of just displaying the markup tags?

@fdw
Copy link
Owner

fdw commented Dec 22, 2024

If fuzzel supports markup, that would be my preferred solution, but I don't think it's currently supported.

If that's out of scope for them, I'll have to see if there's another good solution... it's very helpful for rofi, so disabling it completely is not sensible. But changing the format of the data files and inserting it at run time is quite costly, unfortunately.

@salman-farooq-sh
Copy link
Author

That's unfortunate. I will try to look at the code too and see if I am able to come up with any solutions.

Thanks for your input.

@salman-farooq-sh
Copy link
Author

Having copies of data files without the markup is a possibility?

fdw added a commit that referenced this issue Jan 16, 2025
Naively try to remove formatting tags for selectors that don't support
it.

Issue: #209
@fdw
Copy link
Owner

fdw commented Jan 16, 2025

Theoretically yes, but that would duplicate some of them, leading to an even larger size of the package 😕

Instead, I've tried to very naively strip the tags. Could you please try the branch test/strip-tags when you have some time and see whether this works and is fast enough?

@salman-farooq-sh
Copy link
Author

Running time poetry run rofimoji on the test/strip-tags and the main branch feels the same. I measured by doing my best to press the Escape key as quickly as possible after fuzzel shows up.

Is the performance difference negligible on your side?

@salman-farooq-sh
Copy link
Author

Is a few megabytes extra in package size not okay in case it gives significant speedup? We can also make it so that the stripped data files are statically generated after download as part of installation instead of packaging them.

@fdw
Copy link
Owner

fdw commented Jan 17, 2025

Ideally, we'd have both performance and small package size 😉

But as always, we have to choose between good things. If the performance with strip-tags is not noticeable worse, that would be my preferred solution.

Is the performance difference negligible on your side?

I ran no extensive tests, but it felt good enough to me. Just wanted to make sure that that is not a fluke.

We can also make it so that the stripped data files are statically generated after download as part of installation instead of packaging them.

All the data files are currently packaged and not downloaded on demand. I find this is a nicer UX when everything just works.

@salman-farooq-sh
Copy link
Author

We can also make it so that the stripped data files are statically generated after download as part of installation instead of packaging them.

All the data files are currently packaged and not downloaded on demand. I find this is a nicer UX when everything just works.

I meant the duplicate data files with tags removed will be generated from the data files with tags as a new package installation step after the single download, e.g. as with an awk command.

But I think we won't need this as the performance is pretty similar doing it on the fly as well. Maybe the release build of rofimoji will differ in performance? I will try it later and let you know.

I can open a PR for the extra installation step solution if you want to go ahead with that.

@salman-farooq-sh
Copy link
Author

salman-farooq-sh commented Jan 17, 2025

Maybe the release build of rofimoji will differ in performance? I will try it later and let you know.

I just tried with poetry build packages. The difference is negligible and within the margin of error. Let's proceed with test/strip-tags.

@tomalexander
Copy link

tomalexander commented Jan 18, 2025

This also impacts tofi (and the test/strip-tags fixes it for me on tofi).

fdw added a commit that referenced this issue Jan 19, 2025
Naively try to remove formatting tags for selectors that don't support
it.

Issue: #209
@fdw
Copy link
Owner

fdw commented Jan 19, 2025

I've pushed the workaround to main, so it will be in the next release 🙂

@salman-farooq-sh
Copy link
Author

Does it remove the markup for all selectors including rofi?

@fdw
Copy link
Owner

fdw commented Jan 19, 2025

No, rofi supports markup, so it's still there.

@salman-farooq-sh
Copy link
Author

Thanks! Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants