profile-image

soundrolf

Rolf Klein Cologne, Germany

My Home Conky

Conky Mar 10 2017
Score 50%
50 Likes
50 Dislikes

YAD Tempconverter

Gnome Other Nov 10 2015
Score 52%
52 Likes
48 Dislikes

ddGUI

Utilities Sep 17 2015
Score 50%
50 Likes
50 Dislikes

ddGUI

Gnome Other Sep 17 2015
Score 50%
50 Likes
50 Dislikes

fortune-yad

Gnome Other Mar 26 2014
Score 50%
50 Likes
50 Dislikes

YAVI2MPG

Gnome Other Apr 17 2013
Score 50%
50 Likes
50 Dislikes

GDM3 Login Window

GDM Themes Jan 21 2013
Score 43%
43 Likes
57 Dislikes

Conky German

Conky Dec 28 2012
Score 52%
52 Likes
48 Dislikes

Grub2 Boot Picture

GRUB Themes Mar 31 2011
Score 50%
50 Likes
50 Dislikes

Conky 3

Conky Feb 16 2011
Score 48%
48 Likes
52 Dislikes

My Conky 2

Conky Apr 12 2010
Score 50%
50 Likes
50 Dislikes

photo of the day

Gnome Other Apr 12 2010
Score 52%
52 Likes
48 Dislikes

My-Conky

Conky Apr 07 2010
Score 50%
50 Likes
50 Dislikes
My Home Conky Conky
Feb 18 2017
My Home Conky Conky
Feb 15 2017
Conky Basic Conky
Nov 01 2016
Conky Basic Conky
Understood

15-11-2015

added functions for radiotray and audacious
to make scrollable name of artist and song
in radiotray, as well name of title, artist
and song in audacious if they are longer
than the tab width or the left space.

functions:

end -- end conky_wired_system_information

-- audacious section -- get information for title, artist and album
-- parameters idem conky_wired_audacious_title -- get title name for scrolling if too long
function conky_wired_audacious_title()
local title=""..conky_parse("${pre_exec audtool --current-song-tuple-data title}")

local retval=title..", "..title..", "..title..", "..title

return string.gsub(retval,"%c","")

end -- end conky_wired_audacious_title

-- parameters idem conky_wired_audacious_artist -- get artist name for scrolling if too long
function conky_wired_audacious_artist()
local artist=""..conky_parse("${pre_exec audtool --current-song-tuple-data artist}")

local retval=artist..", "..artist..", "..artist..", "..artist

return string.gsub(retval,"%c","")

end -- end conky_wired_audacious_artist

-- parameters idem conky_wired_audacious_album -- get album name for scrolling if too long
function conky_wired_audacious_album()
local album=""..conky_parse("${pre_exec audtool --current-song-tuple-data album}")

local retval=album..", "..album..", "..album..", "..album

return string.gsub(retval,"%c","")

end -- end conky_wired_audacious_album
-- end audacious section --

-- radiotray section -- get information for artist and song
-- parameters idem conky_wired_radiotray_song -- get song name for scrolling if too long
function conky_wired_radiotray_song()
local playing = conky_parse("${execi 3 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w 50}")
local i,j=string.find(playing,"-")
if i ~= nil and j ~= nil then
artist = string.sub(playing,1,j-1)
song = string.sub(playing,j+1,string.len(playing))
end

local retval=song..", "..song..", "..song..", "..song

return string.gsub(retval,"%c","")

end -- end conky_wired_radiotray_song

-- parameters idem conky_wired_radiotray_artist -- get artist name for scrolling if too long
function conky_wired_radiotray_artist()
local station = conky_parse("${execi 3 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}")
local i,j=string.find(station,"not playing")
if i == nil and j == nil then
local playing = conky_parse("${execi 3 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w 50}")
local i,j=string.find(playing,"-")
if i ~= nil and j ~= nil then
artist = string.sub(playing,1,j-1)
song = string.sub(playing,j+1,string.len(playing))
end
end

local retval=artist..", "..artist..", "..artist..", "..artist

return string.gsub(retval,"%c","")

end -- end conky_wired_radiotray_artist
-- end radiotray section --

radiotray:

-- function radiotray displays output from the Radio Tray and Audacious programs.

--[[ in this function I made some changes. No rhythmbox. Just radiotray and audacious. If both not playing,
show clock. In radiotray: if name of artist or song is longer than 23 characters then name of artist or
name of song will scrolled. If choosing show_audacious_extented == "yes" then display audacious data,
and show scrolled title, artist and album if they are too long.
If choosing show_audacious_extented == "no" then display audacious data like radiotray version.
]]--

-- parameters idem conky_wired_tab_radiotray
function conky_wired_tab_radiotray(x,y,width,height,text,font,font_size,r,g,b)
if height <= 60 then
print("ERROR conky_wired_tab_radiotray: insufficient height. Must be higher than 60")
return
end

local aspect=math.floor(height/60)
local corner_radius = height / 10.0
local radius = corner_radius / aspect
local degrees = math.pi / 180.0
local station,player,running,song,artist ="","","","",""
local i,im,j,jm=0,0,0,0


-- check if there is a radiotray process
running=conky_parse("${exec pidof -x radiotray}")
player ="Radiotray"
-- no radiotray, check for a rhythmbox process
if string.len(running) == 0 then
running=conky_parse("${exec pidof -x audacious}")
if string.len(running) > 0 then
player = "Audacious"
else
text=""
end
end

-- save original context before using clipping
cairo_save(cr)

-- draw text
conky_lctexta(x+width,y+15,text,font,font_size,r,g,b)
-- draw tab contours
cairo_new_sub_path (cr)
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees)
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees)
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees)
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees)
cairo_close_path (cr)
cairo_set_source_rgba (cr, r,g,b,.6)
cairo_set_line_width (cr, 2)
cairo_stroke (cr)

-- setup clipping region
cairo_rectangle(cr,x+2,y+2,width-4,height-4)
-- activate clipping so everything that falls outside the clipping region will have no text overflow visible
cairo_clip(cr)

-- if nothing, show clock with or without system information
if string.len(running) == 0 then
local timer=conky_parse("${time %H}:${time %M}") -- get time
conky_lctextc(x,y+(height/2)+9,width,timer,"Zekton",40,r,g,b) -- show clock
if show_system_information == "yes" then
local info=conky_wired_system_information()
local st=conky_wired_scroller(width, info, font, font_size+1,4)
conky_lctext(x+5,y+92,st,font,font_size+1,r,g,b)
end
local timing=conky_parse("${time %A} ${time %e} ${time %b} ${time %Y}")
conky_lctextc(x,y+(height/2)+28,width,timing,font,font_size+1,r,g,b)
else
if player == "Radiotray" then
station = conky_parse("${execi 3 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}")
local i,j=string.find(station,"not playing")
if i == nil and j == nil then
local playing = conky_parse("${execi 3 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w 50}")
local i,j=string.find(playing,"-")
if i ~= nil and j ~= nil then
artist = string.sub(playing,1,j-1)
song = string.sub(playing,j+1,string.len(playing))
end
end
end
-- must put it here, to see radiotray data
if show_audacious_extented == "yes" and player == "Radiotray" then
conky_lctext(x+5,y+30,"Station",font,font_size,r,g,b)
station=string.gsub(station,"%p","")
conky_lctextc(x,y+43,width,station,font,font_size,r,g,b)
conky_lctext(x+5,y+57,"Artist & Song",font,font_size,r,g,b)
if string.len(song) < 23 then
conky_lctextc(x,y+87,width,song,font,font_size,r,g,b)
else
local info=conky_wired_radiotray_song()
local title=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+87,width,title,font,font_size,r,g,b)
end
if string.len(artist) < 23 then
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
else
local info=conky_wired_radiotray_artist()
local artist=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
end
end
if player == "Audacious" then
station = ""
local playing3 = conky_parse("${execi 3 qdbus org.mpris.MediaPlayer2.audacious /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata}")
-- if metadata output present
if string.len(playing3) ~= 0 then
-- replace newline with *
playing3=string.gsub(playing3,"%c","*")
i,j=string.find(playing3,"http")
if i ~= nil or j ~= nil then
--internet station
im,jm=string.find(playing3,"artist")
if im ~= nil and jm ~= nil then
i,j=string.find(playing3,"*",jm+2)
station = string.sub(playing3,jm+2,j-1)
end
im,jm=string.find(playing3,"title")
if im ~= nil and jm ~= nil then
i,j=string.find(playing3,"*",jm+2)
local tmp = string.sub(playing3,jm+2,i-1)
i,j = string.find(tmp,"-")
if i ~= nil then
artist = string.sub(tmp,1,i-1)
song = string.sub(tmp,j+1,string.len(tmp))
else
station=tmp
artist="No information"
song="available"
end
end
end
i,j=string.find(playing3,"file")
if i ~= nil or j ~= nil then
--local music
station = "Local music library"
im,jm=string.find(playing3,"artist")
if im ~= nil and jm ~= nil then
i,j=string.find(playing3,"*",jm+2)
artist=string.sub(playing3,jm+2,i-1)
end
im,jm=string.find(playing3,"title")
if im ~= nil and jm ~= nil then
i,j=string.find(playing3,"*",jm+2)
song=string.sub(playing3,jm+2,i-1)
end
end

end
-- audacious information
if show_audacious_extented == "yes" and player == "Audacious" then
local title,artist,album,track_length,bitrate="","","","",""
if info.conkyversiondetection == "1.10" then
title = conky_ownpreexec("audtool --current-song-tuple-data title")
artist = conky_ownpreexec("audtool --current-song-tuple-data artist")
album = conky_ownpreexec("audtool --current-song-tuple-data album")
track_length = conky_ownpreexec("audtool --current-song-length")
bitrate = conky_ownpreexec("audtool --current-song-bitrate-kbps")
end
if info.conkyversiondetection == "1.9" then
title = conky_parse("${pre_exec audtool --current-song-tuple-data title}")
artist = conky_parse("${pre_exec audtool --current-song-tuple-data artist}")
album = conky_parse("${pre_exec audtool --current-song-tuple-data album}")
track_length = conky_parse("${pre_exec audtool --current-song-length}")
bitrate = conky_parse("${pre_exec audtool --current-song-bitrate-kbps}")
end
title = string.gsub(title,"%c","")
artist = string.gsub(artist,"%c","")
album = string.gsub(album,"%c","")
bitrate = string.gsub(bitrate,"%c","")
track_length = string.gsub(track_length,"%c","")

conky_lctext(x+6,y+20,"Title",font,11,themes.tred,themes.tgreen,themes.tblue)
if string.len(title) < 23 then
conky_lctextc(x,y+32,width,title,font,font_size,r,g,b)
else
local info=conky_wired_audacious_title()
local ti=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+32,width,ti,font,font_size,r,g,b)
end
conky_lctext(x+6,y+44,"Artist",font,10,themes.tred,themes.tgreen,themes.tblue)
if string.len(artist) < 15 then
conky_lctexta(x+150,y+44,artist,font,font_size,r,g,b)
else
local info=conky_wired_audacious_artist()
local ar=conky_wired_scroller(width, info, font, font_size+1)
conky_lctext(x+42,y+44,ar,font,font_size,r,g,b)
end
conky_lctext(x+6,y+56,"Bitrate",font,10,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+120,y+56,bitrate,font,font_size,r,g,b)
conky_lctexta(x+150,y+56,"KB/s",font,11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+68,"Track Length",font,10,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+68,track_length,font,font_size,r,g,b)
conky_lctext(x+6,y+80,"Album",font,10,themes.tred,themes.tgreen,themes.tblue)
if string.len(album) < 23 then
conky_lctextc(x,y+92,width,album,font,10,r,g,b)
else
local info=conky_wired_audacious_album()
local al=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+92,width,al,font,font_size,r,g,b)
end
end
end
-- if show_audacious_extented status is no, show audacious data in radiotray style
if show_audacious_extented == "no" then
conky_lctext(x+5,y+30,"Station",font,font_size,r,g,b)
station=string.gsub(station,"%p","")
conky_lctextc(x,y+43,width,station,font,font_size,r,g,b)
conky_lctext(x+5,y+57,"Artist & Song",font,font_size,r,g,b)
song=string.gsub(song,"%c","")
if string.len(song) < 23 then
conky_lctextc(x,y+87,width,song,font,font_size,r,g,b)
else
local info=conky_wired_radiotray_song()
local title=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+87,width,title,font,font_size,r,g,b)
end
if string.len(artist) < 23 then
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
else
local info=conky_wired_radiotray_artist()
local artist=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
end
end
end
-- restore original, remove clipping region
cairo_restore(cr)

return (x+width),(y+height)

end -- conky_wired_tab_radiotray


It works very good
Nov 15 2015
Conky Basic Conky
Finally I made it.

If a artist name and / or a song name is longer than 23 characters, then the artist name and / or the song name will scroll. I made new functions to implement this.

Here is the code
end -- end conky_wired_system_information -- system_information end --

-- parameters idem conky_wired_audacious_title -- audacious_title start --
function conky_wired_audacious_title()
local title=""..conky_parse("${pre_exec audtool --current-song-tuple-data title}")

local retval=title..", "..title..", "..title..", "..title

return string.gsub(retval,"%c","")

end -- end conky_wired_audacious_title -- audacious_title end --

-- parameters idem conky_wired_audacious_artist -- audacious_artist start --
function conky_wired_audacious_artist()
local artist=""..conky_parse("${pre_exec audtool --current-song-tuple-data artist}")

local retval=artist..", "..artist..", "..artist..", "..artist

return string.gsub(retval,"%c","")

end -- end conky_wired_audacious_artist -- audacious_artist end --


-- scrolls text by changing the text buffer
-- parameters: width - width of the graphical tab container
-- text - text to scroll
-- font - font to use
-- fontsize - font size to use
-- Returns: the scrolled part of the text

-- parameters idem conky_wired_tab_scoller -- scroller start --

The show starts

if show_audacious_extented == "no" then
conky_lctext(x+6,y+30,"Station","Arial",11,r,g,b)
station=string.gsub(station,"%p","")
conky_lctextc(x,y+43,width,station,font,font_size,r,g,b)
conky_lctext(x+6,y+57,"Artist & Song","Arial",11,r,g,b)
song=string.gsub(song,"%c","")
--conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
if string.len(artist) < 23 then
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
else
local info=conky_wired_audacious_artist()
local artist=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+72,width,artist,font,font_size,r,g,b)
end
if string.len(song) < 23 then
conky_lctextc(x,y+87,width,song,font,font_size,r,g,b)
else
local info=conky_wired_audacious_title()
local title=conky_wired_scroller(width, info, font, font_size+1)
conky_lctextc(x,y+87,width,title,font,font_size,r,g,b)
end
end
end
-- restore original, remove clipping region
cairo_restore(cr)
-- conky_wired_audacious_title()
return (x+width),(y+height)

end -- conky_wired_tab_radiotray -- radiotray end --


It works like perfect.


Nov 14 2015
Conky Basic Conky
Nov 10 2015
Conky Basic Conky
A friend of me loves to have audacious tab with Title, Artist, Bitrate, Track Length and Album inside the tab.
So I made one for him. Here it is. If you like it, put it in your code.
The name of title and album sometimes too long, so I put in center.

-- parameters idem conky_wired_tab_music
-- Title + Album set to center, because some titles and album names are too long to fit
function conky_wired_tab_music(x,y,width,height,text,font,font_size,r,g,b)
local vuheight=15 --VU barheight
local onebarheight=vuheight+8
local basey=y
local barfs=12 -- VU bar fontsize

if height <= 60 then
print("ERROR conky_wired_tab_music: insufficient height. Must be higher than 60")
return
end

local aspect=math.floor(height/60)
local corner_radius = height / 10.0
local radius = corner_radius / aspect
local degrees = math.pi / 180.0

-- draw text
conky_lctexta(x+width,y+15,text,font,font_size,r,g,b)
-- draw tab
cairo_new_sub_path (cr)
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees)
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees)
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees)
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees)
cairo_close_path (cr)
cairo_set_source_rgba (cr, r,g,b,.6)
cairo_set_line_width (cr, 2)
cairo_stroke (cr)

local running=conky_parse("${exec pidof -x audacious}")
if string.len(running) == 0 then
local timer=conky_parse("${time %H}:${time %M}")
conky_lctextc(x,y+(height/2)+9,width,timer,"Zekton",40,r,g,b)
conky_lctext(x+20,y+73,conky_parse("${time %A %e %b %Y}"),font,font_size+1,r,g,b)
else

local title = conky_parse("${pre_exec audtool --current-song-tuple-data title}")
local artist = conky_parse("${pre_exec audtool --current-song-tuple-data artist}")
local album = conky_parse("${pre_exec audtool --current-song-tuple-data album}")
local track_length = conky_parse("${pre_exec audtool --current-song-length}")
local bitrate = conky_parse("${pre_exec audtool --current-song-bitrate-kbps}")
conky_lctext(x+6,y+20,"Title","Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctextc(x,y+32,width,title,font,font_size,r,g,b)
conky_lctext(x+6,y+44,"Artist","Arial",10,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+44,artist,font,font_size,r,g,b)
conky_lctext(x+6,y+56,"Bitrate","Arial",10,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+120,y+56,bitrate,font,font_size,r,g,b)
conky_lctexta(x+150,y+56,"KB/s","Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+68,"Track Length","Arial",10,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+68,track_length,font,font_size,r,g,b)
conky_lctext(x+6,y+80,"Album","Arial",10,themes.tred,themes.tgreen,themes.tblue)
conky_lctextc(x,y+92,width,album,font,10,r,g,b)

end
return (x+width),(y+height)

end -- conky_wired_tab_music

Enjoy
Nov 10 2015
Conky Basic Conky
Thank you very much to implement audacious.

I prefer audacious instead of rhythmbox.
So I removed rhythmbox out of my script.

I made a new processes tab without bars for my laptop. The screen is not as big as my desktop monitor. Users can choose which processes tab they want.

-- for smaller screen size on laptops
-- without bars
-- parameters idem conky_wired_tab_cpu_proc
function conky_wired_tab_cpu_proc(x,y,width,height,text,font,font_size,r,g,b)
local vuheight=15 --VU barheight
local onebarheight=vuheight+8
local basey=y
local barfs=12 -- VU bar fontsize

if height <= 60 then
print("ERROR conky_wired_tab_cpu_proc: insufficient height. Must be higher than 60")
return
end

local aspect=math.floor(height/60)
local corner_radius = height / 10.0
local radius = corner_radius / aspect
local degrees = math.pi / 180.0

-- draw text
conky_lctexta(x+width,y+15,text,font,font_size,r,g,b)
-- draw tab
cairo_new_sub_path (cr)
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees)
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees)
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees)
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees)
cairo_close_path (cr)
cairo_set_source_rgba (cr, r,g,b,.6)
cairo_set_line_width (cr, 2)
cairo_stroke (cr)

conky_lctext(x+6,y+onebarheight+8,conky_parse("${top name 1}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+onebarheight+8,conky_parse("${top cpu 1}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+44,conky_parse("${top name 2}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+44,conky_parse("${top cpu 2}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+56,conky_parse("${top name 3}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+56,conky_parse("${top cpu 3}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+68,conky_parse("${top name 4}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+68,conky_parse("${top cpu 4}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+80,conky_parse("${top name 5}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+80,conky_parse("${top cpu 5}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)

return (x+width),(y+height)

end -- conky_wired_tab_cpu_proc
Nov 10 2015
Conky Basic Conky
Nov 08 2015
Conky Basic Conky
Nov 04 2015
Conky Basic Conky
Nov 03 2015
Conky Basic Conky
Nov 02 2015
Conky German Conky
Dec 31 2012