Guest

Audacious 2.x IRC Now Playing Announcer Manual-paste

By: a guest on Aug 19th, 2010  |  syntax: Bash  |  size: 0.78 KB  |  hits: 167  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1. #!usr/bin/bash
  2. #Audacious 2.x IRC Now Playing Announcer Manual-paste by Honoo http://daishirokisame.wordpress.com
  3. #This script requires Audacious 2.x, xclip and notify-send installed
  4.  
  5. #Try to see if Audacious is running, if it is then proceed with the output, else ignore it
  6. #and notify the user that it is not running
  7.  
  8. if [ -z "$(pgrep audacious2)" ]
  9.         then
  10.                 DISPLAY=:0.0 notify-send "Audacious Text Announcer (aud-announceme):" "Audacious is not running."
  11.         else
  12.                 echo "/me np: 8,1" `audtool2 current-song` " 5" `audtool2 current-song-info` " at 10[ " `audtool2 current-song-output-length` " - 7" `audtool2 current-song-length` " ]"| xclip
  13.                 DISPLAY=:0.0 notify-send "Successfully done! Go into your IRC client" " and just press the middle mouse button to paste it!"
  14. fi