You are not logged in.

#2521 2025-10-25 09:08:02

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Hello

Schade .


I had to enlarge my conky quote because Lao-Tzu makes great sentences

qUTpY8ng_t.png

@+

Last edited by loutch (2025-10-25 09:13:51)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2522 2025-10-26 11:02:20

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,734

Re: Show us your conky

loutch wrote:

Hello

Schade .


I had to enlarge my conky quote because Lao-Tzu makes great sentences

https://thumbs2.imgbox.com/82/31/qUTpY8ng_t.png

@+

Avec @olgmen, cela fonctionnerait (il n'a qu'un seul script lua au lieu de cinq).  big_smile

It would work with @olgmen (he only has one lua script instead of five).
RbhjKf9t.png

Offline

#2523 2025-10-28 16:40:36

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,734

Re: Show us your conky

unklar wrote:
marens wrote:

@unklar

It looks nice.

Check the bottom outer line.
There is no empty space between the image and the outer line.  cool

I know that there has never been empty space. Not even in 2017. And I don't know why.  tongue


Sorry, I only now fully understood that.  yikes
I made 1600x800 instead of 887 because the font bothers me. wink

Offline

#2524 2025-10-28 17:54:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

^ You probably found a new girlfriend and fell in love again.
I hope your wife isn't reading this.  big_smile


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2525 2025-10-28 18:20:55

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Hello

Conky spotify look like my old mageia 5 audacious skin .

Original from Madh93 here:

https://github.com/Madh93/conky-spotify … /README.md


For the moment work great just ad convert to have a real png cover album because i'm using a lua script .

p1WjeXYw_t.png



@+

Last edited by loutch (2025-10-28 20:09:04)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2526 2025-11-01 10:19:10

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Hello

Well, friends, I would like to add to my conky-spotify

the position
a progress bar
the total duration
of the track being played
as on my conky audacious

I found this, but it gives me a strange figure for the total duration of this track: 3:21, i have 201866000

echo `dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "length"|egrep -v "length"|egrep -v "array"|cut -b 43-|cut -d '"' -f 1|egrep -v ^$` > $HOME/.conky/conky-spotify/duree   

Here that must be look like this (it's a fake)

qOw4BAgJ_t.png

Many tanks .

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2527 2025-11-01 13:04:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2528 2025-11-01 15:43:02

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Re

tanks but do not work by me just that & many errors in conky

7587rJle_t.png

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2529 2025-11-01 16:24:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

You're only interested in this part:
https://gist.github.com/rdschmidt/8c04a … e-mpris-sh

I don't have the dependencies installed (urlencode, qdbus) and I can't help you, but first you need to define the player (line 8).

For example:

Player="audacious"

I think you already have this part (artist, title, cover) and you can remove it:

	TEMP=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "artist:")
	artist=${TEMP##*:}
	TEMP=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "title:")
	title=${TEMP##*:}
	COVER=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "artUrl:")
    str="'"

    
        if [ -n "$COVER" -a $position -ge 1 ]; then
            if [ "$Player" == "vlc" ]; then 
                uri=$(urlencode -d "$COVER")
                COVER=${uri#*//}
                convert "$COVER" '/tmp/tmp.png'
            else
                convert "${COVER#*//}" '/tmp/tmp.png'
            fi
        fi

Good luck!


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2530 2025-11-01 17:21:09

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Re

Tanks for helping .

I don't use any player , it's spotify application .

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2531 2025-11-01 18:28:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

^ Replace "audacious" with "spotify" and try adding mpris.sh  to conky-spotify/scripts:

#!/bin/bash

Player="spotify"

if [ $(ps -C $Player -o pid=) ]; then
convertsec() 
	{
	    x=`expr $1 / 1000000`
	    s=`expr $x % 60`
	    x=`expr $x / 60`
	    m=`expr $x % 60`
	    printf "%02d:%02d\n" $m $s
	}

	POS=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)
	TOTAL=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}')

		if [ -z $TOTAL ]
		then
                       positionTime="00:00"
                       lengthTime="00:00"
		       length="stopped"	
		       position=1		
		else
                       positionTime=$(convertsec $POS)
                       lengthTime=$(convertsec $TOTAL)
		       length=$(($TOTAL/1000000))
		       position=$(($POS/1000000))
		fi
		
	vol=$(qdbus org.mpris.MediaPlayer2.$Player /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Volume)	
        echo $length";"$position";"$artist";"$title";"$positionTime";"$lengthTime";"$vol       

fi

exit 0

1) Run conky-spotify
2) Terminal (once):

$ bash $OME/path/to/script/mpris.sh

Do you have everything you need?

Last edited by marens (2025-11-01 19:08:00)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2532 2025-11-01 19:58:48

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Re

I found something that works  almost the same as yours.

conkyrc

${voffset -24}${font :size=10}
${alignc}SPOTIFY ${execi 1  ~/.conky/conky-spotify/scripts/cover.sh} $font ${voffset -2}
${goto 15}${exec ~/.conky/conky-spotify/scripts/position.sh}  ${goto 300}${color ffffff}${exec ~/.conky/conky-spotify/scripts/duree.sh}\
${goto 42}${voffset 2}${color ffffff}${execbar 2, 250 expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds)}

${if_match "${execi 2 sed -n '1p' $HOME/.conky/conky-spotify/current/current.txt}" == ""}${lua fDrawImage ~/.conky/conky-spotify/pub1.png 20 30 90 90}
${else}${lua fDrawImage ~/.conky/conky-spotify/current/current.png 20 30 90 90}${endif}
${voffset 6}${font :size=10}
${alignc -20}${exec ~/.conky/conky-spotify/scripts/artist.sh}$font
${voffset 10}
${alignc}${exec ~/.conky/conky-spotify/scripts/album.sh}
${alignc}${exec ~/.conky/conky-spotify/scripts/title.sh | fmt -w 100 | sed -n '1p'}
${alignc}${exec ~/.conky/conky-spotify/scripts/title.sh | fmt -w 100 | sed -n '2p'}

${lua fDrawImage ~/.conky/RadioTray_NG/images/tahoe/prev.png  130 45 28 28}
${lua fDrawImage ~/.conky/RadioTray_NG/images/tahoe/pause.png 160 45 28 28}
${lua fDrawImage ~/.conky/RadioTray_NG/images/tahoe/play.png  190 45 28 28}
${lua fDrawImage ~/.conky/RadioTray_NG/images/tahoe/next.png  220 45 28 28}

position.sh

#!/bin/bash

convertsec() 
	{
	    x=`expr $1 / 1000000`
	    s=`expr $x % 60`
	    x=`expr $x / 60`
	    m=`expr $x % 60`
	    printf "%02d:%02d\n" $m $s
	}

	POS=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)
	TOTAL=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}')

		if [ -z $TOTAL ]
		then
            positionTime="00:00"
            lengthTime="00:00"
			length="stopped"	
			position=1		
		else
            positionTime=$(convertsec $POS)
            lengthTime=$(convertsec $TOTAL)
			length=$(($TOTAL/1000000))
			position=$(($POS/1000000))
		fi

vol=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Volume)	
   echo $positionTime 

duree.sh

#!/bin/bash

convertsec() 
	{
	    x=`expr $1 / 1000000`
	    s=`expr $x % 60`
	    x=`expr $x / 60`
	    m=`expr $x % 60`
	    printf "%02d:%02d\n" $m $s
	}

	POS=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)
	TOTAL=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}')

		if [ -z $TOTAL ]
		then
            positionTime="00:00"
            lengthTime="00:00"
			length="stopped"	
			position=1		
		else
            positionTime=$(convertsec $POS)
            lengthTime=$(convertsec $TOTAL)
			length=$(($TOTAL/1000000))
			position=$(($POS/1000000))
		fi

vol=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Volume)	
    echo $lengthTime  

give this

b66Oy1ZD_t.png

All I have to do now is figure out how to do the bar.

4zteSZ1C_t.png

@+

Last edited by loutch (2025-11-01 20:11:58)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2533 2025-11-01 23:24:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

loutch wrote:

All I have to do now is figure out how to do the bar.

We've already done something similar.

Start here:
https://forums.bunsenlabs.org/viewtopic … 28#p144528

This is the end:
https://forums.bunsenlabs.org/viewtopic … 90#p144590

If you read all the posts in between, I think you will find the solution easily.

Last edited by marens (2025-11-02 01:00:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2534 2025-11-02 12:28:02

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,734

Re: Show us your conky

In Debian 13, the packages to be installed are:
gridsite-clients qdbus-qt5 (there is no/ longer gridsite-client and qdbus)
lua5.1 must also be installed for fDrawImage.

There is a syntax error in mpris.sh. At least that's what the terminal tells me.
It should be right here:

Player=$audacious

if [ $(ps -C $Player -o pid=) ]; then  <===
convertsec() 

man ps is so extensive and I don't understand which argument has to be placed after ...pid=....
This gives me the same image as @loutch:  https://forums.bunsenlabs.org/viewtopic … 38#p146738

The pid itself from the player is set in /tmp. What's missing is tmp.png.

@marens, can you take a look at the pid?  wink

Offline

#2535 2025-11-02 13:14:00

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

I'm sorry, @unklar.

I saw that script when I was making a radiotray-ng.
I never tried to use it.

@rdschmidt (Bleys) is a member of the Linux Mint forums.
Here is that thread:
https://forums.linuxmint.com/viewtopic.php?t=414132

@loutch has an account there.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2536 2025-11-02 13:22:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

@loutch

This line is wrong:

${goto 42}${voffset 2}${color ffffff}${execbar 2, 250 expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds)}

The audtool command is for audacious.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2537 2025-11-02 13:44:43

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Re

I know is just to have any line in conky .

Well, I have a start. My bar works up to 1 minute 40 seconds, which is equivalent to 100 seconds.

So now I just need to figure out how to divide the total value of seconds so that it stays within the range of 0 to 100.

25s

IdzBaIm2_t.png

52s

lFZ7OoGY_t.png

1:55 mn nothing

H0Bj1U3d_t.png

@+

Last edited by loutch (2025-11-02 14:05:21)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2538 2025-11-02 14:32:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 952

Re: Show us your conky

^ Look at the 'percentage' line here:
https://forums.bunsenlabs.org/viewtopic … 56#p144556

percentage=$(echo "scale=1;$current*100/15 + 0.5" | bc | awk '{print int($1)}')

I multiplied $current*100, then divided by the maximum value (15).
Then I round the result with awk.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2539 2025-11-02 14:48:30

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,734

Re: Show us your conky

marens wrote:

I'm sorry, @unklar.

I saw that script when I was making a radiotray-ng.
I never tried to use it.

@rdschmidt (Bleys) is a member of the Linux Mint forums.
Here is that thread:
https://forums.linuxmint.com/viewtopic.php?t=414132

WOW!
Thank you very much for this link.
It broadens my horizons regarding audacious.  big_smile

Thank you!

Offline

#2540 2025-11-02 14:56:01

loutch
Member
Registered: 2015-12-12
Posts: 929

Re: Show us your conky

Re

i found something in this script


#!/bin/bash

convertsec() 
	{
	    x=`expr $1 / 1000000`
	    s=`expr $x % 60`
	    x=`expr $x / 60`
	    m=`expr $x % 60`
	    printf "%02d:%02d\n" $m $s
	}

	  POS=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)
	TOTAL=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}')

		if [ -z $TOTAL ]
		then
            positionTime="00:00"
            lengthTime="00:00"
			length="stopped"	
			position=1		
		else
            positionTime=$(convertsec $POS)
            lengthTime=$(convertsec $TOTAL)
			length=$(($TOTAL/1000000))
			position=$(($POS/1000000))  #  ←←←←←← here  
		fi

vol=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Volume)	
#    echo $length 
    echo $position 
#   echo $positionTime 
#    echo $lengthTime  

I think this is where i need to find the formula for this value to remain below 100.











@+

Last edited by loutch (2025-11-02 15:28:27)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

Board footer

Powered by FluxBB