newsboat / stfl

stfl with Newsboat-related bugfixes
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Add mouse support #5

Open cwolfe3 opened 2 years ago

cwolfe3 commented 2 years ago

Currently stfl does not have mouse support. I would like to have mouse support in newsboat (https://github.com/newsboat/newsboat/issues/1433), and this seems to be the place to add that functionality. I am willing to work on adding it. I know newsboat is going to be moving from stfl eventually, so I'm not sure if it's worth it for me to start.

Minoru commented 2 years ago

Oof. I was hoping I won't have to review any large changes to this repository :) I just wanted to keep a working copy that distributions can package to keep Newsboat in their repositories.

Also, newsboat/newsboat#1433 stalled because it's unclear what mouse clicks should do (should they even do anything?). Since you want this feature in Newsboat, it'd be nice if you could describe your expectation of what it would be able to do.

Finally, it'd be nice to deal with #1 before adding anything to the code ;)

cwolfe3 commented 2 years ago

I completely understand. Adding mouse support is not very 'low-key'.

From the point of view of stfl, how newsboat uses it isn't super relevant. It would be more of a question of whether mouse support is useful to the library. Evidently the other C. Wolf (!) doesn't agree with me that it's useful. Stfl would provide mouse events as a binding, and programs could use them how they wish. For what it's worth, independently of the person who suggested it in the 1433 issue, I imagined mouse support working in newsboat as 'left-click to open an article, right-click to go back'. This works for me because I don't read most of the items in my feed. I don't iterate through them. Mouse events can be handled similarly to key events as long as focus is handled reasonably.

But, seeing as this has been folded under the newsboat project as opposed to being an independent library, I don't have a strong argument for the inclusion for mouse support. That's not maintenance. This is just something I've wanted for a while, and I now have the free time to do it. I will almost certainly end up implementing this for my personal use, but if it's not deemed worth reviewing for the project, I'm fine with that.

I unfortunately don't know anything about Cirrus or Docker. I'll try contributing to newsboat in other ways.

Minoru commented 2 years ago

Mouse events can be handled similarly to key events as long as focus is handled reasonably.

That's the sticking point for me: I don't understand how to fit the focus nicely into the current bind-key framework we have. Sometimes the focus can be implied, e.g. a binding within a feedlist relates to clicks on feeds. OTOH, what if a user wants a separate action if they click on an empty area?

I also agree that STFL's implementation should be independent from Newsboat's needs, but at the same time, I think it's pointless to work on STFL if I don't understand how Newsboat is going to be using it.

kyprifog commented 4 months ago

There was question whether or not this was useful so I thought id give my two cents. The reason i would find this useful is that i was setting up RSS reader on a touchscreen based information center that I built on a raspberry pi and its set up to use a very minimal set up, just a ch57x keypad as a macropad and the touchscreen with some custom golang software that all runs in terminal/tmux for various personal management tasks, and it would be really nice if I could just touch the menu items and go either into a particular feed or news item without having to use my full keyboard with arrow keys etc. Now i'm looking for a different terminal based RSS reader with mouse support since this is built on ncurses STFL.

Looking for recommendations for alternatives that have mouse support if anyone has one.