SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-02-08 20:42:50

chameleon
UK #! Guy
From: Luxembourg
Registered: 2009-01-13
Posts: 719
Website

[Solved] Conky script formatting

#!/bin/bash
    #pulling info from loung-radio.com for conky by nlinedesignz(at)web(dot)de 2013
     
    wget http://www.lounge-radio.com/code/pushed_files/now.html -O ~/loungeradio.html >/dev/null 2>&1 &&
     
    artist=$(awk '/id="artist"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
    album=$(awk '/id="album"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
    track=$(awk '/id="track"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
     
    wget "http://www.lounge-radio.com/code/pushed_files/$(awk '/id="covercontainer"/{print}' ~/loungeradio.html | sed -r 's/.*src="(.*)" width=.*/\1/')" -O ~/loungeradio.jpg >/dev/null 2>&1 &&
     
    #echo '${image ~/loungeradio.jpg -p 42,42 -s 123x123 }';
    echo 'Artist:' $artist
    echo 'Track:'  $track
    echo 'Album:'  $album
     
    exit

Last edited by chameleon (2014-02-08 22:01:16)

Offline

Help fund CrunchBang, donate to the project!

#2 2014-02-08 21:15:57

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: [Solved] Conky script formatting

Last edited by mrpeachy (2014-02-08 21:16:15)

Offline

#3 2014-02-08 21:35:43

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

Re: [Solved] Conky script formatting

Instead of

echo 'Artist:' $artist
    echo 'Track:'  $track
    echo 'Album:'  $album

use this

echo 'Artist:' $artist|sed 's/\r//g'
    echo 'Track:'  $track|sed 's/\r//g'
    echo 'Album:'  $album|sed 's/\r//g'

These boxes are windows' new lines.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#4 2014-02-08 22:00:38

chameleon
UK #! Guy
From: Luxembourg
Registered: 2009-01-13
Posts: 719
Website

Re: [Solved] Conky script formatting

Last edited by chameleon (2014-02-08 22:04:29)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo