Posts: 127
KrunchTime
Joined: 05 Dec 2014
#1
Lovin' it....

Image

Weather eye candy courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.crunchbang.org/forums/viewtopic.php?id=19235"
linktext was:"Conky Weather & Moon Scripts"
====================================
by TeoBigusGeekus.

Calendaring feature courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.rainlendar.net"
linktext was:"Rainlendar"
====================================
.

Wallpaper courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.digitalblasphemy.com"
linktext was:"Digital Blasphemy"
====================================
.

Tint2 configuration courtesy of Philip Newborough, aka Corenominal, the developer of CrunchBang Linux.
Last edited by KrunchTime on 11 Dec 2014, 23:47, edited 3 times in total.
Posts: 667
jdmeaux1952
Joined: 01 Nov 2013
#2
Sweet!
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#3
it makes my eyes bleed, but in a good way.
Posts: 604
thriftee
Joined: 27 Feb 2009
#4
KrunchTime wrote:Lovin' it....

Image

Weather eye candy courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.crunchbang.org/forums/viewtopic.php?id=19235"
linktext was:"Conky Weather & Moon Scripts"
====================================
by TeoBigusGeekus.

Calendaring feature courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.rainlendar.net"
linktext was:"Rainlendar"
====================================
.

Wallpaper courtesy of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.digitalblasphemy.com"
linktext was:"Digital Blasphemy"
====================================
.

Tint2 configuration courtesy of Philip Newborough, aka Corenominal, the developer of CrunchBang Linux.
I agree its real pretty __{{emoticon}}__ Weather out the wazoo, LOL. I'm big on having the weather on my conky too, but mine is the NWS Current Conditions and 7 day text forecast. Not nearly as pretty.

And it must be nice to have a machine so freaking big and fast that you can afford to have 804 mb of memory in use with no programs up yet!

Do you have the free version of rainlendar or the paid one? I need a calendar program, too.

Also, what do you like better about openbox vs icewm? Just curious. I can use either, but IceWM seems easier and was quicker till I got static menus working on Openbox.
Posts: 127
KrunchTime
Joined: 05 Dec 2014
#5
The screenshot is from my Dell Studio 1557 laptop, 15-inch screen, AMD GPU, 8 GB RAM, core i7 CPU, and it's almost 5 years old. I'm itching to get new equipment, but can't afford to do so at this time.

There are programs in use; reference the icons in desktop 1 and 4 in the tint2 panel. Also note the tray icons for clementine and truecrypt.

I use the free version of Rainlendar, but I also purchased a copy a few years ago more as a donation to the developer than wanting the meager extras that come with the paid version.

I don't think I've played around with IceWM. I have tried fluxbox on several occasions and briefly looked at JWM as well. I've never grew to like fluxbox for any reason. JWM didn't impress me enough to desire to use it over openbox. Maybe it's the case of being comfortable with what you're familiar with. I'm a CrunchBang user from 2010, although I've only used it regularly since 2012, and CrunchBang comes standard with openbox and tint2 panel. I love the minimalism that openbox and tint2 provide. Philip Newborough, CrunchBang developer, did a good job configuring tint2. I've seen tint2 used in other distros and the default is just one single desktop panel. I believe CrunchBang comes by default with two desktop panels.
Posts: 325
male
Joined: 04 Nov 2011
#6
KrunchTime wrote:Lovin' it....
Wow!

Sorry for my"borring-statement"
I believe to know who you are. The temperature in Buenos Aires is also not so fresh... __{{emoticon}}__

Through your Wiki Page I found this Conky.
Maybe you can have a look at it, to see where the error is in the script, because the rings do not appear.
Thank you!

Code: Select all

conky -c ~/.conkyrc                          
Conky: forked to background, pid is 25859

Conky: desktop window (1c00192) is subwindow of root window (7e)
Conky: window type - normal
Conky: drawing to created window (0x5200002)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_clock_rings execution failed: /home/unklar/se@rcher/rings-b2.lua:334: bad argument #2 to 'format' (string expected, got nil)
Conky: llua_do_call: function conky_clock_rings execution failed: /home/unklar/se@rcher/rings-b2.lua:334: bad argument #2 to 'format' (string expected, got nil)
...

Code: Select all

# Основной, до TEXT, использованный в моих .conkyrc
# составил Борис Кринкель <olgmen> krinkel@rambler.ru
# --- параметры окна ---
# эти строки необходимы для нормальной работы лучше не изменять
own_window yes
own_window_class Conky
own_window_transparent yes
own_window_argb_visual
#own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# следующие параметры можно изменять
# минимальный размер
minimum_size 420 60
# минимальная ширина
maximum_width 400
# расположение окна
# левый верхний угол экрана
#alignment  top_middle
alignment middle_middle
#левый нижний угол экрана
#alignment bottom_left
# правый верхний угол экрана
#alignment top_right
# правый нижний угол экрана
#alignment bottom_right
# расстояние между кромкой экрана и окном
# по горизонтали
gap_x 10
# по вертикали
gap_y 1

# --- графика окна ---
# если желаете выводить conky на другом фоне напишите yes
background yes
# окантовка окна, бордюр
draw_borders no
# если бордюр yes
# длина штрихов бордюра, если 0, то бордюр выводится сплошной линией
stippled_borders 1
# толщина линий бордюра
border_width 1
# поле бордюра
#border_margin 20
# бордюр вокруг выводимых графиков
draw_graph_borders no
# включить тень?
draw_shades yes
# окантовка вокруг текста и выводимых объектов
draw_outline no
# Добавить пробел?  Только для встраиваемых объектов
use_spacer right

# --- цвет ---
# основной цвет по умолчанию
default_color ffffff
# цвет тени
default_shade_color black
# цвет окантовки
default_outline_color black

# --- шрифты ---
# используемые шрифты X когда Xft не используется, можно выбрать один из следующих
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Используется ли Xft?
use_xft yes

# Шриф Xft когда Xft доступен, здесь можно ввести название и размер любого шрифта
xftfont Liberation Sans:size=8

# яркость шрифта при испоьзовании шрифтов Xft
xftalpha 0.5
# выводить весь текст прописными буквами
uppercase no
# использовать кодировку UTF8? ПРИМЕЧАНИЕ: требуется Xft
override_utf8_locale yes

# --- следующие данные необходимы для работfont Liberation Sans:size=8
# обновление в секундах не имеет смысла ставить больше 2
# при выводе времени в секундах необходимо значение 1 и менее
update_interval 1.0
# время работы программы до её выключения
# установите 0 для работы программы без остановки
total_run_times 0
# двойная буфферизация (требуется для flicker, может не работать)
double_buffer yes
# вычитать буферизацию файловой системы из используемой памяти?
no_buffers yes
# количество cpu
cpu_avg_samples 2
# number of net samples to average
net_avg_samples 2
imlib_cache_size 0
short_units yes
pad_percents 2
text_buffer_size 2048

#--- LUA ---
lua_load ~/se@rcher/rings-b2.lua
lua_draw_hook_pre conky_clock_rings

TEXT
${goto 199}${voffset 38}${color 000fff}${font Radio Space:size=13}${color 10ffff}RAM
${goto 199}${voffset 1}$memperc%
${goto 140}${font Radio Space:size=10}${color 10ffff}SW
#${goto 140}${voffset 1}$swapperc%
${goto 278}${voffset -16}${font Radio Space:size=10}${color 10ffff}AP
#${goto 278}${voffset -16}
${goto 90}${voffset 20}${font Radio Space:size=10}${color 10ffff}HOME
${goto 80}${font Radio Space:size=10}${color 10ffff}${fs_size /home/unklar}
${goto 70}${font Radio Space:size=10}${color 10ffff}${fs_used /home/unklar}
${goto 310}${voffset -53}${font Radio Space:size=10}${color 10ffff}ROOT
${goto 320}${font Radio Space:size=10}${color 10ffff}${fs_size /}
${goto 330}${font Radio Space:size=10}${color 10ffff}${fs_used /}
${goto 183}${voffset 45}${font Radio Space:size=19}${color 10ffff}${time %H.%M}${color}${font}
${goto 65}${voffset 16}${font Radio Space:size=13}${color 10ffff}CPU1
${goto 71}${voffset 2}${cpu cpu0}%
${goto 323}${voffset -48}${font Radio Space:size=13}${color 10ffff}CPU2
${goto 331}${voffset 2}${cpu cpu1}%
${goto 145}${font Radio Space:size=10}${color 10ffff}DO 
${goto 274}${voffset -16}${font Radio Space:size=10}${color 10ffff}UP 
${voffset 17}${goto 178}${font Radio Space:size=13}${color 10ffff}BAT ${battery_percent BAT0} %

Code: Select all

--[[
Ring Meters by londonali1010 (2009)

This script draws percentage meters as rings. It is fully customisable; all options are described in the script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement near the end of the script uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use"killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
http://forum.ubuntu.ru/index.php?topic=76126.msg569556#msg569556
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
   lua_load ~/scripts/rings-v1.2.1.lua
   lua_draw_hook_pre ring_stats
   
Changelog:
+ v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
+ v1.2 -- Added option for the ending angle of the rings (07.10.2009)
+ v1.1 -- Added options for the starting angle of the rings, and added the"max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
+ v1.0 -- Original release (28.09.2009)
]]

settings_table = {
   {
      -- Edit this table to customise your rings.
      -- You can create more rings simply by adding more elements to settings_table.
      --"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
      name='time',
      --"arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
      arg='%I',
      --"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
      max=12,
      --"bg_colour" is the colour of the base ring.
      bg_colour=0x05ffff,
      --"bg_alpha" is the alpha value of the base ring.
      bg_alpha=0.2,
      --"fg_colour" is the colour of the indicator part of the ring.
      fg_colour=0xffffff,
      --"fg_alpha" is the alpha value of the indicator part of the ring.
      fg_alpha=0.8,
      --"x" and"y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
      x=219, y=210,
      --"radius" is the radius of the ring.
      radius=59,
      --"thickness" is the thickness of the ring, centred around the radius.
      thickness=2,
      --"start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
      start_angle=0,
      --"end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle.
      end_angle=360
   },
   {
      name='time',
      arg='%M',
      max=60,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=219, y=210,
      radius=67,
      thickness=2,
      start_angle=0,
      end_angle=360
   },
   {
      name='time',
      arg='%S',
      max=60,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x000ff,
      fg_alpha=0.8,
      x=219, y=210,
      radius=75,
      thickness=2,
      start_angle=0,
      end_angle=360
   },
   {
      name='cpu',
      arg='cpu0',
      max=100,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0xffffff,
      fg_alpha=0.8,
      x=349, y=278,
      radius=45,
      thickness=4,
      start_angle=-235,
      end_angle=117
   },
   {
      name='cpu',
      arg='cpu1',
      max=100,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=90, y=280,
      radius=45,
      thickness=4,
      start_angle=-109,
      end_angle=245
   },
   {
      name='memperc',
      arg='',
      max=100,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x000ff,
      fg_alpha=0.8,
      x=219, y=65,
      radius=45,
      thickness=4,
      start_angle=2,
      end_angle=358
   },
   {
      name='swapperc',
      arg='',
      max=50,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=219, y=67,
      radius=60,
      thickness=5,
      start_angle=84,
      end_angle=276
   },
   {
      name='downspeedf',
      arg='eth0',
      max=60,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=90, y=280,
      radius=60,
      thickness=5,
      start_angle=-31,
      end_angle=150
   },
   {
      name='upspeedf',
      arg='eth0',
      max=60,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=349, y=278,
      radius=60,
      thickness=5,
      start_angle=-150,
      end_angle=30
   },
        {
      name='battery_percent',
      arg='BAT0',
      max=100,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=219, y=208,
      radius=160,
      thickness=5,
      start_angle=140,
      end_angle=219
   },
        {
      name='fs_used_perc',
      arg='/',
      max=850,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=219, y=208,
      radius=160,
      thickness=5,
      start_angle=21.5,
      end_angle=96
   },
   {
      name='fs_used_perc',
      arg='/home/unklar',
      max=100,
      bg_colour=0x05ffff,
      bg_alpha=0.2,
      fg_colour=0x00ffff,
      fg_alpha=0.8,
      x=219, y=208,
      radius=160,
      thickness=5,
      start_angle=262,
      end_angle=338.5
   },   
} 

-- Use these settings to define the origin and extent of your clock.
clock_r=68

--"clock_x" and"clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
clock_x=219
clock_y=210

-- Colour & alpha of the clock hands
hour_colour=0xffffff
minute_colour=0x00ffff
second_colour=0x000ff
clock_alpha=0.6
 
-- Do you want to show the seconds hand?
show_seconds=true

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
   return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
   local w,h=conky_window.width,conky_window.height
   
   local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
   local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

   local angle_0=sa*(2*math.pi/360)-math.pi/2
   local angle_f=ea*(2*math.pi/360)-math.pi/2
   local t_arc=t*(angle_f-angle_0)

   -- Draw background ring

   cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
   cairo_set_line_width(cr,ring_w)
   cairo_stroke(cr)
   
   -- Draw indicator ring

   cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
   cairo_stroke(cr)      
end

function conky_ring_stats()
   local function setup_rings(cr,pt)
      local str=''
      local value=0
      
      str=string.format('${%s %s}',pt['name'],pt['arg'])
      str=conky_parse(str)
      
      value=tonumber(str)
      if value == nil then value = 0 end
      pct=value/pt['max']
      
      draw_ring(cr,pct,pt)
   end

   if conky_window==nil then return end
   local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
   
   local cr=cairo_create(cs)   
   
   local updates=conky_parse('${updates}')
   update_num=tonumber(updates)
   
   if update_num>5 then
      for i in pairs(settings_table) do
         setup_rings(cr,settings_table)
      end
   end
end

function draw_clock_hands(cr,xc,yc)
   local secs,mins,hours,secs_arc,mins_arc,hours_arc
   local xh,yh,xm,ym,xs,ys
 
   secs=os.date("%S")   
   mins=os.date("%M")
   hours=os.date("%I")
 
   secs_arc=(2*math.pi/60)*secs
   mins_arc=(2*math.pi/60)*mins+secs_arc/60
   hours_arc=(2*math.pi/12)*hours+mins_arc/12
 
   -- Draw hour hand
 
   xh=xc+0.8*clock_r*math.sin(hours_arc)
   yh=yc-0.8*clock_r*math.cos(hours_arc)
   cairo_move_to(cr,xc,yc)
   cairo_line_to(cr,xh,yh)
 
   cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
   cairo_set_line_width(cr,4)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(hour_colour,clock_alpha))
   cairo_stroke(cr)
 
   -- Draw minute hand
 
   xm=xc+clock_r*math.sin(mins_arc)
   ym=yc-clock_r*math.cos(mins_arc)
   cairo_move_to(cr,xc,yc)
   cairo_line_to(cr,xm,ym)
 
   cairo_set_line_width(cr,3)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(minute_colour,clock_alpha))
   cairo_stroke(cr)
 
   -- Draw seconds hand
 
   if show_seconds then
      xs=xc+1.1*clock_r*math.sin(secs_arc)
      ys=yc-1.1*clock_r*math.cos(secs_arc)
      cairo_move_to(cr,xc,yc)
      cairo_line_to(cr,xs,ys)
 
      cairo_set_line_width(cr,1)
      cairo_set_source_rgba(cr,rgb_to_r_g_b(second_colour,clock_alpha))
      cairo_stroke(cr)
   end
end
 
function conky_clock_rings()
   local function setup_rings(cr,pt)
      local str=''
      local value=0
 
      str=string.format('${%s %s}',pt['name'],pt['arg'])
      str=conky_parse(str)
 
      value=tonumber(str)
      if value == nil then value = 0 end
      pct=value/pt['max']
 
      draw_ring(cr,pct,pt)
   end
 
   -- Check that Conky has been running for at least 5s
 
   if conky_window==nil then return end
   local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
 
   local cr=cairo_create(cs)   
 
   local updates=conky_parse('${updates}')
   update_num=tonumber(updates)
 
   if update_num>5 then
      for i in pairs(settings_table) do
         setup_rings(cr,settings_table)
      end
   end
 
   draw_clock_hands(cr,clock_x,clock_y)
end
Posts: 127
KrunchTime
Joined: 05 Dec 2014
#7
@male: Sorry, you have me confused with someone else. I've never done any script coding, so I can't help you with your code.