Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Stinky Wizzleteet <wizzleteet@hotmail.com>
To: info-gnus-english@gnu.org
Subject: Customize gnus: X-Now-Playing
Date: Wed, 11 Aug 2010 14:32:47 +0200	[thread overview]
Message-ID: <8739ultjm8.fsf@mauc.nl> (raw)

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.

                 reply	other threads:[~2010-08-11 12:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8739ultjm8.fsf@mauc.nl \
    --to=wizzleteet@hotmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).