paul-nameless / tg

terminal telegram client
The Unlicense
955 stars 74 forks source link

Notfication example with Dunst. #223

Open rafamadriz opened 3 years ago

rafamadriz commented 3 years ago

Hey, thanks for this amazing work. It's been the only telegram client for terminal that actually works for me. I would like to set notifications using dunst but I haven't figured out what should be the command. Is it possible that you can provide an example command just like with terminal-notifier but using dunst instead ? Don't know if it has anything to do but I'm using kitty as my terminal. If you don't know anything about dunst I understand.

vivekkalyan commented 3 years ago

A very basic one i just created would be using notify-send

NOTIFY_CMD = "notify-send {title} {msg}"

We can do more complex things such as replying to a msg/or focusing tg through dunst (using dunstify. The relevant commands can found at https://wiki.archlinux.org/title/Dunst#Actions but would probably require the dev to help us with the tg hooks to call.

rafamadriz commented 3 years ago

Thank you very much, that's good enough for me. Although I'm gonna leave this open in case anyone can provide a more advance cmd with the functionality that @vivekkalyan said (unless the owner of this repo wants to close of course).

SmellsNice commented 3 years ago

Kind of unrelated but is it possible for notifications to appear even when tg isn't open in a terminal?

paul-nameless commented 3 years ago

No, but I thing you can run it in background.

SmellsNice commented 3 years ago

No, but I thing you can run it in background.

I'd be interested in learning how, excuse my ignorance if this is kind of an obvious question but I am quite new to hand configuring stuff for the most part and linux as a whole.

paul-nameless commented 3 years ago

I mean you can run it in the tmux and maybe pipe the tty somewhere and make it work as daemon but I haven't tried it so can't help.