#!/bin/bash # amaroK info display script by eirc # # requirements: amaroK (!) case "$1" in # Now Playing Info artist) dcop amarok player artist ;; title) dcop amarok player title ;; album) dcop amarok player album ;; year) dcop amarok player year ;; genre) dcop amarok player genre ;; progress) curr=`dcop amarok player trackCurrentTime` tot=`dcop amarok player trackTotalTime` if (( $tot )); then expr $curr \* 100 / $tot fi ;; # Collection Info totalArtists) dcop amarok collection totalArtists ;; totalAlbums) dcop amarok collection totalAlbums ;; totalTracks) dcop amarok collection totalTracks ;; totalGenres) dcop amarok collection totalGenres ;; totalCompilations) dcop amarok collection totalCompilations ;; esac