Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Customize gnus: X-Now-Playing
@ 2010-08-11 12:32 Stinky Wizzleteet
  0 siblings, 0 replies; only message in thread
From: Stinky Wizzleteet @ 2010-08-11 12:32 UTC (permalink / raw)
  To: info-gnus-english

Hi all,
another journal entry for my gnus costomization, today it's the
X-Now-Playing header you can see up there.

From the EmacsWiki (http://www.emacswiki.org/emacs/XNowPlayingHeader)
;;;;;;;;;;;;;;;;;; start .gnus edit
(defun mak-insert-x-now-playing ()
   "Insert the title of the song I'm currently listening to."
   (interactive)
   (if (string-match "." (shell-command-to-string (expand-file-name "/usr/bin/xmms_np")))
       (shell-command-to-string (expand-file-name "/usr/bin/xmms_np"))))
;;;;;;;;;;;;;;;;;; stop

xmms_np is a custom program that reads the now playing song from xmms.
I'm using Rhythmbox, things turned out to be even easier:
replace all instances of /usr/bin/xmms-np with:
"/usr/bin/rhythmbox-client --print-playing"
Rhytmbox has a cli client that comes in handy.

posting stlye:
insert this in your subsequent posting styles:
;;;;;;;;;;;;;;;;;; start .gnus edit
("X-Now-Playing" mak-insert-x-now-playing)
;;;;;;;;;;;;;;;;;; stop

Come to think of it, I think I'll trot off to make some keybindings for
rhythmbox-client


-- 
Stinky Wizzleteet thinks: 
You are taking yourself far too seriously.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-11 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 12:32 Customize gnus: X-Now-Playing Stinky Wizzleteet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).