Using Paradox for Github notifications30 Nov 2015, by Artur Malabarba.
A few weeks ago I noticed a new package on Melpa called github-notifier by Chunyang, which displays a count of your Github notifications on the mode-line. Instead of just installing the package like a normal person, I had an urge to try and see how hard it would be to write from scratch. Paradox already has a function for interacting with the Github API, so it’s just a matter of putting it to work.
The first thing you need to do is visit your Github tokens page, and edit the Paradox token to allow access to your notifications.
Next, define a command to visit your notifications, and a function to display a button in the mode-line.
For convenience, I’ve also added
visit-notifications to my launcher-map under
Next, write a function to query the Github API and pass the vector of
Finally, just set the timer to some convenient interval. I run it at every 30 seconds of idle time.
And that’s all! Roughly 30 lines of code and you have a convenient notification
system. Whenever you see that
GH-2 show up at the corner of your mode-line,
just click on it (or type C-x l n). That will remove the button and take you
to Github. On Github you can navigate with j, k, and RET, and “mark as
read” with m.