Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Il ritrovo della comunità dove confrontarsi e discutere sulle notizie dal mondo dell'informatica, di Ubuntu e di tutto quello che la riguarda, novità, pettegolezzi e quant'altro.
Avatar utente
Smilzo.Domenico
Prode Principiante
Messaggi: 173
Iscrizione: martedì 23 settembre 2008, 11:14

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Smilzo.Domenico »

[img width=221 height=600]http://osarena.net/wp-content/uploads/2 ... ot-151.png[/img]
ha gli anelli piu'piccoli e mi piace parecchio l'orologio con gli anelli che si colorano in base alla posizione delle lancette  ;D
Questo ha incasinato la mia (rotfl)
ubuntu 11.04 - lasciamo correre..
Avatar utente
Lo Zio
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1819
Iscrizione: mercoledì 16 settembre 2009, 23:51
Desktop: xfce / kde-plasma
Distribuzione: Debian 12 (bookworm) x86_64
Sesso: Maschile
Località: Torino
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Lo Zio »

Smilzo.Domenico ha scritto: Questo ha incasinato la mia (rotfl)
ottimo!  (b2b)
--> * Indice Wiki * Photoshop su Wine * Cerca su Ubuntu.it *

......ti accorgi che fa caldo quando dai come input "sudo" e il terminale ti da come output "Anche io"
Avatar utente
TUX5+0
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1115
Iscrizione: domenica 7 febbraio 2010, 17:54
Desktop: Ubuntu
Distribuzione: Ubuntu 18.10 64 bit
Località: ai confini della realtà
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da TUX5+0 »

Smilzo.Domenico ha scritto:
[img width=221 height=600]http://osarena.net/wp-content/uploads/2 ... ot-151.png[/img]
ha gli anelli piu'piccoli e mi piace parecchio l'orologio con gli anelli che si colorano in base alla posizione delle lancette  
Questo ha incasinato la mia
Caspita ma hai -1 grado DOVE ??
https://www.youtube.com/watch?v=PN6puH9DYnQ
Meglio essere protagonisti della propria tragedia che spettatori della propria vita .Quando l'ultima fiamma sarà spenta, l'ultimo fiume avvelenato, l'ultimo pesce catturato, allora capirete che non si può mangiare denaro.
Avatar utente
Smilzo.Domenico
Prode Principiante
Messaggi: 173
Iscrizione: martedì 23 settembre 2008, 11:14

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Smilzo.Domenico »

LoSquartatore ha scritto:
Smilzo.Domenico ha scritto:
[img width=221 height=600]http://osarena.net/wp-content/uploads/2 ... ot-151.png[/img]
ha gli anelli piu'piccoli e mi piace parecchio l'orologio con gli anelli che si colorano in base alla posizione delle lancette  
Questo ha incasinato la mia
Caspita ma hai -1 grado DOVE ??
Credo in russia, guarda il cirillico nella data  (yes)
ubuntu 11.04 - lasciamo correre..
Avatar utente
MI|RO
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 378
Iscrizione: lunedì 3 dicembre 2007, 13:48
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da MI|RO »

Ho un problema con il conky, precisamente conkybanshee non mi indica tutte le info delle tracce audio, a parte il fatto che la posizione sul conky è sballato, non so che fare Faccio il noob "Aiuutooooooooooooooooo":
Immagine
Edit: Risolto cverconky.

Ecco l'output di conkyBanshee.py:

Codice: Seleziona tutto

#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# conkyBanshee.py is a simple python script to gather 
# details of from Banshee for use in conky.
#
#  Author: Kaivalagi
# Created: 26/07/2009

from datetime import datetime
from optparse import OptionParser
import sys
import traceback
import codecs
import os
import shutil

try:
    import dbus
    DBUS_AVAIL = True
except ImportError:
    # Dummy D-Bus library
    class _Connection:
        get_object = lambda *a: object()
    class _Interface:
        __init__ = lambda *a: None
        ListNames = lambda *a: []
    class Dummy: pass
    dbus = Dummy()
    dbus.Interface = _Interface
    dbus.service = Dummy()
    dbus.service.method = lambda *a: lambda f: f
    dbus.service.Object = object
    dbus.SessionBus = _Connection
    DBUS_AVAIL = False


class CommandLineParser:

    parser = None

    def __init__(self):

        self.parser = OptionParser()
        self.parser.add_option("-t", "--template", dest="template", type="string", metavar="FILE", help=u"define a template file to generate output in one call. A displayable item in the file is in the form [--datatype=TI]. The following are possible options within each item: --datatype,--ratingchar. Note that the short forms of the options are not currently supported! None of these options are applicable at command line when using templates.")
        self.parser.add_option("-d", "--datatype", dest="datatype", default="TI", type="string", metavar="DATATYPE", help=u"[default: %default] The data type options are: ST (status), CA (coverart), TI (title), AL (album), AR (artist), GE (genre), YR (year), TN (track number), FN (file name), BR (bitrate k/s), LE (length), PP (current position in percent), PT (current position in time), VO (volume), RT (rating). Not applicable at command line when using templates.")
        self.parser.add_option("-c", "--coverartpath", dest="coverartpath", default="/tmp/cover", type="string", metavar="PATH", help=u"[default: %default] The file where coverart gets copied to if found when using the --datatype=CA option. Note that if set to an empty string i.e. \"\" the original file path is provided for the coverart path.")
        self.parser.add_option("-r", "--ratingchar", dest="ratingchar", default="*", type="string", metavar="CHAR", help=u"[default: %default] The output character for the ratings scale. Command line option overridden if used in templates.")
        self.parser.add_option("-s", "--statustext", dest="statustext", default="Playing,Paused,Stopped", type="string", metavar="TEXT", help=u"[default: %default] The text must be comma delimited in the form 'A,B,C'. Command line option overridden if used in templates.")
        self.parser.add_option("-n", "--nounknownoutput", dest="nounknownoutput", default=False, action="store_true", help=u"Turn off unknown output such as \"Unknown\" for title and \"0:00\" for length. Command line option overridden if used in templates.")
        self.parser.add_option("-S", "--secondsoutput", dest="secondsoutput", default=False, action="store_true", help=u"Force all position and length output to be in seconds only.")
        self.parser.add_option("-m", "--maxlength", dest="maxlength", default="0", type="int", metavar="LENGTH", help=u"[default: %default] Define the maximum length of any datatypes output, if truncated the output ends in \"...\"")
        self.parser.add_option("-v", "--verbose", dest="verbose", default=False, action="store_true", help=u"Request verbose output, not a good idea when running through conky!")
        self.parser.add_option("-V", "--version", dest="version", default=False, action="store_true", help=u"Displays the version of the script.")
        self.parser.add_option("--errorlogfile", dest="errorlogfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends errors to the filepath.")
        self.parser.add_option("--infologfile", dest="infologfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends info to the filepath.")                

    def parse_args(self):
        (options, args) = self.parser.parse_args()
        return (options, args)

    def print_help(self):
        return self.parser.print_help()

class MusicData:
    def __init__(self,status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume):
        self.status = status
        self.coverart = coverart
        self.title = title
        self.album = album
        self.length = length
        self.artist = artist
        self.tracknumber = tracknumber
        self.genre = genre
        self.year = year
        self.filename = filename
        self.bitrate = bitrate
        self.current_position_percent = current_position_percent
        self.current_position = current_position
        self.rating = rating
        self.volume = volume
        
class BansheeInfo:
    
    error = u""
    musicData = None
    
    def __init__(self, options):
        self.options = options
        
    def testDBus(self, bus, interface):
        obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
        dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus')
        avail = dbus_iface.ListNames()
        return interface in avail
        
    def getOutputData(self, datatype, ratingchar, statustext, nounknownoutput, maxlength):
        output = u""
        
        if nounknownoutput == True:
            unknown_time = ""
            unknown_number = ""
            unknown_string = ""
        else:
            unknown_time = "0:00"
            unknown_number = "0"
            unknown_string = "Unknown"
        
        try:
                
            bus = dbus.SessionBus()
            if self.musicData == None:
                
                if self.testDBus(bus, 'org.bansheeproject.Banshee'):
                
                    self.logInfo("Calling dbus interface for music data")
    
                    try:
                        self.logInfo("Setting up dbus interface")
                        
                        # setup dbus hooks
                        remote_player = bus.get_object('org.bansheeproject.Banshee', '/org/bansheeproject/Banshee/PlayerEngine')
                        iface_player = dbus.Interface(remote_player, 'org.bansheeproject.Banshee.PlayerEngine')
                        
                        self.logInfo("Calling dbus interface for music data")
                    
                        # prepare song properties for data retrieval
                        volume = str(iface_player.GetVolume())
                        
                        status = self.getStatusText(iface_player.GetCurrentState(), statustext)

                        # grab the data into variables
                        location = iface_player.GetCurrentUri()

                        # handle a file or stream differently for filename
                        if location.find("file://") != -1:
                            filename = location[location.rfind("/")+1:]
                        elif len(location) > 0:
                            filename = location
                        else:
                            filename = ""

                        # try to get all the normal stuff...the props return an empty string if nothing is available

                        props = iface_player.GetCurrentTrack()

                        if "name" in props:
                            title = props["name"]
                        else:
                            title = None
                            
                        if "album" in props:
                            album = props["album"]
                        else:
                            album = None
                            
                        if "artist" in props:
                            artist = props["artist"]
                        else:
                            artist = None
                            
                        if "year" in props:
                            year = str(props["year"])
                        else:
                            year = None
                        
                        if "track-number" in props:
                            tracknumber = str(props["track-number"])
                        else:
                            tracknumber = None

                        if "bit-rate" in props:
                            bitrate = str(props["bit-rate"])+"k/s"
                        else:
                            bitrate = None
                            
                        if year == "0": year = None
                        if tracknumber == "0": tracknumber = None
                        if bitrate == "0": bitrate = None

                        # TODO: get album art working for internet based (if feasible)...
                        # get coverart url or file link
                        if "artwork-id" in props:
                            if os.path.exists(os.path.expanduser("~/.cache/media-art/")):
                                path_prefix = os.path.expanduser("~/.cache/media-art/")
                            else:
                                path_prefix = os.path.expanduser("~/.cache/album-art/")
                            
                            coverart = os.path.join(path_prefix,str(props["artwork-id"]) +".jpg")
                            if coverart.find("http://") != -1:
                                coverart = None
                        else:
                            coverart = None

                        # common details
                        if "genre" in props:
                            genre = props["genre"]
                        else:
                            genre = None
                        
                        length_seconds = int(iface_player.GetLength() / 1000)
                        current_seconds = int(iface_player.GetPosition() / 1000)
                        current_position = str(int(current_seconds/60)).rjust(1,"0")+":"+str(int(current_seconds%60)).rjust(2,"0")

                        if length_seconds > 0:
                            current_position_percent = str(int((float(current_seconds) / float(length_seconds))*100))
                        else:
                            length_seconds = 0
                            current_position_percent = "0"

                        if self.options.secondsoutput == True:
                            length = str(length_seconds)
                            current_position = str(current_seconds)
                        else:
                            length = str(length_seconds/60).rjust(1,"0")+":"+str(length_seconds%60).rjust(2,"0")
                            current_position = str(int(current_seconds/60)).rjust(1,"0")+":"+str(int(current_seconds%60)).rjust(2,"0")
                                
                        rating = int(iface_player.GetRating())
                        #"0" # not supported
                        

                        volume = str(iface_player.GetVolume())

                        self.musicData = MusicData(status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume)
                        
                    except Exception, e:
                        self.logError(e.__str__())

            if self.musicData != None:
                
                self.logInfo("Preparing output for datatype:"+datatype)

                if datatype == "ST": #status
                    if self.musicData.status == None or len(self.musicData.status) == 0:
                        output = None
                    else:
                        output = self.musicData.status

                elif datatype == "CA": #coverart
                    if self.musicData.coverart == None or len(self.musicData.coverart) == 0:
                        output = None
                    else:
                        self.logInfo("Copying coverart from %s to %s"%(self.musicData.coverart, self.options.coverartpath))
                        shutil.copy(self.musicData.coverart, self.options.coverartpath)
                        self.musicData.coverart = self.options.coverartpath                        
                        output = self.musicData.coverart
                            
                elif datatype == "TI": #title
                    if self.musicData.title == None or len(self.musicData.title) == 0:
                        output = None
                    else:
                        output = self.musicData.title
                        
                elif datatype == "AL": #album
                    if self.musicData.album == None or len(self.musicData.album) == 0:
                        output = None
                    else:
                        output = self.musicData.album
                        
                elif datatype == "AR": #artist
                    if self.musicData.artist == None or len(self.musicData.artist) == 0:
                        output = None
                    else:
                        output = self.musicData.artist

                elif datatype == "TN": #tracknumber
                    if self.musicData.tracknumber == None or len(self.musicData.tracknumber) == 0:
                        output = None
                    else:
                        output = self.musicData.tracknumber
                        
                elif datatype == "GE": #genre
                    if self.musicData.title == genre or len(self.musicData.genre) == 0:
                        output = None
                    else:
                        output = self.musicData.genre
                        
                elif datatype == "YR": #year
                    if self.musicData.year == None or len(self.musicData.year) == 0:
                        output = None
                    else:
                        output = self.musicData.year
                                                
                elif datatype == "FN": #filename
                    if self.musicData.filename == None or len(self.musicData.filename) == 0:
                        output = None
                    else:
                        output = self.musicData.filename

                elif datatype == "BR": #bitrate
                    if self.musicData.bitrate == None or len(self.musicData.bitrate) == 0:
                        output = None
                    else:
                        output = self.musicData.bitrate
                        
                elif datatype == "LE": # length
                    if self.musicData.length == None or len(self.musicData.length) == 0:
                        output = None
                    else:
                        output = self.musicData.length
                        
                elif datatype == "PP": #current position in percent
                    if self.musicData.current_position_percent == None or len(self.musicData.current_position_percent) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position_percent
                        
                elif datatype == "PT": #current position in time
                    if self.musicData.current_position == None or len(self.musicData.current_position) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position
                        
                elif datatype == "VO": #volume
                    if self.musicData.volume == None or len(self.musicData.volume) == 0:
                        output = None
                    else:
                        output = self.musicData.volume
                        
                elif datatype == "RT": #rating
                    if self.musicData.rating == None or self.isNumeric(self.musicData.rating) == False:
                        output = None
                    else:
                        rating = int(self.musicData.rating)
                        if rating > 0:
                            output = u"".ljust(rating,ratingchar)
                        elif rating == 0:
                            output = u""
                        else:
                            output = None
                else:
                    self.logError("Unknown datatype provided: " + datatype)
                    return u""

            if output == None or self.musicData == None:
                if datatype in ["LE","PT"]:
                    if self.options.secondsoutput == True:
                        output = unknown_number
                    else:
                        output = unknown_time
                elif datatype in ["PP","VO","YR","TN"]:
                    output = unknown_number
                elif datatype == "CA":
                    output = ""                  
                else:
                    output = unknown_string
            
            if maxlength > 0 and len(output) > maxlength:
                output = output[:maxlength-3]+"..."
                
            return output
        
        except SystemExit:
            self.logError("System Exit!")
            return u""
        except Exception, e:
            traceback.print_exc()
            self.logError("Unknown error when calling getOutputData:" + e.__str__())
            return u""

    def getStatusText(self, status, statustext):
        
        if status != None:        
            statustextparts = statustext.split(",")
            
            if status == "playing":
                return statustextparts[0]
            elif status == "paused":
                return statustextparts[1]
            elif status == "stopped":
                return statustextparts[2]
            
        else:
            return status
        
    def getTemplateItemOutput(self, template_text):
        
        # keys to template data
        DATATYPE_KEY = "datatype"
        RATINGCHAR_KEY = "ratingchar"
        STATUSTEXT_KEY = "statustext"        
        NOUNKNOWNOUTPUT_KEY = "nounknownoutput"
        MAXLENGTH_KEY = "maxlength"
        
        datatype = None
        ratingchar = self.options.ratingchar #default to command line option
        statustext = self.options.statustext #default to command line option
        nounknownoutput = self.options.nounknownoutput #default to command line option
        maxlength = self.options.maxlength #default to command line option
        
        for option in template_text.split('--'):
            if len(option) == 0 or option.isspace():
                continue
            
            # not using split here...it can't assign both key and value in one call, this should be faster
            x = option.find('=')
            if (x != -1):
                key = option[:x].strip()
                value = option[x + 1:].strip()
                if value == "":
                    value = None
            else:
                key = option.strip()
                value = None
            
            try:
                if key == DATATYPE_KEY:
                    datatype = value
                elif key == RATINGCHAR_KEY:
                    ratingchar = value
                elif key == STATUSTEXT_KEY:
                    statustext = value                    
                elif key == NOUNKNOWNOUTPUT_KEY:
                    nounknownoutput = True
                elif key == MAXLENGTH_KEY:
                    maxlength = int(value)
                else:
                    self.logError("Unknown template option: " + option)

            except (TypeError, ValueError):
                self.logError("Cannot convert option argument to number: " + option)
                return u""
                
        if datatype != None:
            return self.getOutputData(datatype, ratingchar, statustext, nounknownoutput, maxlength)
        else:
            self.logError("Template item does not have datatype defined")
            return u""


    def getOutputFromTemplate(self, template):
        output = u""
        end = False
        a = 0
        
        # a and b are indexes in the template string
        # moving from left to right the string is processed
        # b is index of the opening bracket and a of the closing bracket
        # everything between b and a is a template that needs to be parsed
        while not end:
            b = template.find('[', a)
            
            if b == -1:
                b = len(template)
                end = True
            
            # if there is something between a and b, append it straight to output
            if b > a:
                output += template[a : b]
                # check for the escape char (if we are not at the end)
                if template[b - 1] == '\\' and not end:
                    # if its there, replace it by the bracket
                    output = output[:-1] + '['
                    # skip the bracket in the input string and continue from the beginning
                    a = b + 1
                    continue
                    
            if end:
                break
            
            a = template.find(']', b)
            
            if a == -1:
                self.logError("Missing terminal bracket (]) for a template item")
                return u""
            
            # if there is some template text...
            if a > b + 1:
                output += self.getTemplateItemOutput(template[b + 1 : a])
            
            a = a + 1

        return output
    
    def writeOutput(self):

        if self.options.template != None:
            #load the file
            try:
                fileinput = codecs.open(os.path.expanduser(self.options.template), encoding='utf-8')
                template = fileinput.read()
                fileinput.close()
            except Exception, e:
                self.logError("Error loading template file: " + e.__str__())
            else:
                output = self.getOutputFromTemplate(template)
        else:
            output = self.getOutputData(self.options.datatype, self.options.ratingchar, self.options.statustext, self.options.nounknownoutput, self.options.maxlength)

        print output.encode("utf-8")

    def isNumeric(self,value):
        try:
            temp = int(value)
            return True
        except:
            return False
        
    def logInfo(self, text):
        if self.options.verbose == True:
            print >> sys.stdout, "INFO: " + text

        if self.options.infologfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
            fileoutput = open(self.options.infologfile, "ab")
            fileoutput.write(datetimestamp+" INFO: "+text+"\n")
            fileoutput.close()
            
    def logError(self, text):
        print >> sys.stderr, "ERROR: " + text
        
        if self.options.errorlogfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
            fileoutput = open(self.options.errorlogfile, "ab")
            fileoutput.write(datetimestamp+" ERROR: "+text+"\n")
            fileoutput.close()
        
def main():
    
    parser = CommandLineParser()
    (options, args) = parser.parse_args()

    if options.version == True:
        print >> sys.stdout,"conkyBanshee v.2.10"
    else:
        if options.verbose == True:
            print >> sys.stdout, "*** INITIAL OPTIONS:"
            print >> sys.stdout, "    datatype:", options.datatype
            print >> sys.stdout, "    template:", options.template
            print >> sys.stdout, "    ratingchar:", options.ratingchar
            print >> sys.stdout, "    nounknownoutput:", options.nounknownoutput
            print >> sys.stdout, "    secondsoutput:", options.secondsoutput
            print >> sys.stdout, "    maxlength:", options.maxlength
            print >> sys.stdout, "    verbose:", options.verbose
            print >> sys.stdout, "    errorlogfile:",options.errorlogfile
            print >> sys.stdout, "    infologfile:",options.infologfile
            
        bansheeinfo = BansheeInfo(options)
        bansheeinfo.writeOutput()
    
if __name__ == '__main__':
    main()
    sys.exit()
    
Conkyrc:

Codice: Seleziona tutto

##################################################
##################################################
##												##
##					Settings					##
##												##
##################################################
##################################################
background no
update_interval 1.0
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2
text_buffer_size 2048
imlib_cache_size 0
override_utf8_locale yes


# +++++ Window +++++
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 1060 105
maximum_width 1060

alignment bottom_middle
gap_x 0
gap_y -338


# +++++ Styles +++++
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes


# +++++ Colors +++++
default_shade_color 101010
default_color 8F8F8F

# Blue
#color1 71A1DF
#color2 2C3949
#color3 6F99B4
#lua_load ~/.conky/NightDrive/scripts/rings_blue.lua

# Green
color1 C4DF9B
color2 566469
color3 628747
lua_load ~/.scripts/rings_green.lua

# Orange
#color1 DAB152
#color2 2E2B22
#color3 B28435
#lua_load ~/.conky/NightDrive/scripts/rings_orange.lua

# Red
#color1 EE6363
#color2 3B2A2A
#color3 AE4747
#lua_load ~/.conky/NightDrive/scripts/rings_red.lua

# Mono
#color1 8F8F8F
#color2 303030
#color3 555555
#lua_load ~/.conky/NightDrive/scripts/rings_mono.lua


# +++++ LUA +++++
lua_load ~/.scripts/rings_green.lua
lua_load ~/.scripts/conkyBanshee.py
lua_draw_hook_pre ring_stats


# +++++ Font +++++
use_xft yes
xftfont Ubuntu:size=6
xftalpha 0.1
uppercase no

TEXT
#Background Image
${image ~/.conky/NightDrive/images/bg1.png -s 1060x105 -f 86400}
#Clock
${goto 28}${voffset 25}${color2}${font Digital Readout Thick Upright:size=40}00${voffset -9}:${voffset 9}00${goto 28}${color1}${time %k}${voffset -9}:${voffset 9}${time %M}${goto 130}${voffset -20}${color2}${font Digital Readout Thick Upright:size=18}00${goto 130}${color1}${time %d}${font Digital Readout Thick Upright:size=12}${goto 130}${voffset 20}${color2}00${goto 130}${color1}${time %m}${goto 146}${color2}00${goto 146}${color1}${time %y}${font}
#Weather
${voffset -1}${execpi 1800 conkyForecast --location=ITXX0055 --template=~/.conky/NightDrive/conkyForecast.template}
${image ~/.conky/NightDrive/images/icons/cpu.png -p 278,47 -s 24x24 -f 86400}${voffset -79}${alignc 240}${font}${color}${cpu}%
${voffset 40}${alignc 240}${font}${exec sensors | grep 'temp1' | cut -c14-21}
${image ~/.conky/NightDrive/images/icons/mem.png -p 358,48 -s 24x24 -f 86400}${voffset -60}${alignc 160}${mem}
${voffset 40}${alignc 160}${swap}
${image ~/.conky/NightDrive/images/icons/net.png -p 438,48 -s 24x24 -f 86400}${voffset -60}${alignc 80}${downspeedf}
${voffset 40}${alignc 80}${upspeedf}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 598,48 -s 24x24 -f 86400}${voffset -60}${alignc -80}${fs_free /}
${voffset 40}${alignc -80}${fs_free /media/Windows_Seven}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 678,48 -s 24x24 -f 86400}${voffset -60}${alignc -160}${fs_free /media/Dati_1}
${voffset 40}${alignc -160}${fs_free /media/Dati_2}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 758,48 -s 24x24 -f 86400}${voffset -60}${alignc -240}${fs_free /media/Dati_3}
${voffset 40}${alignc -240}${fs_free /media/3B69-1AFD}
${image ~/.conky/NightDrive/images/icons/Mint1.png -p 512,32 -s 32x32 -f 86400}
${voffset -30}${alignc}${color3}${font}${execi 600 aptitude search "~U" | wc -l}${color} updates
${voffset -1}${alignc}${execi 60 uname -r}
${if_running banshee}${execi 6 ~/.scripts/conkyCover.sh}${execpi 1 ~/.scripts/conkyBanshee.py -t ~/.conky/NightDrive/conkyPlayer.template}
${goto 2}${color1}${if_running_banshee}${font}
Ultima modifica di Anonymous il giovedì 14 luglio 2011, 14:26, modificato 1 volta in totale.
Quando il fiore del male emette i primi vagiti significa che il mondo sta andando a ehm........
"Mio Sito: Lavori in corso..."
My Deviantart Profile
Avatar utente
Lo Zio
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1819
Iscrizione: mercoledì 16 settembre 2009, 23:51
Desktop: xfce / kde-plasma
Distribuzione: Debian 12 (bookworm) x86_64
Sesso: Maschile
Località: Torino
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Lo Zio »

;D forse ci siamo...preso un conky...modificato...(ma ci sto ancora lavorando)...qualche LUA,giusto per sclerare un'po... (bad) pero' ha "quasi" tutto quello che mi interessa! (b2b)
appena completate le modifiche posto il risultato!  (good)
--> * Indice Wiki * Photoshop su Wine * Cerca su Ubuntu.it *

......ti accorgi che fa caldo quando dai come input "sudo" e il terminale ti da come output "Anche io"
Avatar utente
Iacoporosso
Prode Principiante
Messaggi: 232
Iscrizione: lunedì 10 gennaio 2011, 18:32
Desktop: kde 4.10
Distribuzione: kubuntu 12.10

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Iacoporosso »

Mystery Men ha scritto: Ho un problema con il conky, precisamente conkybanshee non mi indica tutte le info delle tracce audio, a parte il fatto che la posizione sul conky è sballato, non so che fare Faccio il noob "Aiuutooooooooooooooooo":
Immagine
Edit: Risolto cverconky.

Ecco l'output di conkyBanshee.py:

Codice: Seleziona tutto

#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# conkyBanshee.py is a simple python script to gather 
# details of from Banshee for use in conky.
#
#  Author: Kaivalagi
# Created: 26/07/2009

from datetime import datetime
from optparse import OptionParser
import sys
import traceback
import codecs
import os
import shutil

try:
    import dbus
    DBUS_AVAIL = True
except ImportError:
    # Dummy D-Bus library
    class _Connection:
        get_object = lambda *a: object()
    class _Interface:
        __init__ = lambda *a: None
        ListNames = lambda *a: []
    class Dummy: pass
    dbus = Dummy()
    dbus.Interface = _Interface
    dbus.service = Dummy()
    dbus.service.method = lambda *a: lambda f: f
    dbus.service.Object = object
    dbus.SessionBus = _Connection
    DBUS_AVAIL = False


class CommandLineParser:

    parser = None

    def __init__(self):

        self.parser = OptionParser()
        self.parser.add_option("-t", "--template", dest="template", type="string", metavar="FILE", help=u"define a template file to generate output in one call. A displayable item in the file is in the form [--datatype=TI]. The following are possible options within each item: --datatype,--ratingchar. Note that the short forms of the options are not currently supported! None of these options are applicable at command line when using templates.")
        self.parser.add_option("-d", "--datatype", dest="datatype", default="TI", type="string", metavar="DATATYPE", help=u"[default: %default] The data type options are: ST (status), CA (coverart), TI (title), AL (album), AR (artist), GE (genre), YR (year), TN (track number), FN (file name), BR (bitrate k/s), LE (length), PP (current position in percent), PT (current position in time), VO (volume), RT (rating). Not applicable at command line when using templates.")
        self.parser.add_option("-c", "--coverartpath", dest="coverartpath", default="/tmp/cover", type="string", metavar="PATH", help=u"[default: %default] The file where coverart gets copied to if found when using the --datatype=CA option. Note that if set to an empty string i.e. "" the original file path is provided for the coverart path.")
        self.parser.add_option("-r", "--ratingchar", dest="ratingchar", default="*", type="string", metavar="CHAR", help=u"[default: %default] The output character for the ratings scale. Command line option overridden if used in templates.")
        self.parser.add_option("-s", "--statustext", dest="statustext", default="Playing,Paused,Stopped", type="string", metavar="TEXT", help=u"[default: %default] The text must be comma delimited in the form 'A,B,C'. Command line option overridden if used in templates.")
        self.parser.add_option("-n", "--nounknownoutput", dest="nounknownoutput", default=False, action="store_true", help=u"Turn off unknown output such as "Unknown" for title and "0:00" for length. Command line option overridden if used in templates.")
        self.parser.add_option("-S", "--secondsoutput", dest="secondsoutput", default=False, action="store_true", help=u"Force all position and length output to be in seconds only.")
        self.parser.add_option("-m", "--maxlength", dest="maxlength", default="0", type="int", metavar="LENGTH", help=u"[default: %default] Define the maximum length of any datatypes output, if truncated the output ends in "..."")
        self.parser.add_option("-v", "--verbose", dest="verbose", default=False, action="store_true", help=u"Request verbose output, not a good idea when running through conky!")
        self.parser.add_option("-V", "--version", dest="version", default=False, action="store_true", help=u"Displays the version of the script.")
        self.parser.add_option("--errorlogfile", dest="errorlogfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends errors to the filepath.")
        self.parser.add_option("--infologfile", dest="infologfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends info to the filepath.")                

    def parse_args(self):
        (options, args) = self.parser.parse_args()
        return (options, args)

    def print_help(self):
        return self.parser.print_help()

class MusicData:
    def __init__(self,status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume):
        self.status = status
        self.coverart = coverart
        self.title = title
        self.album = album
        self.length = length
        self.artist = artist
        self.tracknumber = tracknumber
        self.genre = genre
        self.year = year
        self.filename = filename
        self.bitrate = bitrate
        self.current_position_percent = current_position_percent
        self.current_position = current_position
        self.rating = rating
        self.volume = volume
        
class BansheeInfo:
    
    error = u""
    musicData = None
    
    def __init__(self, options):
        self.options = options
        
    def testDBus(self, bus, interface):
        obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
        dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus')
        avail = dbus_iface.ListNames()
        return interface in avail
        
    def getOutputData(self, datatype, ratingchar, statustext, nounknownoutput, maxlength):
        output = u""
        
        if nounknownoutput == True:
            unknown_time = ""
            unknown_number = ""
            unknown_string = ""
        else:
            unknown_time = "0:00"
            unknown_number = "0"
            unknown_string = "Unknown"
        
        try:
                
            bus = dbus.SessionBus()
            if self.musicData == None:
                
                if self.testDBus(bus, 'org.bansheeproject.Banshee'):
                
                    self.logInfo("Calling dbus interface for music data")
    
                    try:
                        self.logInfo("Setting up dbus interface")
                        
                        # setup dbus hooks
                        remote_player = bus.get_object('org.bansheeproject.Banshee', '/org/bansheeproject/Banshee/PlayerEngine')
                        iface_player = dbus.Interface(remote_player, 'org.bansheeproject.Banshee.PlayerEngine')
                        
                        self.logInfo("Calling dbus interface for music data")
                    
                        # prepare song properties for data retrieval
                        volume = str(iface_player.GetVolume())
                        
                        status = self.getStatusText(iface_player.GetCurrentState(), statustext)

                        # grab the data into variables
                        location = iface_player.GetCurrentUri()

                        # handle a file or stream differently for filename
                        if location.find("file://") != -1:
                            filename = location[location.rfind("/")+1:]
                        elif len(location) > 0:
                            filename = location
                        else:
                            filename = ""

                        # try to get all the normal stuff...the props return an empty string if nothing is available

                        props = iface_player.GetCurrentTrack()

                        if "name" in props:
                            title = props["name"]
                        else:
                            title = None
                            
                        if "album" in props:
                            album = props["album"]
                        else:
                            album = None
                            
                        if "artist" in props:
                            artist = props["artist"]
                        else:
                            artist = None
                            
                        if "year" in props:
                            year = str(props["year"])
                        else:
                            year = None
                        
                        if "track-number" in props:
                            tracknumber = str(props["track-number"])
                        else:
                            tracknumber = None

                        if "bit-rate" in props:
                            bitrate = str(props["bit-rate"])+"k/s"
                        else:
                            bitrate = None
                            
                        if year == "0": year = None
                        if tracknumber == "0": tracknumber = None
                        if bitrate == "0": bitrate = None

                        # TODO: get album art working for internet based (if feasible)...
                        # get coverart url or file link
                        if "artwork-id" in props:
                            if os.path.exists(os.path.expanduser("~/.cache/media-art/")):
                                path_prefix = os.path.expanduser("~/.cache/media-art/")
                            else:
                                path_prefix = os.path.expanduser("~/.cache/album-art/")
                            
                            coverart = os.path.join(path_prefix,str(props["artwork-id"]) +".jpg")
                            if coverart.find("http://") != -1:
                                coverart = None
                        else:
                            coverart = None

                        # common details
                        if "genre" in props:
                            genre = props["genre"]
                        else:
                            genre = None
                        
                        length_seconds = int(iface_player.GetLength() / 1000)
                        current_seconds = int(iface_player.GetPosition() / 1000)
                        current_position = str(int(current_seconds/60)).rjust(1,"0")+":"+str(int(current_seconds%60)).rjust(2,"0")

                        if length_seconds > 0:
                            current_position_percent = str(int((float(current_seconds) / float(length_seconds))*100))
                        else:
                            length_seconds = 0
                            current_position_percent = "0"

                        if self.options.secondsoutput == True:
                            length = str(length_seconds)
                            current_position = str(current_seconds)
                        else:
                            length = str(length_seconds/60).rjust(1,"0")+":"+str(length_seconds%60).rjust(2,"0")
                            current_position = str(int(current_seconds/60)).rjust(1,"0")+":"+str(int(current_seconds%60)).rjust(2,"0")
                                
                        rating = int(iface_player.GetRating())
                        #"0" # not supported
                        

                        volume = str(iface_player.GetVolume())

                        self.musicData = MusicData(status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume)
                        
                    except Exception, e:
                        self.logError(e.__str__())

            if self.musicData != None:
                
                self.logInfo("Preparing output for datatype:"+datatype)

                if datatype == "ST": #status
                    if self.musicData.status == None or len(self.musicData.status) == 0:
                        output = None
                    else:
                        output = self.musicData.status

                elif datatype == "CA": #coverart
                    if self.musicData.coverart == None or len(self.musicData.coverart) == 0:
                        output = None
                    else:
                        self.logInfo("Copying coverart from %s to %s"%(self.musicData.coverart, self.options.coverartpath))
                        shutil.copy(self.musicData.coverart, self.options.coverartpath)
                        self.musicData.coverart = self.options.coverartpath                        
                        output = self.musicData.coverart
                            
                elif datatype == "TI": #title
                    if self.musicData.title == None or len(self.musicData.title) == 0:
                        output = None
                    else:
                        output = self.musicData.title
                        
                elif datatype == "AL": #album
                    if self.musicData.album == None or len(self.musicData.album) == 0:
                        output = None
                    else:
                        output = self.musicData.album
                        
                elif datatype == "AR": #artist
                    if self.musicData.artist == None or len(self.musicData.artist) == 0:
                        output = None
                    else:
                        output = self.musicData.artist

                elif datatype == "TN": #tracknumber
                    if self.musicData.tracknumber == None or len(self.musicData.tracknumber) == 0:
                        output = None
                    else:
                        output = self.musicData.tracknumber
                        
                elif datatype == "GE": #genre
                    if self.musicData.title == genre or len(self.musicData.genre) == 0:
                        output = None
                    else:
                        output = self.musicData.genre
                        
                elif datatype == "YR": #year
                    if self.musicData.year == None or len(self.musicData.year) == 0:
                        output = None
                    else:
                        output = self.musicData.year
                                                
                elif datatype == "FN": #filename
                    if self.musicData.filename == None or len(self.musicData.filename) == 0:
                        output = None
                    else:
                        output = self.musicData.filename

                elif datatype == "BR": #bitrate
                    if self.musicData.bitrate == None or len(self.musicData.bitrate) == 0:
                        output = None
                    else:
                        output = self.musicData.bitrate
                        
                elif datatype == "LE": # length
                    if self.musicData.length == None or len(self.musicData.length) == 0:
                        output = None
                    else:
                        output = self.musicData.length
                        
                elif datatype == "PP": #current position in percent
                    if self.musicData.current_position_percent == None or len(self.musicData.current_position_percent) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position_percent
                        
                elif datatype == "PT": #current position in time
                    if self.musicData.current_position == None or len(self.musicData.current_position) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position
                        
                elif datatype == "VO": #volume
                    if self.musicData.volume == None or len(self.musicData.volume) == 0:
                        output = None
                    else:
                        output = self.musicData.volume
                        
                elif datatype == "RT": #rating
                    if self.musicData.rating == None or self.isNumeric(self.musicData.rating) == False:
                        output = None
                    else:
                        rating = int(self.musicData.rating)
                        if rating > 0:
                            output = u"".ljust(rating,ratingchar)
                        elif rating == 0:
                            output = u""
                        else:
                            output = None
                else:
                    self.logError("Unknown datatype provided: " + datatype)
                    return u""

            if output == None or self.musicData == None:
                if datatype in ["LE","PT"]:
                    if self.options.secondsoutput == True:
                        output = unknown_number
                    else:
                        output = unknown_time
                elif datatype in ["PP","VO","YR","TN"]:
                    output = unknown_number
                elif datatype == "CA":
                    output = ""                  
                else:
                    output = unknown_string
            
            if maxlength > 0 and len(output) > maxlength:
                output = output[:maxlength-3]+"..."
                
            return output
        
        except SystemExit:
            self.logError("System Exit!")
            return u""
        except Exception, e:
            traceback.print_exc()
            self.logError("Unknown error when calling getOutputData:" + e.__str__())
            return u""

    def getStatusText(self, status, statustext):
        
        if status != None:        
            statustextparts = statustext.split(",")
            
            if status == "playing":
                return statustextparts[0]
            elif status == "paused":
                return statustextparts[1]
            elif status == "stopped":
                return statustextparts[2]
            
        else:
            return status
        
    def getTemplateItemOutput(self, template_text):
        
        # keys to template data
        DATATYPE_KEY = "datatype"
        RATINGCHAR_KEY = "ratingchar"
        STATUSTEXT_KEY = "statustext"        
        NOUNKNOWNOUTPUT_KEY = "nounknownoutput"
        MAXLENGTH_KEY = "maxlength"
        
        datatype = None
        ratingchar = self.options.ratingchar #default to command line option
        statustext = self.options.statustext #default to command line option
        nounknownoutput = self.options.nounknownoutput #default to command line option
        maxlength = self.options.maxlength #default to command line option
        
        for option in template_text.split('--'):
            if len(option) == 0 or option.isspace():
                continue
            
            # not using split here...it can't assign both key and value in one call, this should be faster
            x = option.find('=')
            if (x != -1):
                key = option[:x].strip()
                value = option[x + 1:].strip()
                if value == "":
                    value = None
            else:
                key = option.strip()
                value = None
            
            try:
                if key == DATATYPE_KEY:
                    datatype = value
                elif key == RATINGCHAR_KEY:
                    ratingchar = value
                elif key == STATUSTEXT_KEY:
                    statustext = value                    
                elif key == NOUNKNOWNOUTPUT_KEY:
                    nounknownoutput = True
                elif key == MAXLENGTH_KEY:
                    maxlength = int(value)
                else:
                    self.logError("Unknown template option: " + option)

            except (TypeError, ValueError):
                self.logError("Cannot convert option argument to number: " + option)
                return u""
                
        if datatype != None:
            return self.getOutputData(datatype, ratingchar, statustext, nounknownoutput, maxlength)
        else:
            self.logError("Template item does not have datatype defined")
            return u""


    def getOutputFromTemplate(self, template):
        output = u""
        end = False
        a = 0
        
        # a and b are indexes in the template string
        # moving from left to right the string is processed
        # b is index of the opening bracket and a of the closing bracket
        # everything between b and a is a template that needs to be parsed
        while not end:
            b = template.find('[', a)
            
            if b == -1:
                b = len(template)
                end = True
            
            # if there is something between a and b, append it straight to output
            if b > a:
                output += template[a : b]
                # check for the escape char (if we are not at the end)
                if template[b - 1] == '\\' and not end:
                    # if its there, replace it by the bracket
                    output = output[:-1] + '['
                    # skip the bracket in the input string and continue from the beginning
                    a = b + 1
                    continue
                    
            if end:
                break
            
            a = template.find(']', b)
            
            if a == -1:
                self.logError("Missing terminal bracket (]) for a template item")
                return u""
            
            # if there is some template text...
            if a > b + 1:
                output += self.getTemplateItemOutput(template[b + 1 : a])
            
            a = a + 1

        return output
    
    def writeOutput(self):

        if self.options.template != None:
            #load the file
            try:
                fileinput = codecs.open(os.path.expanduser(self.options.template), encoding='utf-8')
                template = fileinput.read()
                fileinput.close()
            except Exception, e:
                self.logError("Error loading template file: " + e.__str__())
            else:
                output = self.getOutputFromTemplate(template)
        else:
            output = self.getOutputData(self.options.datatype, self.options.ratingchar, self.options.statustext, self.options.nounknownoutput, self.options.maxlength)

        print output.encode("utf-8")

    def isNumeric(self,value):
        try:
            temp = int(value)
            return True
        except:
            return False
        
    def logInfo(self, text):
        if self.options.verbose == True:
            print >> sys.stdout, "INFO: " + text

        if self.options.infologfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
            fileoutput = open(self.options.infologfile, "ab")
            fileoutput.write(datetimestamp+" INFO: "+text+"\n")
            fileoutput.close()
            
    def logError(self, text):
        print >> sys.stderr, "ERROR: " + text
        
        if self.options.errorlogfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
            fileoutput = open(self.options.errorlogfile, "ab")
            fileoutput.write(datetimestamp+" ERROR: "+text+"\n")
            fileoutput.close()
        
def main():
    
    parser = CommandLineParser()
    (options, args) = parser.parse_args()

    if options.version == True:
        print >> sys.stdout,"conkyBanshee v.2.10"
    else:
        if options.verbose == True:
            print >> sys.stdout, "*** INITIAL OPTIONS:"
            print >> sys.stdout, "    datatype:", options.datatype
            print >> sys.stdout, "    template:", options.template
            print >> sys.stdout, "    ratingchar:", options.ratingchar
            print >> sys.stdout, "    nounknownoutput:", options.nounknownoutput
            print >> sys.stdout, "    secondsoutput:", options.secondsoutput
            print >> sys.stdout, "    maxlength:", options.maxlength
            print >> sys.stdout, "    verbose:", options.verbose
            print >> sys.stdout, "    errorlogfile:",options.errorlogfile
            print >> sys.stdout, "    infologfile:",options.infologfile
            
        bansheeinfo = BansheeInfo(options)
        bansheeinfo.writeOutput()
    
if __name__ == '__main__':
    main()
    sys.exit()
    
Conkyrc:

Codice: Seleziona tutto

##################################################
##################################################
##												##
##					Settings					##
##												##
##################################################
##################################################
background no
update_interval 1.0
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2
text_buffer_size 2048
imlib_cache_size 0
override_utf8_locale yes


# +++++ Window +++++
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 1060 105
maximum_width 1060

alignment bottom_middle
gap_x 0
gap_y -338


# +++++ Styles +++++
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes


# +++++ Colors +++++
default_shade_color 101010
default_color 8F8F8F

# Blue
#color1 71A1DF
#color2 2C3949
#color3 6F99B4
#lua_load ~/.conky/NightDrive/scripts/rings_blue.lua

# Green
color1 C4DF9B
color2 566469
color3 628747
lua_load ~/.scripts/rings_green.lua

# Orange
#color1 DAB152
#color2 2E2B22
#color3 B28435
#lua_load ~/.conky/NightDrive/scripts/rings_orange.lua

# Red
#color1 EE6363
#color2 3B2A2A
#color3 AE4747
#lua_load ~/.conky/NightDrive/scripts/rings_red.lua

# Mono
#color1 8F8F8F
#color2 303030
#color3 555555
#lua_load ~/.conky/NightDrive/scripts/rings_mono.lua


# +++++ LUA +++++
lua_load ~/.scripts/rings_green.lua
lua_load ~/.scripts/conkyBanshee.py
lua_draw_hook_pre ring_stats


# +++++ Font +++++
use_xft yes
xftfont Ubuntu:size=6
xftalpha 0.1
uppercase no

TEXT
#Background Image
${image ~/.conky/NightDrive/images/bg1.png -s 1060x105 -f 86400}
#Clock
${goto 28}${voffset 25}${color2}${font Digital Readout Thick Upright:size=40}00${voffset -9}:${voffset 9}00${goto 28}${color1}${time %k}${voffset -9}:${voffset 9}${time %M}${goto 130}${voffset -20}${color2}${font Digital Readout Thick Upright:size=18}00${goto 130}${color1}${time %d}${font Digital Readout Thick Upright:size=12}${goto 130}${voffset 20}${color2}00${goto 130}${color1}${time %m}${goto 146}${color2}00${goto 146}${color1}${time %y}${font}
#Weather
${voffset -1}${execpi 1800 conkyForecast --location=ITXX0055 --template=~/.conky/NightDrive/conkyForecast.template}
${image ~/.conky/NightDrive/images/icons/cpu.png -p 278,47 -s 24x24 -f 86400}${voffset -79}${alignc 240}${font}${color}${cpu}%
${voffset 40}${alignc 240}${font}${exec sensors | grep 'temp1' | cut -c14-21}
${image ~/.conky/NightDrive/images/icons/mem.png -p 358,48 -s 24x24 -f 86400}${voffset -60}${alignc 160}${mem}
${voffset 40}${alignc 160}${swap}
${image ~/.conky/NightDrive/images/icons/net.png -p 438,48 -s 24x24 -f 86400}${voffset -60}${alignc 80}${downspeedf}
${voffset 40}${alignc 80}${upspeedf}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 598,48 -s 24x24 -f 86400}${voffset -60}${alignc -80}${fs_free /}
${voffset 40}${alignc -80}${fs_free /media/Windows_Seven}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 678,48 -s 24x24 -f 86400}${voffset -60}${alignc -160}${fs_free /media/Dati_1}
${voffset 40}${alignc -160}${fs_free /media/Dati_2}
${image ~/.conky/NightDrive/images/icons/hdd.png -p 758,48 -s 24x24 -f 86400}${voffset -60}${alignc -240}${fs_free /media/Dati_3}
${voffset 40}${alignc -240}${fs_free /media/3B69-1AFD}
${image ~/.conky/NightDrive/images/icons/Mint1.png -p 512,32 -s 32x32 -f 86400}
${voffset -30}${alignc}${color3}${font}${execi 600 aptitude search "~U" | wc -l}${color} updates
${voffset -1}${alignc}${execi 60 uname -r}
${if_running banshee}${execi 6 ~/.scripts/conkyCover.sh}${execpi 1 ~/.scripts/conkyBanshee.py -t ~/.conky/NightDrive/conkyPlayer.template}
${goto 2}${color1}${if_running_banshee}${font}

per la posizione hai gia provato a giocare con gli offset e voffset immagino  (rotfl)

e per conkyBanshee nn puoi installare semplicemente il pacchetto conkybanshee che cosi nn devi richiamare nessuno script e almeno a me nn da problemi??  (good)
http://fuorichiave.blogspot.com/2010/04 ... rte-4.html
Avatar utente
SuNjACk
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1061
Iscrizione: martedì 19 maggio 2009, 16:27
Località: Pesaro

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da SuNjACk »

Ma perchè non vi accontate di qualcosa di semplice? (rotfl)
Desktop openbox Halloween Documents Linux non è Windows
Free Software Is A Matter Of Liberty Not Price
Avatar utente
MI|RO
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 378
Iscrizione: lunedì 3 dicembre 2007, 13:48
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da MI|RO »

@Iacopo, non conoscevo quella guida grazie. Cmq per ora ho abortito Banshee per Audacious. Sono riuscito ad inserire le info musicali grazie ad uno script semplice che ho trovato in rete. Il problema e che non riesco ad inserire le copertine su conky da Audacious, e nella guida che mi hai postato non parlano compl. cmq domani vedrò che riuscirò a fare sono ormai al 99% del lavoro, mi manca solo questa sciocchezza.

@Sunjack, hai ragione, ma non c'è gusto ad vere sempre la papa pronta, a volte sbattersi un po non fa mai male^^, e con questo caldo infernale mi sembra il periodo migliore per testare al meglio i miei nervi e la mia pazienza  ;D
Quando il fiore del male emette i primi vagiti significa che il mondo sta andando a ehm........
"Mio Sito: Lavori in corso..."
My Deviantart Profile
Avatar utente
Iacoporosso
Prode Principiante
Messaggi: 232
Iscrizione: lunedì 10 gennaio 2011, 18:32
Desktop: kde 4.10
Distribuzione: kubuntu 12.10

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Iacoporosso »

Mystery Men ha scritto:
@Sunjack, hai ragione, ma non c'è gusto ad vere sempre la papa pronta, a volte sbattersi un po non fa mai male^^, e con questo caldo infernale mi sembra il periodo migliore per testare al meglio i miei nervi e la mia pazienza  ;D
mai furono dette parole più sagge! (good) (good)
Avatar utente
MI|RO
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 378
Iscrizione: lunedì 3 dicembre 2007, 13:48
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da MI|RO »

.............. 8) ;)
Quando il fiore del male emette i primi vagiti significa che il mondo sta andando a ehm........
"Mio Sito: Lavori in corso..."
My Deviantart Profile
Avatar utente
Lo Zio
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1819
Iscrizione: mercoledì 16 settembre 2009, 23:51
Desktop: xfce / kde-plasma
Distribuzione: Debian 12 (bookworm) x86_64
Sesso: Maschile
Località: Torino
Contatti:

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Lo Zio »

Immagine

ancora Man At Work...come faccio a impostare una leggera trasparenza scura per renderlo piu' leggibile?
--> * Indice Wiki * Photoshop su Wine * Cerca su Ubuntu.it *

......ti accorgi che fa caldo quando dai come input "sudo" e il terminale ti da come output "Anche io"
Avatar utente
Smilzo.Domenico
Prode Principiante
Messaggi: 173
Iscrizione: martedì 23 settembre 2008, 11:14

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Smilzo.Domenico »

Ho inserito le info di riproduzione nel conky. Un unico problema: vorrei visualizzare piu caratteri perche non sempre si vede tutto il titolo.
${if_running rhythmbox}${alignc}${exec /usr/bin/rhythmbox-client --no-start --no-present --print-playing|cut -b -99}
So che la soluzione è nella parte in grassetto, ma non ci riesco proprio!!!  >:( Come posso fare?
ubuntu 11.04 - lasciamo correre..
Avatar utente
Iacoporosso
Prode Principiante
Messaggi: 232
Iscrizione: lunedì 10 gennaio 2011, 18:32
Desktop: kde 4.10
Distribuzione: kubuntu 12.10

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Iacoporosso »

Smilzo.Domenico ha scritto: Ho inserito le info di riproduzione nel conky. Un unico problema: vorrei visualizzare piu caratteri perche non sempre si vede tutto il titolo.
${if_running rhythmbox}${alignc}${exec /usr/bin/rhythmbox-client --no-start --no-present --print-playing|cut -b -99}
So che la soluzione è nella parte in grassetto, ma non ci riesco proprio!!!  >:( Come posso fare?
teoricamente aumenti il -99 --> esempio -110 ;)
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da deegan »

**** ConkyArchBang****
Immagine
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
Avatar utente
Smilzo.Domenico
Prode Principiante
Messaggi: 173
Iscrizione: martedì 23 settembre 2008, 11:14

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Smilzo.Domenico »

deegan ha scritto: **** ConkyArchBang****
Immagine
13 °c, è il paradisoooooooo ne ho 26 adesso  (yes)
teoricamente aumenti il -99 --> esempio -110
Grazie caro (b2b)
ubuntu 11.04 - lasciamo correre..
Avatar utente
Iacoporosso
Prode Principiante
Messaggi: 232
Iscrizione: lunedì 10 gennaio 2011, 18:32
Desktop: kde 4.10
Distribuzione: kubuntu 12.10

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Iacoporosso »

Smilzo.Domenico ha scritto:
teoricamente aumenti il -99 --> esempio -110
Grazie caro (b2b)
(good)
oretovalley
Prode Principiante
Messaggi: 18
Iscrizione: martedì 1 settembre 2009, 21:02

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da oretovalley »

Io ci sto lavorando su, sto eseguendo delle modifiche al file lua e altre sul .conkyrc, ancora c'è molto lavoro da fare  ;D

http://img146.imageshack.us/img146/5017/barrabh.png
Avatar utente
Smilzo.Domenico
Prode Principiante
Messaggi: 173
Iscrizione: martedì 23 settembre 2008, 11:14

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da Smilzo.Domenico »

oretovalley ha scritto: Io ci sto lavorando su, sto eseguendo delle modifiche al file lua e altre sul .conkyrc, ancora c'è molto lavoro da fare  ;D

http://img146.imageshack.us/img146/5017/barrabh.png
Ti faccio notare che il cerchio "net" fa il giro completo anzichè a 180° =)
ubuntu 11.04 - lasciamo correre..
oretovalley
Prode Principiante
Messaggi: 18
Iscrizione: martedì 1 settembre 2009, 21:02

Re: Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Messaggio da oretovalley »

Smilzo.Domenico ha scritto:
oretovalley ha scritto: Io ci sto lavorando su, sto eseguendo delle modifiche al file lua e altre sul .conkyrc, ancora c'è molto lavoro da fare  ;D

http://img146.imageshack.us/img146/5017/barrabh.png
Ti faccio notare che il cerchio "net" fa il giro completo anzichè a 180° =)
Fixato! c'è quello interno che fa un giro di 180° e quello più esterno lo fa a 180  :)
Chiusa

Ritorna a “Bar Ubuntu”

Chi c’è in linea

Visualizzano questa sezione: nicolas e 12 ospiti