Skip to content

Instantly share code, notes, and snippets.

@cvmat
Created May 27, 2012 11:15
Show Gist options
  • Save cvmat/2806295 to your computer and use it in GitHub Desktop.
Save cvmat/2806295 to your computer and use it in GitHub Desktop.
Tweet notification with the text.
(defun my-notify-tweets ()
(mapcar (lambda (tweet)
(let ((text (cdr (assq 'text tweet)))
(user (cdr (assq 'user-name tweet))))
(start-process "twittering-notify" nil "notify-send"
"-i" "/usr/share/pixmaps/gnome-emacs.png"
(format "A new tweet from %s" user)
text)))
;; You should replace `twittering-rendered-new-tweets' with
;; `twittering-new-tweets-statuses' for 2.0.0.
twittering-rendered-new-tweets))
;; You should replace `twittering-new-tweets-rendered-hook' with
;; `twittering-new-tweets-hook' for 2.0.0.
(add-hook 'twittering-new-tweets-rendered-hook 'my-notify-tweets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment