isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
444 stars 40 forks source link

Show desktop notifications only when scli is not active #109

Open exquo opened 3 years ago

exquo commented 3 years ago

When a new message arrives while the user is looking at (or interacting with) scli, it is not necessary to show a desktop (popup) notification, in addition to a notification in scli itself. Unfortunately, it is not easy to figure out where the user is looking :).

We could use some "proxy" metrics, like the time of the last keypress in scli, or check with the window manager weather scli's terminal window is currently active. These are not 100% reliable however.

I don't know of a foolproof way of doing this. For now, scli simply shows a desktop notification for every incoming message.