tofi icon indicating copy to clipboard operation
tofi copied to clipboard

Mouse support

Open timsofteng opened this issue 3 years ago • 7 comments

Hello. Is it possible to add mouse support?

timsofteng avatar Oct 14 '22 09:10 timsofteng

It's not impossible, but it's pretty low on my list of priorities at the moment. Handling mice properly on Wayland comes with some annoyances, like having to load a cursor theme and such. Also if I do implement it, it'll probably be just for clicking on a result, as handling text selection etc. is likely better left to more advanced tools. Either way, I probably will get round to looking at it at some point, so I'll leave this open for now. Thanks for the suggestion!

philj56 avatar Oct 14 '22 21:10 philj56

I'd also like to suggest being able to exit out of tofi whenever clicking out it's window, should mouse support be added, someday.

This is because I use, among other things, tofi as a launcher for cliphist, launching it from a waybar icon as such:

image

image

Anyway, seeing as I can already kind of start tofi with the mouse, it would be nice to be able to interact with it also with the mouse.

P.S.: nevermind the difference between the number of entries announced by the waybar tooltip and the number displayed on tofi; I had to copy the screenshots to paste them here.

Also if I do implement it, it'll probably be just for clicking on a result

In my opinion, this, along with, optionally, @7ff04da4aa6ac37197e249299066ac30's suggestion of exiting tofi when clicking out of the window (and/or perhaps right-clicking on it) would be all that is really needed out of this kind of program as far as mouse support goes, at least, for the vast majority of use cases for Tofi.

The lack of mouse support for selecting and clicking on items is basically the only thing that kept me from fully switching from instantOS' dmenu fork "instantMENU" to Tofi for a long time, even if that means running instantMENU as an Xwayland program, which is far from ideal (and I also do not use most of the fancy functionalities of instantMENU anyway).

I still am switching to Tofi now, as Xwayland menu programs are causing me more and more trouble, and because Tofi is awesome overall and really freaking fast, but I wholeheartedly agree that basic mouse support would be the most welcome, even if it is not a priority.


Fun fact: Having mouse support in other similar programs allowed me to go into my custom program launcher, scroll down, click on the virtual keyboard entry, allowing me to use my laptop when my keyboard suddenly decided to unalive. It is really a supremely niche use case, but one that saved the day, and that is great for accessibility.

Atemo-C avatar May 10 '24 12:05 Atemo-C

No please :bowing_man:, no mouse support it's actually a neat feature.

Tomcat-42 avatar May 18 '24 19:05 Tomcat-42

No please 🙇‍♂️, no mouse support it's actually a neat feature.

Not being able to use the most common non-touch pointing device in the entire world with this kind of menu program is not a feature; In fact, it can easily be argued to be a bug.

There are reasons why even dmenu of all programs had mouse support patches, and that a lot of other similar programs implement it by default. It helps with usability, accessibility, offers more use-cases, and more.

If mouse support gets implemented in any way someday, nothing stops you from not using it, nor does it stop you from forking and removing mouse support from it.

Atemo-C avatar May 18 '24 19:05 Atemo-C

I actually agree with you on the importance of pointing devices (I used one to click on your profile picture out of pure curiosity).

There are reasons why even dmenu of all programs had mouse support patches.

Yeah, you're right, mouse support is optional in dmenu. Actually, this conforms with their philosophy. And I quote:

... Our philosophy is about keeping things simple, minimal, and usable. We believe this should become the mainstream philosophy in the IT sector. Unfortunately, the tendency for complex, error-prone, and slow software seems to be prevalent in the present-day software industry. We intend to prove the opposite with our software projects...

My reasons for choosing tofi can be summed up in the repo description: Tiny dynamic menu for Wayland. So, because of that, I don't think mouse support should be a priority. But in the end, it's not about what foonathan nor barbara wants, it's about a good set of defaults that align with the project's philosophy. And I finally quote @philj56:

The aim is to do just what I want it to as quickly as possible.

I don't want to start a holy war about something like this, but I like simple software.

XoXo, Tomcat-42.

Tomcat-42 avatar May 18 '24 19:05 Tomcat-42