Conky for Guayadeque

General discussions
Locked
soujaa
Posts: 1
Joined: Fri Apr 02, 2021 11:59 pm

Conky for Guayadeque

Post by soujaa »

Hi,
I just want a conky for guayadeque.
Thanks for your help
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Re: Conky for Guayadeque

Post by anonbeat »

Conky script is out of the scope of the program. You can search conky in the forum and will find many scripts done by others.

Thanks for your help
soujaa
Posts: 1
Joined: Fri Apr 02, 2021 11:59 pm

Re: Conky for Guayadeque ... in progress

Post by soujaa »

HI everybody.
Image
I search all around the forum and the web for a conky.
I've use a conky for clementine and make it run for guayadeque.
The conkyrc file

Code: Select all

###############################
###############################
###	Conky theme         ###
###	Guayadeque	    ###
###		            ###
###############################
###############################

alignment top_middle
background no

gap_x 510
gap_y 670
minimum_size 0 0
maximum_width 1366
 
own_window_colour 000000
own_window yes
own_window_class Conky
own_window_type desktop
own_window_transparent yes
own_window_argb_visual yes
#own_window_argb_value 0
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
draw_shades no


color0 006400
color1 FF0000
color2 FDDA24
default_bar_size 360 5


uppercase no
use_spacer none


override_utf8_locale yes
use_xft yes
xftfont Cantarell:size=12
xftalpha 1

double_buffer yes
update_interval 1.0


own_window_argb_value 0
TEXT
${voffset -4}${color1}${hr}${color}${if_running guayadeque}
${color0}${color2}${alignr}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep artist | cut -f2- -d" "}
${color1}${alignr}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep album | cut -f2- -d" "}
${color0}${alignr}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep title | cut -f2- -d" "}

${execbar sh /home/assoua/.conky/script_guaya}
${voffset 30}${color2}${hr}${else}
${color2}${voffset -4}${hr}${color}${endif}${font}
the script guayadeque

Code: Select all

#!/bin/bash
# Filename: guayadeque-progbar
# Author: robz
# Version: 290611
# Provide data to allow conky to draw a progress bar for Guayadeque.
# Something I noticed relevent to the preceding Rhythmbox script, is that it's
# not nesessary to check for a running instance of the music player, Conky
# already does that with the ${if_running} statment doh.

# Name of current album
album = commands.getoutput("mpc --format %artist%+%album% | head -n 1")

# If tags are empty, use noimg.
if album == "":
    if os.path.exists(conkycover):
        os.remove(conkycover)
    if os.path.exists(noimg):
        shutil.copy(noimg, conkycover)
    else:
        print "Image not found!"
else:

    filename = imgpath + album + ".jpg"
    if os.path.exists("/tmp/nowplaying") and os.path.exists("/tmp/cover"):
        nowplaying = open("/tmp/nowplaying").read()
        if nowplaying == album:
            pass
        else:
            copycover(album, filename, cover, noimg)
            open("/tmp/nowplaying", "w").write(album)
    else:
        copycover(album, filename, cover, noimg)
        open("/tmp/nowplaying", "w").write(album)



# Get song duration and position from "q/dbus" - this will be in milliseconds.
DUR=$(qdbus org.mpris.guayadeque /\Player org.freedesktop.MediaPlayer.GetMetadata | awk '/mtime/ {print $2}')
POS=$(dbus-send --print-reply --type=method_call --dest=org.mpris.guayadeque /\Player org.freedesktop.MediaPlayer.PositionGet | awk '/int32/ {print $2}')

echo $((100000*POS/DUR)) # Convert to percent.
As you see on the picture. I just have song information.
I want help for add album cover art and a progress bar.
I learn that this commande show the covert art

Code: Select all

qdbus org.mpris.guayadeque /\Player org.freedesktop.MediaPlayer.GetMetadata | grep arturl
But i really cant add it on the script for make it create a covert on my conky.
Any help would be much appreciated
Last edited by soujaa on Tue May 25, 2021 12:48 am, edited 1 time in total.
Locked