You are not logged in.
And another one thanks to ohnonot's little script - soooooooooooooo much easier!
Month and Year - not the perpetual calendar but hey, was something to do before I head off to watch TV with my wife.
/media/5/Conky/SuperKaramba/MMYY_ohnonot.conky
## pkill -xf "conky -c /media/5/Conky/SuperKaramba/MMYY_ohnonot.conky" &
#
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
#own_window_hints skip_taskbar,skip_pager,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title ohnonots's MM/YY Conky
background yes
update_interval 1
double_buffer yes
#alignment bl
alignment tl
gap_x 10
gap_y 150
#minimum_size 128 70
minimum_size 240 118
TEXT
${image /media/5/Conky/SuperKaramba/images/MMYY.png -p 0,0}\
${execpi 10 /media/5/Conky/SuperKaramba/scripts/sk-MM-YY.sh 10}
${alignc 10}${color FFD700}${time %z %Z} ${cpu}${color}
the modified script: /media/5/Conky/SuperKaramba/scripts/sk-MM-YY.sh
#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes
time="$(date +%m%y)"
numpath="/media/5/Conky/SuperKaramba/numbers"
echo "\${image ${numpath}/1-${time:0:1}.png -p 50,20}\
\${image ${numpath}/1-${time:1:1}.png -p 80,20}\
\${image ${numpath}/1-${time:2:1}.png -p 125,20}\
\${image ${numpath}/1-${time:3:1}.png -p 155,20}"
I'm not very good with GIMP but I took Clock.png and edited the dots to a slash and saved it as MMYY.png - others may have better luck than I did.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
HUSTON - WE HAVE A SuperKaramba CLOCK! ....
Sector 11, Your reputation precedes you! You, my friend, are simply AWESOME!!!!!!
The whole concept is a really cool retro steampunk concept... (and the original was done before Steampunk was cool)
I hope that many will find it super neat and it becomes a popular theme.
Running on my machine
Thanks again Sector11!
Last edited by rwyarbrough (2016-12-07 00:55:02)
Offline
Here are the clock background images from the original
with seconds
Offline
One I was working with and never finished
This was back when my gimp skills were still developing...
And here is one I was using as a calendar background (trying my hand at an overhead lighting effect)
Last edited by rwyarbrough (2016-12-07 01:13:07)
Offline
Thank you ... time will tell as to it's popularity.
But when it comes to steampunk - easysid has the top rating in my mind. In fact the guy has come up with some super conky creations. I took his MechClock (fancyclock) and tweaked the bejeezes out of it. Made a couple of round "dials" for hour and minutes and the 12 o'clock position is always the correct time. This is why I'm certain that the perpetual calendar and other things you want can be done ... maybe not by me but I'm certainly going to give it a good run for the money.
It wasn't in the » Conky - Calendars / Clocks / Time thread so I just added it.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Thanks again Sector11!
CPU = 0 - what you running a CRAY!
You running ohnonot's bash script I hope ... I know I am. ]:D
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Here are the clock background images from the original
http://rwyarbrough.homelinux.net/ClockBackground.png
with seconds
Grabbed em ... thanks!!!! and the others.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
CPU = 0 - what you running a CRAY!
Nope - but its not too shabby
processor : 7
vendor_id : AuthenticAMD
cpu family : 21
model : 1
model name : AMD FX(tm)-8120 Eight-Core Processor
stepping : 2
microcode : 0x6000626
cpu MHz : 1400.000
cache size : 2048 KB
physical id : 0
siblings : 8
core id : 6
cpu cores : 4
apicid : 7
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core perfctr_nb cpb hw_pstate vmmcall arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs : fxsave_leak sysret_ss_attrs
bogomips : 6241.59
TLB size : 1536 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb
I hate to tell you what I paid for it after finding out about your local prices for high tech stuff ( so I won't )
Last edited by rwyarbrough (2016-12-07 01:58:01)
Offline
It wasn't in the » Conky - Calendars / Clocks / Time thread so I just added it.
And I just grabbed it! Thank you again for all your help.
I am really starting to enjoy the "conky" life...
Offline
I hate to tell you what I paid for it after finding out about your local prices for high tech stuff ( so I
won't)
What's the matter you don't like seeing a grown man cry?
I have a good idea about prices there I check out newegg every now and then
I'm happy enough with mine, it's old but totally loves Linux; AMD Athlon II X3 450 - cache: 1536 KB, NVIDIA GT218 [GeForce 210], WDC_WD5000AAKX, with 6GB (overkill) of RAM and does conky quite nicely thank you.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Whoa, Nixie tubes! Brilliant!
The whole concept is a really cool retro steampunk concept... (and the original was done before Steampunk was cool)
...quite a bit post-steam, but nice nonetheless. Just don't "glue some gears on it".
Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009
Offline
And what's wrong with glue? O:)
-----
don't bother - I know what ya meant.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Thanks to @mi for the background link
Thanks to @Sector11 for his configuration files and the maintenance of this script by @mobildiesel
Last edited by unklar (2016-12-11 21:34:02)
Offline
If only I knew python
The python scripts have already been written as that was one of the languages SuperKaramba used. I wonder if you could just use whats already been done?
They can be found here at the authors KDE store site
Here is the perpetual calendar python code:
#NetVU AnalogMachine component
import karamba
import math
import os
from string import split
#update interval in seconds, found in .theme
Mneedle = "pics/month_needle.png"
MDneedle = "pics/monthday_needle.png"
WDneedle = "pics/weekday_needle.png"
Moonplate = "pics/moondisk.png"
Mooncover = "pics/mooncover.png"
#hard-coded script location example
#moonscript = "/home/erebus/Tube_Sys/PerpetualCalendar/MoonPhase.pl"
moonscript = "scripts/MoonPhase.pl"
menu_conf_moonscript = 0
menu_conf_script = 0
tooltip = ""
height = 276
width = 276
MONTH = 0
MDAY = 0
WDAY = 0
MOON = 0
CVR = 0
omoonphase = 0
moonphase = 0
dmoonphase = 0
day = 0
mddeg = 0
month = 0
dmonth = 0
omonth = 0
monthdeg = 0
weekday = 0
wddeg = 0
mdaydeg = [0,11,23,34,46,57,70,82,94,106,118,130,141,153,164,176,-173,-161,-149,-138,-127,-115,-103,-92,-81,-69,-58,-46,-34,-23,-12]
wdaydeg = [77,52,28,2,-22,-50,-78]
init = 0
#the update interval is specified in the .theme file
def initWidget(widget):
global moonscript, menu_conf_moonscript, menu_conf_script
createConfigurationMenu(widget)
readConfiguration(widget)
def mySetMenuConfigOption(widget, key, value):
try:
karamba.setMenuConfigOption(widget, key, value)
except:
karamba.setMenuConfigOption(widget, key, str(value) )
def createConfigurationMenu(widget):
karamba.addMenuConfigOption(widget, "config-moonscript", "Choose MoonPhase script")
mySetMenuConfigOption(widget, "config-moonscript", 0)
def menuOptionChanged(widget, key, value):
global moonscript, menu_conf_moonscript
if key == "config-moonscript":
mySetMenuConfigOption(widget, "config-moonscript", 0)
comboface = [ "kdialog", "--title", "Choose MoonPhase script", "--getopenfilename", "~" ]
menu_conf_moonscript = karamba.executeInteractive(widget, comboface)
def commandOutput(widget, pid, output):
if pid == menu_conf_moonscript:
moonscript = output[:-1]
karamba.writeConfigEntry(widget, "config_moonscript", moonscript)
def readConfiguration(widget):
global moonscript
try:
moonscript = str(karamba.readConfigEntry(widget, "config_moonscript"))
except:
moonscript = ''
def widgetUpdated(widget):
global Mneedle
global MDneedle
global WDneedle
global Moonplate
global Mooncover
global init
global MONTH
global MDAY
global WDAY
global MOON
global CVR
global moonphase
global dmoonphase
global omoonphase
global day
global mddeg
global mdaydeg
global month
global dmonth
global omonth
global monthdeg
global weekdaydeg
global wddeg
global weekday
global moonscript
if init == 0:
MOON = karamba.createImage(widget,0,0,Moonplate)
CVR = karamba.createImage(widget,0,0,Mooncover)
MONTH = karamba.createImage(widget,0,0,Mneedle)
MDAY = karamba.createImage(widget,0,0,MDneedle)
WDAY = karamba.createImage(widget,0,0,WDneedle)
init = 1
else:
#ok, let's calculate...
#moonphase
m = os.popen(moonscript)
moonphase = m.read()
moonphase = float(moonphase)
m.close()
#if moonphase == 1:
# moondeg = 0
# omoonphase = 0
#else:
dmoonphase = float(moonphase)
moondeg = float(-360*dmoonphase)
moondeg = float(moondeg+180) #moondisk graphics file offset
omoonphase = moonphase
#date
f = os.popen('date +%e.%m.%w')
output = f.read()
f.close()
olist = split(output, '.')
#day of the month
day = int(int(olist[0])-1) #-1 padding to get the array [0], ie. the month's 1st
mddeg = mdaydeg[day]
#month
month = int(olist[1])
#print month #debug
dmonth = int(month-1)
omonth = month
monthdeg = int(dmonth*30)
#day of the week
weekday = int(olist[2])
wddeg = wdaydeg[weekday]
#here comes the hardcore!!
#the moon disc
karamba.rotateImage(widget, MOON, int(moondeg))
w = karamba.getImageWidth(widget,MOON)
h = karamba.getImageHeight(widget,MOON)
karamba.moveImage(widget, MOON, -((w-width)/2), -((h-height)/2))
#aaand cover it up! (use redraw? see if it goes ok without)
#ok, works great just with the final redraw... Less code for me then!
#the month
karamba.rotateImage(widget, MONTH, int(monthdeg))
w = karamba.getImageWidth(widget,MONTH)
h = karamba.getImageHeight(widget,MONTH)
karamba.moveImage(widget, MONTH, -((w-width)/2), -((h-height)/2))
#the month day
karamba.removeImageTransformations(widget, MDAY)
karamba.rotateImage(widget, MDAY, int(mddeg))
w = karamba.getImageWidth(widget,MDAY)
h = karamba.getImageHeight(widget,MDAY)
karamba.moveImage(widget, MDAY, -((w-width)/2), -((h-height)/2))
#the week day
karamba.removeImageTransformations(widget, WDAY)
karamba.rotateImage(widget, WDAY, int(wddeg))
w = karamba.getImageWidth(widget,WDAY)
h = karamba.getImageHeight(widget,WDAY)
karamba.moveImage(widget, WDAY, -((w-width)/2), -((h-height)/2))
karamba.redrawWidget(widget)
def widgetClicked(widget, x, y, button):
pass
def widgetMouseMoved(widget, x, y, button):
pass
def menuItemClicked(widget, menu, id):
pass
def itemDropped(widget, dropText):
pass
def startupAdded(widget, startup):
pass
def startupRemoved(widget, startup):
pass
def taskAdded(widget, task):
pass
def taskRemoved(widget, task):
pass
def activeTaskChanged(widget, task):
pass
print "Loaded PerpetualCalendar python extension!"
Last edited by rwyarbrough (2016-12-12 02:43:34)
Offline
Hello
guys i make this
first line hours & date work great
In the second line the conky , first one works with the lua ( the needle) the second is a modification of the first one.
But I tear away my hairs to make work the scripts with cpu cpu0.
If one of you knows how to make I am interested. Cpu ram up down and tuti-quanti.
Thank you in advance and
@+
Last edited by loutch (2016-12-12 16:51:10)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ Make sure you are using the correct cpu variable. See https://forums.bunsenlabs.org/viewtopic.php?id=789 for some general information.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Hello
guys i make this
http://pix.tdct.org/upload/thumb/1481559258.png
first line hours & date work great
In the second line the conky , first one works with the lua ( the needle) the second is a modification of the first one.
But I tear away my hairs to make work the scripts with cpu cpu0.
If one of you knows how to make I am interested. Cpu ram up down and tuti-quanti.Thank you in advance and
@+
With the time and date did you use the python script or LUA or as posted earlier.
LUA for the needle? Can you show us the code?
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
For the needle i use this lua script
baro.lua
--==============================================================================
-- baro.lua
--
-- author : SLK-adapted by shamen456
-- version : v2011-06-13
-- license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================
require 'cairo'
--------------------------------------------------------------------------------
-- gauge DATA
gauge = {
{
name='cpu', arg='', max_value=100, sub_value=0,
x=120, y=130,
graph_radius=56,
graph_thickness=80,
graph_start_angle=300,
graph_unit_angle=1.3, graph_unit_thickness=1.,
graph_bg_colour=0xFFFFFF, graph_bg_alpha=.0,
graph_fg_colour=0xB1ADA7, graph_fg_alpha=0,
hand_fg_colour=0x303030, hand_fg_alpha=1,
},
}
-------------------------------------------------------------------------------
-- rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
-------------------------------------------------------------------------------
-- angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
local pos = current_angle + start_angle
return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end
-------------------------------------------------------------------------------
-- draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
local max_value = data['max_value']-data['sub_value']
local sub_value = data['sub_value']
local x, y = data['x'], data['y']
local graph_radius = data['graph_radius']
local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
local graph_start_angle = data['graph_start_angle']
local graph_unit_angle = data['graph_unit_angle']
local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
local graph_end_angle = (max_value * graph_unit_angle) % 360
-- background ring
cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
cairo_set_line_width(display, graph_thickness)
cairo_stroke(display)
-- arc of value
local val = (value-sub_value) % (max_value + 1)
local start_arc = 0
local stop_arc = 0
local i = 1
while i <= val do
start_arc = (graph_unit_angle * i) - graph_unit_thickness
stop_arc = (graph_unit_angle * i)
cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
cairo_stroke(display)
i = i + 1
end
local angle = start_arc
-- hand
start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
stop_arc = (graph_unit_angle * val)
cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
cairo_stroke(display)
-- graduations marks
local graduation_radius = data['graduation_radius']
local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
local graduation_unit_angle = data['graduation_unit_angle']
local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
local nb_graduation = graph_end_angle / graduation_unit_angle
local i = 0
while i < nb_graduation do
cairo_set_line_width(display, graduation_thickness)
start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
cairo_stroke(display)
cairo_set_line_width(display, graph_thickness)
i = i + 1
end
end
-- text
local txt_radius = data['txt_radius']
local txt_weight, txt_size = data['txt_weight'], data['txt_size']
local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
cairo_set_font_size (display, txt_size)
cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
cairo_show_text (display, value)
cairo_stroke (display)
-- caption
local caption = data['caption']
local caption_weight, caption_size = data['caption_weight'], data['caption_size']
local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
cairo_set_font_size (display, caption_size)
cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
cairo_move_to (display, x + tox + 5, y + toy + 1)
-- bad hack but not enough time !
if graph_start_angle < 105 then
cairo_move_to (display, x + tox - 30, y + toy + 1)
end
cairo_show_text (display, caption)
cairo_stroke (display)
end
-------------------------------------------------------------------------------
-- go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
local function load_gauge_rings(display, data)
local str, value = '', 0
str = string.format('${%s %s}',data['name'], data['arg'])
str = conky_parse(str)
value = tonumber(str)
draw_gauge_ring(display, data, value)
end
for i in pairs(gauge) do
load_gauge_rings(display, gauge[i])
end
end
-------------------------------------------------------------------------------
-- MAIN
function conky_main()
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 display = cairo_create(cs)
local updates = conky_parse('${updates}')
update_num = tonumber(updates)
if update_num > 5 then
go_gauge_rings(display)
end
end
for cpu i modify this
#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes
numpath="/home/loutch/.conky/karamba/images"
cpu=${cpu cpu0}
echo "\${image ${numpath}/1-${cpu:0:1}.png -p 50,20}\
\${image ${numpath}/1-${cpu:1:1}.png -p 80,20}"
& a lot of other tinks but i don't found it
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
For time this
#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes
time="$(date +%H%M)"
numpath="/home/loutch/.conky/karamba/images"
echo "\${image ${numpath}/1-${time:0:1}.png -p 50,20}\
\${image ${numpath}/1-${time:1:1}.png -p 80,20}\
\${image ${numpath}/1-${time:2:1}.png -p 125,20}\
\${image ${numpath}/1-${time:3:1}.png -p 155,20}"
& for date this
#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes
time="$(date +%d%m%y)"
numpath="/home/loutch/.conky/karamba/images"
echo "\${image ${numpath}/1-${time:0:1}.png -p 32,20}\
\${image ${numpath}/1-${time:1:1}.png -p 62,20}\
\${image ${numpath}/1-${time:2:1}.png -p 100,20}\
\${image ${numpath}/1-${time:3:1}.png -p 132,20}\
\${image ${numpath}/1-${time:4:1}.png -p 172,20}\
\${image ${numpath}/1-${time:5:1}.png -p 202,20}"
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@ loutch - YOU ROCK! Merci!
I will play.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline