logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#26 19-07-2014 09:07:40

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Pour le tilde aucun soucis ça passe je m'en sert partout dans mes conky d’où la modification du $home pour avoir les mêmes liens partout et éviter les erreurs

et pour le exec avec ou sans le résultat est le même :s

Quand a télécharger les pochettes cd je trouve cela dommage vu qu'elles sont déjà sur le pc a la limite je préfère créer un script qui contiendrai l’équivalent des noms des pochettes album/nom-aleatoire mais le nombre de variables / condition serai lourd pour un conky

Dernière modification par dumber (19-07-2014 09:21:32)

Hors ligne

#27 19-07-2014 09:32:15

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

Tiens ! Je viens de voir que tu peux faire comme moi avec Clementine : utiliser DBus et MPRIS.  smile
http://ubuntuforums.org/showthread.php?t=2221576

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#28 19-07-2014 09:39:30

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

paskal a écrit :

Tiens ! Je viens de voir que tu peux faire comme moi avec Clementine : utiliser DBus et MPRIS.  smile
http://ubuntuforums.org/showthread.php?t=2221576




oui exactement ce qu'il me faut restera plus qu'a me battre pour comprendre comment le mettre en place tongue merci smile

Pour le moment je comprend rien a la chose mdr je regarderai ce soir

Dernière modification par dumber (19-07-2014 09:46:51)

Hors ligne

#29 19-07-2014 09:53:00

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

Ça ne devrait pas être trop différent de https://debian-facile.org/utilisateurs: … clementine  smile

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#30 19-07-2014 10:09:21

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

fonctionne pas -_-" et comme je code pas du tout en python

#!/usr/bin/env python2
#-*- coding: utf-8 -*-
#
# anowplaying.py mod paskal
#
# Connects to dbus and retrieves
# information about the currently
# playing track in amarok.
#
 
import dbus, optparse, shutil, commands
 
if __name__ == '__main__':
    '''Check if clementine is running'''
    output = commands.getoutput('ps -A')
    if 'rhythmbox' not in output:
        raise SystemExit
 
    '''Get system bus'''
    bus = dbus.SessionBus()
    amarok = bus.get_object('org.mpris.rhythmbox', '/Player')
    #print ("Introspection data:\n")
    #print amarok.Introspect()
    #print "\nSatut:\n"
 
    amstat = amarok.GetStatus()
    #print amstat[0]
    amarokdict = amarok.GetMetadata()
 
    '''Set up the command line parser'''
    usage = 'usage: %prog [options]'
    parser = optparse.OptionParser(usage=usage)
    parser.add_option('-a', '--artist', action='store_true', help='artist name')
    parser.add_option('-t', '--title', action='store_true', help='title of the track')
    parser.add_option('-l', '--album', action='store_true', help='album name')
    parser.add_option('-g', '--genre', action='store_true', help='genre of the current track')
    parser.add_option('-y', '--year', action='store_true', help='year of the track')
    parser.add_option('-m', '--mtime', action='store_true', help='time of the track')
    parser.add_option('-r', '--rtime', action='store_true', help='remaining time for the track')
    parser.add_option('-e', '--etime', action='store_true', help='elapsed time for the track')
    parser.add_option('-p', '--progress', action='store_true', help='progress of the track')
    parser.add_option('-n', '--track', action='store_true', help='track number')
    parser.add_option('-b', '--bitrate', action='store_true', help='bitrate of the track')
    parser.add_option('-s', '--sample', action='store_true', help='sample rate of the track')
    parser.add_option('-c', '--cover', metavar='filename', help='copy cover art to destination file')
    parser.add_option('-z', '--status', action='store_true', help='player status')
 
    '''Get the parser options printed'''
    (opts, args) = parser.parse_args()
    if opts.artist and amarokdict.has_key('artist') :
        print amarokdict['artist']
    if opts.title and amarokdict.has_key('title'):
        print amarokdict['title']
    if opts.album and amarokdict.has_key('album'):
        print amarokdict['album']
    if opts.genre and amarokdict.has_key('genre'):
        print amarokdict['genre']
    if opts.year and amarokdict.has_key('year'):
        print amarokdict['year']
    if opts.track and amarokdict.has_key('tracknumber'):
        print amarokdict['tracknumber']
    if opts.bitrate and amarokdict.has_key('audio-bitrate'):
        print amarokdict['audio-bitrate']
    if opts.sample :
        print amarokdict['audio-samplerate']
    if opts.status :
        if amstat[0]==2:
        print 'arrêté'
        elif amstat[0]==1:
            print 'en pause'
        else:
            print ""
 
    '''Manage time stuff'''
    cpos = mt = mtime = etime = rtime = progress = None
    if (opts.etime or opts.rtime or opts.mtime or opts.progress) and amarokdict.has_key('mtime'):
        cpos = amarok.PositionGet()/1000
        mt = amarokdict['mtime']/1000
        mtime = str(mt/60)+":"+str(mt%60) if mt%60>9 else str(mt/60)+":0"+str(mt%60)
        etime = str(cpos/60)+":"+str(cpos%60) if cpos%60>9 else str(cpos/60)+":0"+str(cpos%60)
        rtime = str((mt-cpos)/60)+":"+str((mt-cpos)%60) if (mt-cpos)%60>9 else str((mt-cpos)/60)+":0"+str((mt-cpos)%60)
        progress= float(cpos)/float(mt)*100
    if opts.etime and etime is not None:
        print etime
    if opts.rtime and rtime is not None:
        print rtime
    if opts.mtime and mtime is not None:
        print mtime
    if opts.progress and progress is not None:
        print progress
 
    if opts.cover :
        cover = amarokdict['arturl']
        if cover != "" :
            try :
                shutil.copyfile(cover.replace('file://', ''), opts.cover)
                print ""
            except Exception, e:
                print e
                print ""
        else :
            print ""
 



dumber@Nery-PCB:~/.conky/scripts$ ./rythmbox.py
Traceback (most recent call last):
  File "./rythmbox.py", line 21, in <module>
    amarok = bus.get_object('org.mpris.rhythmbox', '/Player')
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.rhythmbox was not provided by any .service files
dumber@Nery-PCB:~/.conky/scripts$
 

Hors ligne

#31 19-07-2014 10:37:57

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

Pour la fonction get_object, essaye plutôt

bus.get_object("org.mpris.MediaPlayer2.rhythmbox", "/org/mpris/MediaPlayer2")

Mais, en relisant, j'ai peur que le reste ne soit pas transposable directement non plus.
Dans ce cas, il vaudrait mieux repartir du lien du post #17 avec ce bout de code :

sb = dbus.SessionBus()

rb_obj = sb.get_object("org.mpris.MediaPlayer2.rhythmbox", "/org/mpris/MediaPlayer2")

props_int = dbus.Interface(rb_obj, "org.freedesktop.DBus.Properties")

rb_meta_dict = props_int.Get("org.mpris.MediaPlayer2.Player", "Metadata")

title = rb_meta_dict["xesam:title"]
artists = ", ".join(rb_meta_dict["xesam:artist"]) # track can have more than one artist apparently
album = rb_meta_dict["xesam:album"]
cover_art_url = meta_dict["mpris:artUrl"]


I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#32 19-07-2014 11:17:32

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

J'ai oublié de te demander : tu avais épluché cet énorme fil Conky Rhythmbox Python Script (572 posts, tout de même !) ?

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#33 19-07-2014 19:35:48

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

non pas les 572 post je suis deja pas tres doué en anglais alors je pense qu'une fois arrivé au post 10 j'aurai oublié le premier mdr

juste pour un soucis de pochette mdr

Dernière modification par dumber (19-07-2014 19:42:26)

Hors ligne

#34 19-07-2014 20:28:42

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Pour revenir au calendrier (googlecalendard) j'ai ce petit soucis qui bloque mes mises a jours

conkygooglecalendar : Dépend: conkykeyring mais il n'est pas installable

et si je desinstall conkygooglecalendar => plus de calendrier

Hors ligne

#35 19-07-2014 20:31:02

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

conkykeyring n'est pas dans les dépôts Debian.

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#36 19-07-2014 20:39:49

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

donc pour debloquer ca va falloir que j'aille le chercher ailleur je suppose

Hors ligne

#37 19-07-2014 20:55:13

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

hmm, sur Ubuntu AMHA.

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#38 19-07-2014 21:09:00

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

ouep j'ai trouvé mon bonheur ici

Bon retour a la baston avec la pochete cd mdr

Sinon petit bug d'affichage a l'actualisation du conky depuis que j'ai changé de fond d'ecran

bugconky.png

A savoir que l'image qu'on retrouve en fond de conky c'est mon ancien fond d'ecran mais aussi l'image de login (login session)

une idée d'ou cela pourrai provenir ?

Dernière modification par dumber (19-07-2014 23:10:36)

Hors ligne

#39 20-07-2014 10:07:34

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

dumber a écrit :

une idée d'ou cela pourrai provenir ?

Tu as regardé le wiki ?
J'avais testé la transparence sur Xfce.  smile


I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#40 20-07-2014 10:53:55

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Non ou alors il y a longtemps quand j'ai fait mon premier sous gnomeshell mais la dans le wiki j'y ai pas vu d'indication spécifique a xfce

ai essayer avec

own_window_argb_visual yes
own_window_argb_value 50



a la place de

own_window_transparent yes



c'est encor pire y a plus du tout de transparence

Dernière modification par dumber (20-07-2014 11:05:19)

Hors ligne

#41 20-07-2014 11:34:59

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

Peux-tu essayer, après avoir activé le compositeur dans Peaufinage des fenêtres, celui-ci :

alignment top_right
background no
border_width 1
color0 607991
color1 7FA4C7
cpu_avg_samples 2
default_bar_size 0 5
default_color B4D1ED
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
extra_newline no
gap_x 25
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 100

show_graph_range no
show_graph_scale no
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer left
use_xft yes
xftfont Trebuchet MS:size=12

TEXT
Frequency: $alignr${freq}MHz
${color0}$stippled_hr
${color}CPU: $alignr$cpu%
${color1}${cpubar}
${color}RAM: $mem/$memmax $alignr$memperc%
${color1}${membar}
${color}Swap: $swap/$swapmax $alignr$swapperc%
${color1}${swapbar}
${color0}$stippled_hr
${color}File systems:
/ ${fs_used /}/${fs_size /} $alignr${fs_used_perc /}%
${color1}${fs_bar /}
${color}/home ${fs_used /home}/${fs_size /home} $alignr${fs_used_perc /home}%
${color1}${fs_bar /home}
${color0}$stippled_hr
${color}Networking:
Up: ${upspeed eth0} $alignr Down: ${downspeed eth0}
${color0}$stippled_hr
 


I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#42 20-07-2014 11:58:45

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Merci j'ai trouvé la solution dans ton conky mon probleme venais de ses lignes la

own_window yes
own_window_transparent yes
#own_window_type override
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 100

show_graph_range no
show_graph_scale no
 

Hors ligne

#43 20-07-2014 11:58:59

unit
Membre
Lieu : Dans le grand nord
Distrib. : Bullseye
Noyau : Linux debian 5.10.0-10-amd64
(G)UI : Xfce 4.16.2
Inscription : 11-03-2010

Re : Mise au point d'un Conky

Héllo il me sembke que paskal a raison cela est dû à un problème de transparence, je suis sur xfce 4.8.
Je te mets mon conky si ça peut aider :

XFCE
alignment top_left
background yes
border_width 1
cpu_avg_samples 2
default_color 3399CC
default_outline_color white
default_shade_color 111
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 15
gap_y 40
net_avg_samples 5
no_buffers yes
out_to_console no
own_window yes
own_window_argb_value 100
own_window_argb_visual yes
own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type desktop
show_graph_range no
show_graph_scale no
short_units yes
stippled_borders 10
update_interval 1
uppercase no
use_spacer none
use_xft yes
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=8


Exige beaucoup de toi-même et attends peu des autres. Ainsi beaucoup d'ennuis te seront épargnés.
Confucius.

Hors ligne

#44 20-07-2014 12:08:33

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Merci Unit smile j'ai réussis a régler ce soucis

J'en reviens a mon soucis de pochettes CD

J'ai trouver le moyens de les avoir via

${exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artUrl"|egrep -v "artUrl"|egrep -v "array"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$}



Mais ca m'affiche que le liens de la pochette chose normal et le mettre comme ca


${image ${exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artUrl"|egrep -v "artUrl"|egrep -v "array"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$}}


ne fonctionne pas

j'ai donc tenté ma chance avec un scrip bash pour copier le fichier et lui donner un nom unique avec

#!/bin/bash

fichier=$(exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artUrl"|egrep -v "artUrl"|egrep -v "array"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$)
echo $fichier


cp "$fichier" "~/.conky/scripts/conky_cover.jpg"
 



mais tout ce a quoi j'ai le droit c'est

dumber@Nery-PCB:~/.conky/scripts$ ./rythmbox.sh
file:///home/dumber/.cache/rhythmbox/album-art/00000965
cp: impossible d'évaluer « file:///home/dumber/.cache/rhythmbox/album-art/00000965.jpg »: Aucun fichier ou dossier de ce type
dumber@Nery-PCB:~/.conky/scripts$
 



et même en ajoutant l’extension du fichier image ...

Hors ligne

#45 20-07-2014 12:54:07

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

00000965.jpg est bien présent ?

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#46 20-07-2014 13:02:10

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

00000965.jpeg oui

Hors ligne

#47 20-07-2014 13:04:09

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

alors, c'est le file:/// qui affole cp.  sad

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#48 20-07-2014 13:09:28

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

Oui on dirai, en manuel sans ca passe,  tu sais comment l'enlever du lien ?

Hors ligne

#49 20-07-2014 13:11:23

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Mise au point d'un Conky

Je ne peux pas tester, là, mais c'est à la fin de la ligne exec avec les cut qu'il faut arranger.

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#50 20-07-2014 13:22:59

dumber
Membre
Distrib. : Debian 12 (Stretch)(I5 6300-16GoDDR3-Gforce GT740)
Noyau : Linux 6.1.0-9-amd64
(G)UI : Xfce 4.18
Inscription : 11-04-2014

Re : Mise au point d'un Conky

donc changement du script

#!/bin/bash

fichier=$(exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artUrl"|egrep -v "artUrl"|egrep -v "array"|cut -b 51-|cut -d '"' -f 1|egrep -v ^$)
echo $fichier

if test -s "$fichier"
then
  ln -sf "$fichier" "~/home/dumber/.conky/scripts/conky_cover.jpeg"

else
  if test -s "~/home/dumber/.conky/scripts/conky_cover.jpeg"
  then
    rm "~/home/dumber/.conky/scripts/conky_cover.jpeg"
  fi
fi



resultat le lien est bon mais le lien se fait pas

dumber@Nery-PCB:~/.conky/scripts$ ./rythmbox.sh
/home/dumber/.cache/rhythmbox/album-art/000006f9
ln: impossible de créer le lien symbolique « ~/home/dumber/.conky/scripts/conky_cover.jpeg »: Aucun fichier ou dossier de ce type
dumber@Nery-PCB:~/.conky/scripts$

Hors ligne

Pied de page des forums