darkhz / bluetuith

A TUI bluetooth manager for Linux.
MIT License
914 stars 24 forks source link

Quit Menu #8

Closed arghyadipchak closed 1 year ago

arghyadipchak commented 1 year ago

Wouldn't it much easier if it would quit as soon as I pressed 'y' instead of having to type 'y' and then press enter?

darkhz commented 1 year ago

I suppose, and it can be implemented, but I've designed it that way to prevent accidentally quitting the application. I think pressing y+Enter provides a somewhat more (granular?) control over the quitting process, compared to just pressing y. I'm open to changing this though.

arghyadipchak commented 1 year ago

I think just y would be fine as the person is already pressing q because he wishes to quit. To prevent accidental quitting maybe you can make the prompt like Quit (y/N) ? so if the person presses anything other than y, N is taken as default so it doesn't quit and it only quits if y is pressed.

darkhz commented 1 year ago

I'll consider implementing this

carsin commented 1 year ago

+1, I'd be fine with disabling the quit confirmation altogether

darkhz commented 1 year ago

I think just y would be fine as the person is already pressing q because he wishes to quit. To prevent accidental quitting maybe you can make the prompt like Quit (y/N) ? so if the person presses anything other than y, N is taken as default so it doesn't quit and it only quits if y is pressed.

Ok, this will be implemented in the next release.

+1, I'd be fine with disabling the quit confirmation altogether

Disabling the quit confirmation is somewhat "dangerous" in my opinion. For example, if you are running a send/receive file transfer, and you accidentally press Q, the file will be corrupted, various crashes/errors will occur either on bluez, or the bluetooth stack on the other device where you initiated the transfer, since the bluetooth agent wasn't properly terminated.

xeruf commented 1 year ago

How about adding Shift+Q i.e. big Q as instant quit option? This is easy to type but hardly happens accidentally.

darkhz commented 1 year ago

@xeruf interesting opinion. @arghyadipchak will this suffice? I think this suggestion is good, since pressing Shift+Q would be slightly faster and less tedious than typing q+y.

katexochen commented 1 year ago

Faster quitting is definitely a feature I would greatly appreciate. I think shift+q is a valid choice.

For example, if you are running a send/receive file transfer, and you accidentally press Q

Just to give some context, personally, I use bluetuith as comfortable interface to scan, pair and connect devices. It opens when I click on the bluetooth icon in my waybar (and I would love to be able to quit quickly after connecting). I hadn't a use case for the transfer feature yet. Thanks for developing such a great tool. :+1: