You are not logged in.

#2541 2025-11-02 17:40:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,064

Re: Show us your conky

@loutch

Let's go back to my 'percentage' line:

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

Your last screenshot shows 01:55 on the left and 04:04 on the right.
If we convert to seconds, that's 115 seconds (60+55) on the left and 244 seconds (4x60+4) on the right.

It would look like this in my percentage line:

$ echo "scale=1;115*100/244 + 0.5" | bc | awk '{print int($1)}'
47

That's the correct result.

You know I can't test, but try adding "percentage" to the script:

...
		else
            percentage=$(echo "scale=1;$POS*100/$TOTAL + 0.5" | bc | awk '{print int($1)}')
            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 $percentage
	
#    echo $length 
#    echo $position 
#   echo $positionTime 
#    echo $lengthTime		

Last edited by marens (2025-11-02 18:24:50)


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

Offline

#2542 2025-11-02 19:00:55

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

Re: Show us your conky

Re
For my part, I took the opposite approach.
I took Bleys' conky and tinkered with it until it picked up Spotify  in progress  .

For now, I have everything except the cover art.

For that, I'm using Madh93's script.

All of this gives me the following result.

gAa0FgK9_t.png

I still don't understand how now.lua manages to make the exbar the right length.

Thanks again, I'll take a look at your part of the script.

@+

Last edited by loutch (2025-11-02 19:59:15)


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

#2543 2025-11-03 00:42:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,064

Re: Show us your conky

loutch wrote:

Thanks again, I'll take a look at your part of the script.

Let's first go back to your execbar here:
https://forums.bunsenlabs.org/viewtopic … 43#p146743

Replace:

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

with:

${if_match "${exec qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}'}" != "0"}\
${execbar 2,250 exec echo "scale=1;$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)*100/$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}') + 0.5" | bc | awk '{print int($1)}'}\
${else}${execbar 2,250 exec echo '0.05'}${endif}

I hope there are no typos.  smile

Last edited by marens (2025-11-03 03:12:00)


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

Offline

#2544 2025-11-03 09:42:16

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

Re: Show us your conky

Hello

Sorry don't work

this in console & this

uZ4UgrUs_t.png

sh: 1: Syntax error: end of file unexpected (expecting ")")
conky: reading exec value failed (perhaps it's not the correct format?)
sh: 1: Syntax error: end of file unexpected (expecting ")")
conky: reading exec value failed (perhaps it's not the correct format?)
sh: 1: Syntax error: end of file unexpected (expecting ")")
conky: reading exec value failed (perhaps it's not the correct format?)
sh: 1: Syntax error: end of file unexpected (expecting ")")
conky: reading exec value failed (perhaps it's not the correct format?)
............ect ...

without it's okay , no errors in terminal.


nXLkLYHt_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

#2545 2025-11-03 13:31:21

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,064

Re: Show us your conky

marens wrote:

I hope there are no typos.  smile

As expected.  big_smile


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

Offline

#2546 2025-11-03 14:22:30

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,064

Re: Show us your conky

Try in the terminal when conky is running (the song is playing):

echo "scale=1;$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)*100/$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}') + 0.5" | bc | awk '{print int($1)}'

It should be the percentage for the execbar.


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

Offline

#2547 2025-11-03 15:44:07

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

Re: Show us your conky

Re

work great in terminal & in conky .

Made a script & run it in conky with this command.

execbar 2,164 ~/.conky/conky-spotify/scripts/marens_bare.sh

7G8S51bV_t.png

HJv2AcBf_t.png

MANY TANKS


@+

Last edited by loutch (2025-11-03 16:20:29)


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

#2548 2025-11-03 18:34:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,064

Re: Show us your conky

^ Very nice, but not finished yet.

When the song doesn't play, then we have to divide by zero.
That's not possible.

We have to work around that in the script.

The script should look like this:

#!/bin/bash

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 [[ "$total" != "0" ]]; then

     percentage=$(echo "scale=1;$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Position)*100/$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata | grep "^mpris:length" | awk '{print $2}') + 0.5" | bc | awk '{print int($1)}')

     echo $percentage
      
   else
   
     echo '0.05'
      
fi

The command echo '0.05'  is a little trick to make the execbar work properly.  big_smile

EDIT

You know I can't test it, but this is also possible:

if [[ "$total" != "" ]]; then

Last edited by marens (2025-11-03 18:46:29)


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

Offline

#2549 2025-11-03 19:18:17

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

Re: Show us your conky

Re

Oki-doki.

@+


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

#2550 2025-11-04 10:10:52

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

Re: Show us your conky

Hello

This morning

BLKOvdca_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

#2551 2025-11-08 08:16:15

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

Re: Show us your conky

Hello

Conky-spotify

40qfGxup_t.png

Modified when there is advertising.

QlfW68N4_t.png

@+

Last edited by loutch (2025-11-08 08:18:39)


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

#2552 2025-11-15 01:48:54

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,980
Website

Re: Show us your conky

johnraff wrote:
MarkW wrote:

Someone needs to point quick screenshot to another image hosting service

Your frustration with the Imgur/UK situation is well understood.
But that "someone" would have to:

1) find a suitable replacement service with an API that accepts anonymous uploads
1a) check that no forum members have had issues with that service
2) write a new upload script to use it and put it in an upgraded bunsen-utilities
3) change the menu entry to use that script
4) push a bunsen-configs upgrade which invites users to import the new menu file

All this, while in the final stages of getting the new Carbon iso ready. roll

Meanwhile, all we can do right now is ask users to upload their screenshots to some other service than Imgur. Many people are already doing this.

...and hope that maybe the situation will resolve itself
...or fear that the same issue will come to affect all image upload services yikes

Just in case anyone missed it, the standard BL image upload utilities now use imgbb not imgur.
https://forums.bunsenlabs.org/viewtopic.php?id=9581


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#2553 2025-11-17 14:54:07

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

Re: Show us your conky

Hello guys

I need your help again.

Normally, to launch multiple Lua scripts, I use this:

require 'cairo'

function conky_loader_lua()
usrhome = os.getenv("HOME")
	
	dofile (usrhome ..".conky/Mimod-white/scripts/image.lua")
        dofile (usrhome ..".conky/Mimod-white/scripts/rings.lua

	    conky_main_post_ring_stats()
end

& in conky that

 lua_load = '$HOME/.conky/Mimod-white/scripts/loader.lua',
lua_draw_hook_pre = 'loader_lua',
 

So I did that, but it doesn't work.
I've racked my brains, but I can't figure it out.


Normaly in conky for just the image.lua

lua_load = '~/.conky/Mimod-white/scripts/image.lua',

& here the right think for Mimod-white

lua_load = '~/.conky/Mimod-white/scripts/rings.lua',
lua_draw_hook_post = 'ring_stats',

But nothing work .

i'm sure ther ie a little mess but i can't find it .

Many tanks .

@+

Edit

it's good i made 2 conky (first right conky Mimod & second for weather) & create any launcher for these .

#!/bin/bash

PROG_NAME1="conky -c /home/$USER/.conky/Mimod-white/Mimod-white.conf"	# Nom du programme à  démarrer/arrêter.
PROG_NAME2="conky -c /home/$USER/.conky/Mimod-white/Mimod-white1.conf" # Nom du programme à  démarrer/arrêter.

PROCESSPID1=$(pgrep -f /home/$USER/.conky/Mimod-white/Mimod-white.conf)	# Récupère le PID du processus.
PROCESSPID2=$(pgrep -f /home/$USER/.conky/Mimod-white/Mimod-white1.conf)	# Récupére le PID du processus.


if [[ "$PROCESSPID1" != ""  && "$PROCESSPID2" != "" ]]; then	# Si les deux processus existe alors on le(s) kill.
        kill $PROCESSPID1 && echo "Stop $PROG_NAME1 (PID: $PROCESSPID1)"
        kill $PROCESSPID2 && echo "Stop $PROG_NAME2 (PID: $PROCESSPID2)"
else	# Si aucun processus on démarre le programme.
        kill $PROCESSPID1 
        $PROG_NAME1 & 
        echo "Start $PROG_NAME1"
        kill $PROCESSPID2  
        $PROG_NAME2 & 
        echo "Start $PROG_NAME2"
        if [[ "$PROCESSPID1" == ""  || "$PROCESSPID2" == "" ]]; then	# Si un des processus n'existe pas alors on le(s) kill.
                kill $PROCESSPID1 && echo "Stop $PROG_NAME1 (PID: $PROCESSPID1)"
                kill $PROCESSPID2  && echo "Stop $PROG_NAME2 (PID: $PROCESSPID2)"
                echo "Il y a eu un souci au lancement tout a été coupé"
        fi
fi

@+

Last edited by loutch (2025-11-17 15:59:35)


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

#2554 2025-11-17 18:13:17

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

Re: Show us your conky

- le terminal envoie-t-il un message d'erreur?
- quelle version conky ?
- est Wayland dans le jeu ?

-----
- does the terminal issue an error message?
- which conky version?
-is wayland in the game?

Offline

#2555 2025-11-17 18:59:09

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

Re: Show us your conky

Re

terminal

conky -c $HOME/.conky/Mimod-white/Mimod-white.conf
conky: desktop window (c00044) is subwindow of root window (4b9)
conky: window type - normal
conky: drawing to created window (0x2c00002)
conky: drawing to double buffer
conky: llua_load: /home/romuald/.conky/Mimod-white/loader.lua:8: unfinished string near '".conky/Mimod-white/scripts/rings.lua'
conky: forked to background, pid is 3502707
romuald@RogStrix:~$ 
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value
conky: llua_do_call: function conky_loader_lua execution failed: attempt to call a nil value

version

conky -v
conky 1.19.6 compiled 2024-04-01 for Linux x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * IRC
  * Curl
  * RSS
  * ICal
  * iconv
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window
  * Mouse evenets

 Music detection:
  * Audacious
  * CMUS
  * MPD
  * MOC

 Default values:
  * Netdevice: eno1
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 256
  * Maximum text size: 16384
  * Size text buffer: 256

No wayland .

@+


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

#2556 2025-11-17 19:20:34

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

Re: Show us your conky

Re

Ich habe ein wenig am Lua-Launcher gearbeitet.

Jetzt habe ich keine Fehler mehr im Terminal.

Das Wettersymbol wird angezeigt, ebenso wie das Netzwerk-Skript, aber dieses funktioniert nicht.

jyXK09qV_t.png
----------------------------------------
Worked a little on the Lua launcher.

Now I no longer have any errors in the terminal.

The weather icon is displayed, as well as the network script, but the latter is not working.




@+


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

#2557 2025-11-17 20:10:15

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

Re: Show us your conky

terminal

conky: llua_load: /home/romuald/.conky/Mimod-white/loader.lua:8: unfinished string near '".conky/Mimod-white/scripts/rings.lua'

lua_loader

        dofile (usrhome ..".conky/Mimod-white/scripts/rings.lua

il manque

")

----
it is missing  big_smile

Offline

#2558 2025-11-17 20:47:25

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

Re: Show us your conky

Re

Oups ,

Same thing weather icons & network line are visible but this line don't work .

@+


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

#2559 2025-11-17 21:18:11

MarkW
Member
Registered: 2024-11-03
Posts: 370

Re: Show us your conky

loutch wrote:

Re

Ich habe ein wenig am Lua-Launcher gearbeitet.

Jetzt habe ich keine Fehler mehr im Terminal.

Das Wettersymbol wird angezeigt, ebenso wie das Netzwerk-Skript, aber dieses funktioniert nicht.

https://thumbs2.imgbox.com/f0/64/jyXK09qV_t.png
----------------------------------------
Worked a little on the Lua launcher.

Now I no longer have any errors in the terminal.

The weather icon is displayed, as well as the network script, but the latter is not working.




@+

Is this available in other languages?  Including my favourite language.

Offline

#2560 2025-11-18 07:22:36

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

Re: Show us your conky

loutch wrote:

Re

Ich habe ein wenig am Lua-Launcher gearbeitet.

Jetzt habe ich keine Fehler mehr im Terminal.

Das Wettersymbol wird angezeigt, ebenso wie das Netzwerk-Skript, aber dieses funktioniert nicht.

https://thumbs2.imgbox.com/f0/64/jyXK09qV_t.png
----------------------------------------
Worked a little on the Lua launcher.

Now I no longer have any errors in the terminal.

The weather icon is displayed, as well as the network script, but the latter is not working.




@+

Je ne vois pas ce qui ne va pas dans cette image...

----
I can't see what's wrong with the picture...

Offline

Board footer

Powered by FluxBB