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

Mouse support #43

Open
timsofteng opened this issue Oct 14, 2022 · 7 comments
Open

Mouse support #43

timsofteng opened this issue Oct 14, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@timsofteng
Copy link

Hello. Is it possible to add mouse support?

@philj56 philj56 added the enhancement New feature or request label Oct 14, 2022
@philj56
Copy link
Owner

philj56 commented Oct 14, 2022

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!

@7ff04da4aa6ac37197e249299066ac30

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.

@Atemo-C
Copy link

Atemo-C commented May 10, 2024

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.

@Tomcat-42
Copy link

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

@Atemo-C
Copy link

Atemo-C commented May 18, 2024

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.

@Tomcat-42
Copy link

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.

@marc24force
Copy link

Hi, I have implemented basic mouse support (#208).
It is not the traditional approach of clicking the desired entry but instead selecting with the wheel scroll and confirm with left click (right click to exit). I implemented it as such to align with my needs. I just mention it as it may be of use to someone else.

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

No branches or pull requests

6 participants