View Single Post
  #1 (permalink)  
Old 09-Jul-2009, 10:21
Axeia's Avatar
Axeia Axeia is offline
Parent Penguin
 
Join Date: Jul 2008
Location: Netherlands
Posts: 981
Axeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enough
Default Shell script, Amarok currently playing.. need some help

Okay this is what I got:
Code:
#! /bin/bash
BITRATE=$("qdbus org.kde.amarok /Player GetMetadata | grep bitrate | sed 's/audio-bitrate: //'")
ARTIST=$("qdbus org.kde.amarok /Player GetMetadata | grep artist | sed 's/artist: //'")
ALBUM=$("qdbus org.kde.amarok /Player GetMetadata | grep album | head -n 1 | sed 's/album: //'")
TITLE=$("qdbus org.kde.amarok /Player GetMetadata | grep title | tail -n 1 | sed 's/title: //'")
YEAR=$("qdbus org.kde.amarok /Player GetMetadata | grep year | sed 's/year: //'")
SAMPLERATE=$("qdbus org.kde.amarok /Player GetMetadata | grep audio-samplerate | sed 's/audio-samplerate: //'")

echo -e "np: $ARTIST - $TITLE <$ALBUM ($YEAR)> [$FILETYPE @ $BITRATE kbps | $SAMPLERATE hz ] [$NOW/$TIME]"
I think the intention should be clear, but in case it's not.
I want it to echo out the currently playing number with some more info
__________________
Special effects <- KDE 4.2 Showing off
More KDE -> PINK KDE
Reply With Quote