You are not logged in.
@solidsnake
ah...you have to put them before the TEXT part 
Offline
Sector11 wrote:Sector11 <<== LUA ==>> NOT friends!
OK mrpeachy what did I do wrong now?
it was my fault, i had these lines in the wrong place
Well, that's a relief 
You're human you make "boo-boos" like I do!
This is working.
Now to get serious with it.
Thank you.
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
@solidsnake
ah...you have to put them before the TEXT part
Hello. I tried putting them before the TEXT part but nothing has happened to my actual conky file. Actually, I can see a very faint outline of a box which flashes on for all of about 2 seconds and then disappears. I've checked the paths on the rc but maybe there's something in script pointing to something which doesn't exist. Also, I was taking a look at cairo. I'm not sure if I have it. I tried
sudo apt-get install cairobut it said it couldn't find a package of that name. I then checked the repos for a cairo package. I didn't find one which was explicitly called 'cairo' (or maybe I wasn't looking hard enough) but there were several installed with names along the lines of 'cairo-python' etc. Does that help?
Offline
Hi,
When displaying the CPU load I would like to have a format like this:
CPU: 000%
so that when the load is less than 10% it reads
CPU: 009%
and when the load is greater than or equal to 10% it reads
CPU: 011%
I have tried the following in conkyrc:
CPU:${if_match "${cpu cpu0}">"9"} 0${cpu cpu0}% ${else} 00${cpu cpu0}${endif}
However the conditioning works only for values less than 10%. For values greater than or equal to 10% it keeps returning an output as if less than 10%, that is:
For a 9% load, conky reads CPU: 009%, as expected, but for 11% for example, conky reads CPU: 0011% and not 011% as I want it to.
Any ideas how can i fix this?
Offline
Hi,
When displaying the CPU load I would like to have a format like this:
CPU: 000%so that when the load is less than 10% it reads
CPU: 009%and when the load is greater than or equal to 10% it reads
CPU: 011%I have tried the following in conkyrc:
CPU:${if_match "${cpu cpu0}">"9"} 0${cpu cpu0}% ${else} 00${cpu cpu0}${endif}However the conditioning works only for values less than 10%. For values greater than or equal to 10% it keeps returning an output as if less than 10%, that is:
For a 9% load, conky reads CPU: 009%, as expected, but for 11% for example, conky reads CPU: 0011% and not 011% as I want it to.
Any ideas how can i fix this?
Maybe try changing the else statement? I'd try removing the 2 zeros altogether or removing one and seeing if that makes a difference.
Offline
mrpeachy wrote:@solidsnake
ah...you have to put them before the TEXT part
Hello. I tried putting them before the TEXT part but nothing has happened to my actual conky file. Actually, I can see a very faint outline of a box which flashes on for all of about 2 seconds and then disappears. I've checked the paths on the rc but maybe there's something in script pointing to something which doesn't exist. Also, I was taking a look at cairo. I'm not sure if I have it. I tried
sudo apt-get install cairobut it said it couldn't find a package of that name. I then checked the repos for a cairo package. I didn't find one which was explicitly called 'cairo' (or maybe I wasn't looking hard enough) but there were several installed with names along the lines of 'cairo-python' etc. Does that help?
best to post your entire conkyrc
Offline
Hi,
When displaying the CPU load I would like to have a format like this:
CPU: 000%so that when the load is less than 10% it reads
CPU: 009%and when the load is greater than or equal to 10% it reads
CPU: 011%I have tried the following in conkyrc:
CPU:${if_match "${cpu cpu0}">"9"} 0${cpu cpu0}% ${else} 00${cpu cpu0}${endif}However the conditioning works only for values less than 10%. For values greater than or equal to 10% it keeps returning an output as if less than 10%, that is:
For a 9% load, conky reads CPU: 009%, as expected, but for 11% for example, conky reads CPU: 0011% and not 011% as I want it to.
Any ideas how can i fix this?
${if_match ${cpu cpu0}<10}00${cpu cpu0}${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}${else}${cpu cpu0}${endif}${endif}does the trick
Offline
pfh wrote:Hi,
When displaying the CPU load I would like to have a format like this:
CPU: 000%so that when the load is less than 10% it reads
CPU: 009%and when the load is greater than or equal to 10% it reads
CPU: 011%I have tried the following in conkyrc:
CPU:${if_match "${cpu cpu0}">"9"} 0${cpu cpu0}% ${else} 00${cpu cpu0}${endif}However the conditioning works only for values less than 10%. For values greater than or equal to 10% it keeps returning an output as if less than 10%, that is:
For a 9% load, conky reads CPU: 009%, as expected, but for 11% for example, conky reads CPU: 0011% and not 011% as I want it to.
Any ideas how can i fix this?${if_match ${cpu cpu0}<10}00${cpu cpu0}${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}${else}${cpu cpu0}${endif}${endif}does the trick
Thanks mrpeachy. It works perfect.
Offline
pfh wrote:Hi,
When displaying the CPU load I would like to have a format like this:
CPU: 000%so that when the load is less than 10% it reads
CPU: 009%and when the load is greater than or equal to 10% it reads
CPU: 011%I have tried the following in conkyrc:
CPU:${if_match "${cpu cpu0}">"9"} 0${cpu cpu0}% ${else} 00${cpu cpu0}${endif}However the conditioning works only for values less than 10%. For values greater than or equal to 10% it keeps returning an output as if less than 10%, that is:
For a 9% load, conky reads CPU: 009%, as expected, but for 11% for example, conky reads CPU: 0011% and not 011% as I want it to.
Any ideas how can i fix this?${if_match ${cpu cpu0}<10}00${cpu cpu0}${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}${else}${cpu cpu0}${endif}${endif}does the trick
Here it is!
## killall conky && conky -c ~/conky/test103
background no
own_window yes
own_window_type override
own_window_transparent yes #yes
own_window_hints skip_taskbar,skip_pager
own_window_title conky-semi
own_window_class conky-semi
double_buffer yes
use_spacer right # yes is NOT an option - left right or none
override_utf8_locale yes
use_xft yes
xftalpha 1.0
uppercase no
stippled_borders 0
border_inner_margin 0
border_width 0
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
color0 DCDCDC #Gainsboro
default_colour FFFFF0 #Ivory
color1 CCCCCC #Marks Grey 778899 #LightSlateGrey
color2 7095BB #Marks Blue #FF8C00 #Darkorange
color3 C6FF8E #Light Green #FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
text_buffer_size 256 # minimum
no_buffers yes
short_units yes
pad_percents 2
update_interval 1
imlib_cache_size 0
gap_x 0 ### left &right
gap_y 0 ### up & down
minimum_size 760 50 ### width, height ### make this equal to what is used for the image
maximum_width 860 ### make this equal to minimum size width
alignment tm ### Aligned position on screen: tl, tr, tm, bl, br, bm, ml, mr
xftfont monospace:size=6
lua_load ~/draw_bg.lua
lua_draw_hook_pre draw_bg
TEXT
${voffset 5}${exec rhythmbox-client --print-playing --no-start} | ${top_mem name 2}${top mem 2}% | ${top_mem name 3}${top mem 3}% | ${top_mem name 4}${top mem 4}% | /home ${fs_used /home} / ${fs_size /home} ${fs_free_perc /home}% ${fs_bar 7,75} | CPU ${cpu cpu1}% ${cpubar 7,75}
#${image ~/Conky/backdrop.png -p 0,0 -s 760x50}Last edited by solidsnake (2011-05-07 23:16:09)
Offline
@ solidsnake
start your conkyrc from a terminal
and post any error messages you see
also post the lua script to make sure there wasnt any errors in copying it over
Offline
@ solidsnake
start your conkyrc from a terminaland post any error messages you see
also post the lua script to make sure there wasnt any errors in copying it over
Alright, started from terminal and as supposed, there were error messages. Here they are:
Conky: /home/user/conkyrc0: 28: no such configuration: 'default_colour'
Conky: llua_load: /home/user/draw_bg.lua:1: unexpected symbol near '-'
Conky: desktop window (1c000a8) is subwindow of root window (fb)
Conky: window type - override
Conky: drawing to created window (0x5000001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil valueHere is the rc:
## killall conky && conky -c ~/conky/test103
background no
own_window yes
own_window_type override
own_window_transparent yes #yes
own_window_hints skip_taskbar,skip_pager
own_window_title conky-semi
own_window_class conky-semi
double_buffer yes
use_spacer right # yes is NOT an option - left right or none
override_utf8_locale yes
use_xft yes
xftalpha 1.0
uppercase no
stippled_borders 0
border_inner_margin 0
border_width 0
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
color0 DCDCDC #Gainsboro
default_colour FFFFF0 #Ivory
color1 CCCCCC #Marks Grey 778899 #LightSlateGrey
color2 7095BB #Marks Blue #FF8C00 #Darkorange
color3 C6FF8E #Light Green #FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
text_buffer_size 256 # minimum
no_buffers yes
short_units yes
pad_percents 2
update_interval 1
imlib_cache_size 0
gap_x 0 ### left &right
gap_y 0 ### up & down
minimum_size 760 50 ### width, height ### make this equal to what is used for the image
maximum_width 860 ### make this equal to minimum size width
alignment tm ### Aligned position on screen: tl, tr, tm, bl, br, bm, ml, mr
xftfont monospace:size=6
lua_load ~/draw_bg.lua
lua_draw_hook_pre draw_bg
TEXT
${voffset 5}${exec rhythmbox-client --print-playing --no-start} | ${top_mem name 2}${top mem 2}% | ${top_mem name 3}${top mem 3}% | ${top_mem name 4}${top mem 4}% | /home ${fs_used /home} / ${fs_size /home} ${fs_free_perc /home}% ${fs_bar 7,75} | CPU ${cpu cpu1}% ${cpubar 7,75}
#${image ~/Conky/backdrop.png -p 0,0 -s 760x50}And finally, here is the LUA:
-[[ Background by londonali1010 (2009)
VinDSL Background Hack (2010-2011)
This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.
To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
lua_load ~/scripts/draw_bg.lua
lua_draw_hook_pre draw_bg
Changelog:
+ v3.0 VinDSL Hack (01.28.2011) Killed memory leak.
+ v2.4 VinDSL Hack (01.25.2011) Declared all variables in local.
+ v2.3 VinDSL Hack (12.31.2010) Added shading example(s).
+ v2.2 VinDSL Hack (12.30.2010) Cleaned up the code a bit.
+ v2.1 VinDSL Hack (12.24.2010) Added cairo destroy function(s).
+ v2.0 VinDSL Hack (12.21.2010) Added height adjustment variable.
+ v1.0 Original release (07.10.2009)
]]
--------------START OF PARAMETERS ------------
-- Change these settings to affect your background:
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
local corner_r = 50
-- Set the colour and transparency (alpha) of your background (0.00 - 0.99).
-- (Light Shading Example)
-- local bg_colour = 0x4d4d4d
-- local bg_alpha = 0.50
-- (Medium Shading Example)
-- local bg_colour = 0x222222
-- local bg_alpha = 0.50
-- (Dark Shading Example)
-- local bg_colour = 0x000000
-- local bg_alpha = 0.50
local bg_colour = 0x222222
local bg_alpha = 0.20
-- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.
-- (Default Setting)
local vindsl_hack_height = 0
---------------END OF PARAMETERS -------------
require 'cairo'
local cs, cr = nil
local function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg()
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local w = conky_window.width
local h = conky_window.height
local v = vindsl_hack_height
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)
cairo_move_to(cr,corner_r,0)
cairo_line_to(cr,w-corner_r,0)
cairo_curve_to(cr,w,0,w,0,w,corner_r)
cairo_line_to(cr,w,h+v-corner_r)
cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
cairo_line_to(cr,corner_r,h+v)
cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
cairo_line_to(cr,0,corner_r)
cairo_curve_to(cr,0,0,0,0,corner_r,0)
cairo_close_path(cr)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
cairo_fill(cr)
cairo_surface_destroy(cs)
cairo_destroy(cr)
endLast edited by solidsnake (2011-05-08 12:18:50)
Offline
@solidsnake
well there you have your answer
Conky: llua_load: /home/user/draw_bg.lua:1: unexpected symbol near '-'when you copied and pasted you missed out a - right at the beginning
the first line of the lua should be
--[[ Background by londonali1010 (2009)in lua "--" indicates a comment, but you need 2
Offline
@solidsnake
well there you have your answer
Conky: llua_load: /home/user/draw_bg.lua:1: unexpected symbol near '-'when you copied and pasted you missed out a - right at the beginning
the first line of the lua should be
--[[ Background by londonali1010 (2009)in lua "--" indicates a comment, but you need 2
Humph! I missed that - not being a programmer. 
I'll have to be more careful.
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
@solidsnake
well there you have your answer
Conky: llua_load: /home/user/draw_bg.lua:1: unexpected symbol near '-'when you copied and pasted you missed out a - right at the beginning
the first line of the lua should be
--[[ Background by londonali1010 (2009)in lua "--" indicates a comment, but you need 2
Damn it! I should've seen that a mile off... Well, anyway, when I got the LUA script to work, it had some issues with it that I didn't like. Namely, all four corners were curved when I only needed the bottom two as you can see here:
So I played around with the script and finally got the result I needed, as you can see here:
By using my new-found commenting skill!
Well, if you want to achieve the same effect, my (slightly) edited LUA is below:
--[[ Background by londonali1010 (2009)
VinDSL Background Hack (2010-2011)
This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.
To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
lua_load ~/scripts/draw_bg.lua
lua_draw_hook_pre draw_bg
Changelog:
+ v3.0 VinDSL Hack (01.28.2011) Killed memory leak.
+ v2.4 VinDSL Hack (01.25.2011) Declared all variables in local.
+ v2.3 VinDSL Hack (12.31.2010) Added shading example(s).
+ v2.2 VinDSL Hack (12.30.2010) Cleaned up the code a bit.
+ v2.1 VinDSL Hack (12.24.2010) Added cairo destroy function(s).
+ v2.0 VinDSL Hack (12.21.2010) Added height adjustment variable.
+ v1.0 Original release (07.10.2009)
]]
--------------START OF PARAMETERS ------------
-- Change these settings to affect your background:
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
local corner_r = 50
-- Set the colour and transparency (alpha) of your background (0.00 - 0.99).
-- (Light Shading Example)
-- local bg_colour = 0x4d4d4d
-- local bg_alpha = 0.50
-- (Medium Shading Example)
-- local bg_colour = 0x222222
-- local bg_alpha = 0.50
-- (Dark Shading Example)
-- local bg_colour = 0x000000
-- local bg_alpha = 0.50
local bg_colour = 0x222222
local bg_alpha = 0.20
-- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.
-- (Default Setting)
local vindsl_hack_height = 0
---------------END OF PARAMETERS -------------
require 'cairo'
local cs, cr = nil
local function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg()
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local w = conky_window.width
local h = conky_window.height
local v = vindsl_hack_height
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)
cairo_move_to(cr,corner_r,0)
cairo_line_to(cr,w-corner_r,0)
--cairo_curve_to(cr,w,0,w,0,w,corner_r)
cairo_line_to(cr,w,h+v-corner_r)
cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
cairo_line_to(cr,corner_r,h+v)
cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
--cairo_line_to(cr,0,corner_r)
cairo_curve_to(cr,0,0,0,0,corner_r,0)
cairo_close_path(cr)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
cairo_fill(cr)
cairo_surface_destroy(cs)
cairo_destroy(cr)
endHope that helps someone and thanks a lot to mrpeachy!
Last edited by solidsnake (2011-05-08 19:52:09)
Offline
hope someone here can help me with something i've been trying to do for about 4 hours now.
i use xmms2 with conky, but i want more control over the way my mp3-files are displayed. i do not use id3 tags, but work with a uniform filename system ('artist - album - 01 - title')
the only access conky has to the filename is 'xmms2_url'. so, i figured i'd try to use ${exec} and build my own string from xmms2's own 'xmms2 info' command.$ xmms2 info | grep url
[server] url = file:///media/storage/#mp3/adele - 21/adele - 21 - 03 - turning tables.mp3as you can see, i really only need the information after the last slash 'adele - 21 - 03 - turning tables.mp3'. so, i figured i'd just use some kind of string operator to grab that piece of string out of there. but that is where i run into problems. how do you do this? the closest i've come is this:
$ muz info | grep url | sed -r "s/\/[^\/]*$//"
[server] url = file:///media/storage/#mp3/adele - 21but, that only leaves out the part i need. how do i make it so i keep that part and leave out the rest? that sed stuff with the regular expressions i got from a website and modified it so it looks for a slash instead of a hyphen (which the original code did), so i only understand half of this. regular expressions are still a bit over my head after 2 months of off-and-on linux experience.
anyone a good idea on this one?
Offline
hope someone here can help me with something i've been trying to do for about 4 hours now.
i use xmms2 with conky, but i want more control over the way my mp3-files are displayed. i do not use id3 tags, but work with a uniform filename system ('artist - album - 01 - title')
the only access conky has to the filename is 'xmms2_url'. so, i figured i'd try to use ${exec} and build my own string from xmms2's own 'xmms2 info' command.$ xmms2 info | grep url
[server] url = file:///media/storage/#mp3/adele - 21/adele - 21 - 03 - turning tables.mp3as you can see, i really only need the information after the last slash 'adele - 21 - 03 - turning tables.mp3'. so, i figured i'd just use some kind of string operator to grab that piece of string out of there. but that is where i run into problems. how do you do this? the closest i've come is this:
$ muz info | grep url | sed -r "s/\/[^\/]*$//"
[server] url = file:///media/storage/#mp3/adele - 21but, that only leaves out the part i need. how do i make it so i keep that part and leave out the rest? that sed stuff with the regular expressions i got from a website and modified it so it looks for a slash instead of a hyphen (which the original code did), so i only understand half of this. regular expressions are still a bit over my head after 2 months of off-and-on linux experience.
anyone a good idea on this one?
do all the lines look like that one?
[server] url = file:///media/storage/#mp3/adele - 21/adele - 21 - 03 - turning tables.mp3this works in the terminal
echo "[server] url = file:///media/storage/#mp3/adele - 21/adele - 21 - 03 - turning tables.mp3" | awk -F'/' '{print $8}'for a bit of explaination
awk -F'/' tells awk to split up the line whenever it matches / (it doesnt have to be / it can be anything between '' for awk to match)
then '{print $8}' simply prints the 8th bit of the bits that resulted from the line being cut up
Last edited by mrpeachy (2011-05-08 21:01:11)
Offline
awk -F'/' tells awk to split up the line whenever it matches / (it doesnt have to be / it can be anything between '' for awk to match)
then '{print $8}' simply prints the 8th bit of the bits that resulted from the line being cut up
Well that clears up a bunch.
Now a few questions: What are the differences between mawk, gawk and awk?
man awkI get:
GAWK(1) Utility Commands GAWK(1)
man gawkI get:
GAWK(1) Utility Commands GAWK(1)
and of course:
man mawkgives me:
MAWK(1) USER COMMANDS MAWK(1)
Where does one find the man page for "awk"?
http://linux.die.net/man/1/awk gives me:
awk(1) - Linux man page
Namegawk - pattern scanning and processing language
Synopsis
gawk [ POSIX or GNU style options ] -f program-file [ -- ] file ...
gawk [ POSIX or GNU style options ] [ -- ] program-text file ...pgawk [ POSIX or GNU style options ] -f program-file [ -- ] file ...
pgawk [ POSIX or GNU style options ] [ -- ] program-text file ...
PGAWK ??????
################
last question - LUA.
Is there a way to have a LUA script draw the background BEHIND images in conky?
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
everything you ever wanted to know about awk (it looks like)
http://www.gnu.org/software/gawk/manual/gawk.html
ive only scratched the surface in its use 
but i find the best way to get awk code is to search google for specific code based on what i need it to do
Last edited by mrpeachy (2011-05-11 18:50:07)
Offline
everything you ever wanted to know about awk (it looks like)
http://www.gnu.org/software/gawk/manual/gawk.htmlive only scratched the surface in its use
Thanks ... interesting ... the link says:
...oftware/gawk/manual/gawk.html
General Introduction
This file documents awk, a program that yo...
So I guess gawk is awk or vice-a-versa. 
and just as confusing as "sed" ...
I'll save that page!
Last edited by Sector11 (2011-05-11 19:03:18)
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
I edited the Qonky Qalender script from here: http://crunchbanglinux.org/forums/topic … o-in-conky
I fixed the years and moved the layout around for it and put in white space instead random chars. I need to go through and clean up the logic a bit too, there's errors in the terminal when it's run. I've been on heavy pain meds for the last week so it's about all I could to to get it this far the other night. This fits fine on the stock #! conky config of 200-240 wide. I dropped it down to 220 max so my web browser would quit overlapping at random. A wide screen LCD would be nice... Anyone else down to play with the logic before I get up to doing it?
Crunchbang-conky-qalender-edit
#Qonky Qalender! qlocktwo style date in conky from #! forums mahatman2.
#Edited by JDP for non-random space chars and adjustment for layout and 2011-2014.
#Be sure to set color1 value before TEXT section. I use 222222 as in the original script.
${font mono:size=9}${color1}${if_match ${exec date +"%u"} == 1}${color}${else}${color1}${endif}MONDAY ${if_match ${exec date +"%u"} == 5}${color}${else}${color1}${endif}FRIDAY ${if_match ${exec date +"%u"} == 4}${color}${else}${color1}${endif}THURSDAY ${if_match ${exec date +"%u"} == 2}${color}${else}${color1}${endif}TUESDAY
${if_match ${exec date +"%u"} == 3}${color}${else}${color1}${endif}WEDNESDAY${if_match ${exec date +"%u"} == 7}${color}${else}${color1}${endif}SUNDAY${if_match ${exec date +"%u"} == 6}${color}${else}${color1}${endif}SATURDAY${color1}${if_match ${exec date +"%d"} >= 30}${color}${else}${color1}${endif} THIRTY
${if_match ${exec date +"%d"} >= 20}${if_match ${exec date +"%d"} < 30}${color}${endif}${endif}TWENTY${if_match ${exec date +"%d"} == 17}${color}SEVENTEEN${else}${if_match ${exec date +"%d"} == 7}${color}SEVEN${color1}TEEN${else}${if_match ${exec date +"%d"} == 27}${color}SEVEN${color1}TEEN${else}${color1}SEVENTEEN${endif}${endif}${endif}${if_match ${exec date +"%d"} == 14}${color}FOURTEEN${else}${if_match ${exec date +"%d"} == 4}${color}FOUR${color1}TEEN${else}${if_match ${exec date +"%d"} == 24}${color}FOUR${color1}TEEN${else}${color1}FOURTEEN${endif}${endif}${endif}${if_match ${exec date +"%d"} == 16}${color}SIXTEEN${else}${if_match ${exec date +"%d"} == 6}${color}SIX${color1}TEEN${else}${if_match ${exec date +"%d"} == 26}${color}SIX${color1}TEEN${else}${color1}SIXTEEN${endif}${endif}${endif}
${if_match ${exec date +"%d"} == 11}${color}${else}${color1}${endif}ELEVEN${if_match ${exec date +"%d"} == 13}${color}${else}${color1}${endif} THIRTEEN${color1}${if_match ${exec date +"%d"} == 18}${color}EIGHTEEN${else}${if_match ${exec date +"%d"} == 8}${color}EIGHT${color1}EEN${else}${if_match ${exec date +"%d"} == 28}${color}EIGHT${color1}EEN${else}${color1}EIGHTEEN${endif}${endif}${color1}${if_match ${exec date +"%d"} == 12}${color}${else}${color1}${endif} TWELVE
${if_match ${exec date +"%d"} == 10}${color}${else}${color1}${endif}TEN${if_match ${exec date +"%d"} == 3}${color}THREE${else}${if_match ${exec date +"%d"} == 23}${color}THREE${else}${color1}THREE${endif}${endif}${if_match ${exec date +"%d"} == 2}${color}TWO${else}${if_match ${exec date +"%d"} == 22}${color}TWO${else}${color1}TWO${endif}${endif}${color1}${if_match ${exec date +"%d"} == 1} ${color}ONE${else}${if_match ${exec date +"%d"} ==21}${color}ONE${else}${if_match ${exec date +"%d"} == 31}${color}ONE${else}${color1}ONE${endif}${endif}${endif}${if_match ${exec date +"%d"} == 15}${color}${else}${color1}${endif} FIFTEEN${if_match ${exec date +"%d"} == 19}${color}NINETEEN${else}${if_match ${exec date +"%d"} == 9}${color}NINE${color1}TEEN${else}${if_match ${exec date +"%d"} == 29}${color}NINE${color1}TEEN${else}${color1}NINETEEN${endif}${endif}${endif}
${if_match ${exec date +"%d"} == 5}${color}${else}${if_match ${exec date +"%d"}== 25}${color}FIVE${else}${if_match ${exec date +"%d"} == 25}${color}FIVE${else}${color1}FIVE${endif}${endif} ${color1}${if_match ${exec date +"%m"} == 10}${color}${else}${color1}${endif}OCTOBER${if_match ${exec date +"%m"} == 5}${color}${else}${color1}${endif}MAY${if_match ${exec date +"%m"} == 1}${color}${else}${color1}${endif}JANUARY${if_match ${exec date +"%m"} == 7}${color}${else}${color1}${endif}JULY${if_match ${exec date +"%m"} == 6}${color}${else}${color1}${endif}JUNE
${if_match ${exec date +"%m"} == 9}${color}${else}${color1}${endif}SEPTEMBER ${color1}${if_match ${exec date +"%m"} == 4}${color}${else}${color1}${endif}APRIL ${if_match ${exec date +"%m"} == 3}${color}${else}${color1}${endif}MARCH ${color1}${if_match ${exec date +"%m"} == 11}${color}${else}${color1}${endif}NOVEMBER
${if_match ${exec date +"%m"} == 8}${color}${else}${color1}${endif}AUGUST ${color1}${if_match ${exec date +"%m"} == 12}${color}${else}${color1}${endif}DECEMBER ${color1}${color}TWO THOUSAND &
${color1}${if_match ${exec date +"%y"} == 14}${color}${else}${color1}${endif}FOURTEEN ${color1}${if_match ${exec date +"%y"} == 13}${color}${else}${color1}${endif}THIRTEEN${if_match ${exec date +"%y"} == 12}${color}${else}${color1}${endif}TWELVE ${color1}${if_match ${exec date +"%y"} == 11}${color}${else}${color1}${endif}ELEVENLast edited by JDP (2011-05-12 07:26:17)
Offline
I edited the Qonky Qalender script from here: http://crunchbanglinux.org/forums/topic … o-in-conky
I fixed the years and moved the layout around for it and put in white space instead random chars. I need to go through and clean up the logic a bit too, there's errors in the terminal when it's run. I've been on heavy pain meds for the last week so it's about all I could to to get it this far the other night. This fits fine on the stock #! conky config of 200-240 wide. I dropped it down to 220 max so my web browser would quit overlapping at random. A wide screen LCD would be nice... Anyone else down to play with the logic before I get up to doing it?
Crunchbang-conky-qalender-edit#Qonky Qalender! qlocktwo style date in conky from #! forums mahatman2. #Edited by JDP for non-random space chars and adjustment for layout and 2011-2014. #Be sure to set color1 value before TEXT section. I use 222222 as in the original script. ${font mono:size=9}${color1}${if_match ${exec date +"%u"} == 1}${color}${else}${color1}${endif}MONDAY ${if_match ${exec date +"%u"} == 5}${color}${else}${color1}${endif}FRIDAY ${if_match ${exec date +"%u"} == 4}${color}${else}${color1}${endif}THURSDAY ${if_match ${exec date +"%u"} == 2}${color}${else}${color1}${endif}TUESDAY ${if_match ${exec date +"%u"} == 3}${color}${else}${color1}${endif}WEDNESDAY${if_match ${exec date +"%u"} == 7}${color}${else}${color1}${endif}SUNDAY${if_match ${exec date +"%u"} == 6}${color}${else}${color1}${endif}SATURDAY${color1}${if_match ${exec date +"%d"} >= 30}${color}${else}${color1}${endif} THIRTY ${if_match ${exec date +"%d"} >= 20}${if_match ${exec date +"%d"} < 30}${color}${endif}${endif}TWENTY${if_match ${exec date +"%d"} == 17}${color}SEVENTEEN${else}${if_match ${exec date +"%d"} == 7}${color}SEVEN${color1}TEEN${else}${if_match ${exec date +"%d"} == 27}${color}SEVEN${color1}TEEN${else}${color1}SEVENTEEN${endif}${endif}${endif}${if_match ${exec date +"%d"} == 14}${color}FOURTEEN${else}${if_match ${exec date +"%d"} == 4}${color}FOUR${color1}TEEN${else}${if_match ${exec date +"%d"} == 24}${color}FOUR${color1}TEEN${else}${color1}FOURTEEN${endif}${endif}${endif}${if_match ${exec date +"%d"} == 16}${color}SIXTEEN${else}${if_match ${exec date +"%d"} == 6}${color}SIX${color1}TEEN${else}${if_match ${exec date +"%d"} == 26}${color}SIX${color1}TEEN${else}${color1}SIXTEEN${endif}${endif}${endif} ${if_match ${exec date +"%d"} == 11}${color}${else}${color1}${endif}ELEVEN${if_match ${exec date +"%d"} == 13}${color}${else}${color1}${endif} THIRTEEN${color1}${if_match ${exec date +"%d"} == 18}${color}EIGHTEEN${else}${if_match ${exec date +"%d"} == 8}${color}EIGHT${color1}EEN${else}${if_match ${exec date +"%d"} == 28}${color}EIGHT${color1}EEN${else}${color1}EIGHTEEN${endif}${endif}${color1}${if_match ${exec date +"%d"} == 12}${color}${else}${color1}${endif} TWELVE ${if_match ${exec date +"%d"} == 10}${color}${else}${color1}${endif}TEN${if_match ${exec date +"%d"} == 3}${color}THREE${else}${if_match ${exec date +"%d"} == 23}${color}THREE${else}${color1}THREE${endif}${endif}${if_match ${exec date +"%d"} == 2}${color}TWO${else}${if_match ${exec date +"%d"} == 22}${color}TWO${else}${color1}TWO${endif}${endif}${color1}${if_match ${exec date +"%d"} == 1} ${color}ONE${else}${if_match ${exec date +"%d"} ==21}${color}ONE${else}${if_match ${exec date +"%d"} == 31}${color}ONE${else}${color1}ONE${endif}${endif}${endif}${if_match ${exec date +"%d"} == 15}${color}${else}${color1}${endif} FIFTEEN${if_match ${exec date +"%d"} == 19}${color}NINETEEN${else}${if_match ${exec date +"%d"} == 9}${color}NINE${color1}TEEN${else}${if_match ${exec date +"%d"} == 29}${color}NINE${color1}TEEN${else}${color1}NINETEEN${endif}${endif}${endif} ${if_match ${exec date +"%d"} == 5}${color}${else}${if_match ${exec date +"%d"}== 25}${color}FIVE${else}${if_match ${exec date +"%d"} == 25}${color}FIVE${else}${color1}FIVE${endif}${endif} ${color1}${if_match ${exec date +"%m"} == 10}${color}${else}${color1}${endif}OCTOBER${if_match ${exec date +"%m"} == 5}${color}${else}${color1}${endif}MAY${if_match ${exec date +"%m"} == 1}${color}${else}${color1}${endif}JANUARY${if_match ${exec date +"%m"} == 7}${color}${else}${color1}${endif}JULY${if_match ${exec date +"%m"} == 6}${color}${else}${color1}${endif}JUNE ${if_match ${exec date +"%m"} == 9}${color}${else}${color1}${endif}SEPTEMBER ${color1}${if_match ${exec date +"%m"} == 4}${color}${else}${color1}${endif}APRIL ${if_match ${exec date +"%m"} == 3}${color}${else}${color1}${endif}MARCH ${color1}${if_match ${exec date +"%m"} == 11}${color}${else}${color1}${endif}NOVEMBER ${if_match ${exec date +"%m"} == 8}${color}${else}${color1}${endif}AUGUST ${color1}${if_match ${exec date +"%m"} == 12}${color}${else}${color1}${endif}DECEMBER ${color1}${color}TWO THOUSAND & ${color1}${if_match ${exec date +"%y"} == 14}${color}${else}${color1}${endif}FOURTEEN ${color1}${if_match ${exec date +"%y"} == 13}${color}${else}${color1}${endif}THIRTEEN${if_match ${exec date +"%y"} == 12}${color}${else}${color1}${endif}TWELVE ${color1}${if_match ${exec date +"%y"} == 11}${color}${else}${color1}${endif}ELEVEN
OK, that's it ... I've had it ... these are going up on CPS If you did this, who did the original "clock" one?
Last edited by Sector11 (2011-05-12 13:48:22)
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
I just did some cosmetic editing and rejiggered some of it to get current years in it so far. Hopefully by the end of the weekend I can get the logic cleaned. The original script and logic of the conky qlocktwo were from aslamp and the qalender from mhatman2.
Offline
I just did some cosmetic editing and rejiggered some of it to get current years in it so far. Hopefully by the end of the weekend I can get the logic cleaned. The original script and logic of the conky qlocktwo were from aslamp and the qalender from mhatman2.
Perfect, I'll wait until you do you thing, no rush, but it's really a plus tho know who the originators are.
Thank you.
I see two new conkys coming to my desktop. 
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Having trouble with Conky under jwm.
I want the conky window to be at the right of the screen and to be 200 pixels wide. It behaves as expected under Openbox, but it spans the whole 1024x600 screen under jwm.
Did some searching here and elsewhere, but not seeing anything on this. Does anyone have a suggestion?

2011-05-13-070922_1024x600_scrot by Flint-Hill, on Flickr
Here's the conkyrc
tranche@fidget:~$ cat .conkyrc
double_buffer yes
update_interval 2.0
background no
own_window yes
# eliminates shadow around conky when compositing is on -- tranche
own_window_type desktop
# adding gap_y line prevents cutoff at bottom of screen -- tranche
gap_x 40
gap_y 40
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
use_xft yes
override_utf8_locale yes
xftfont Comic Sans Ms Mono:size=7
xftalpha 0.8
draw_shades no
draw_outline no
draw_borders no
uppercase no
use_spacer right
border_inner_margin 9
border_width 20
default_color ivory
default_shade_color black
default_outline_color black
alignment top_right
# maximum_width 200
minimum_size 200
gap_x 9
gap_y 9
# lua_load ~/.conky/cpu-rat-func.lua
TEXT
#$color$stippled_hr
host: $nodename${alignr}time: ${time %d %b %H:%M}
ver: $kernel ${alignr}up: $uptime
battery: $battery_percent% ${alignr}cpu temp: ${hwmon 0 temp 1} C
lan: ${addr eth0} ${alignr} wlan: ${addr eth1}
${color}usage:$cpu%${alignr}processes: $processes
# ${alignr}gateway: ${gw_ip}
#$color$stippled_hr
1 ${freq_g 1} ${cpubar cpu1, 3, 200}
2 ${freq_g 2} ${cpubar cpu2, 3, 200}
3 ${freq_g 3} ${cpubar cpu3, 3, 200}
4 ${freq_g 4} ${cpubar cpu4, 3, 200}
ram: ${alignr}${memperc}% (${mem} / ${memmax})
swap: ${alignr}${swapperc}% (${swap}/ ${swapmax})
disk: ${alignr}${fs_used_perc /}% (${fs_used /} / ${fs_size /})
cache: ${alignr}${cached}
buffers: ${alignr}${buffers}
net down: $color${downspeed eth1}k/s ${alignr}up: ${upspeed eth1}k/s
${alignr}cpu
${color}${top name 1}${alignr}${top cpu 1}
${color}${top name 2}${alignr}${top cpu 2}
${top name 3}${alignr}${top cpu 3}
${top name 4}${alignr}${top cpu 4}
${top name 5}${alignr}${top cpu 5}
${top name 6}${alignr}${top cpu 6}
${top name 7}${alignr}${top cpu 7}
${top name 8}${alignr}${top cpu 8}
${top name 9}${alignr}${top cpu 9}
${top name 10}${alignr}${top cpu 10}
${alignr}mem
${color}${top_mem name 1}${alignr}${top_mem mem 1}
${color}${top_mem name 2}${alignr}${top_mem mem 2}
${top_mem name 3}${alignr}${top_mem mem 3}
${top_mem name 4}${alignr}${top_mem mem 4}
${top_mem name 5}${alignr}${top_mem mem 5}
${top_mem name 6}${alignr}${top_mem mem 6}
${top_mem name 7}${alignr}${top_mem mem 7}
${top_mem name 8}${alignr}${top_mem mem 8}
${top_mem name 9}${alignr}${top_mem mem 9}
${top_mem name 10}${alignr}${top_mem mem 10}
# Alt+F2$alignr Run Dialog
# Alt+F3$alignr Alt Menu
# Super+Space$alignr Main Menu
# Super+Tab$alignr Client Menu
# Super+t$alignr Terminal
# Super+f$alignr File Manager
# Super+e$alignr Editor
# Super+m$alignr Media Player
# Super+w$alignr Web Browser
# Super+l$alignr Lock Screen
# Super+v$alignr Volume Control
# Super+x$alignr Logout
# PrtSc$alignr Screenshot
# # inspired by moos page 8 of "post your .conkyrc files"
# at ubuntu forums
# he's at www.dorstmuziek.nlOffline
Having trouble with Conky under jwm.
I want the conky window to be at the right of the screen and to be 200 pixels wide. It behaves as expected under Openbox, but it spans the whole 1024x600 screen under jwm.
Did some searching here and elsewhere, but not seeing anything on this. Does anyone have a suggestion?
2011-05-13-070922_1024x600_scrot by Flint-Hill, on FlickrHere's the conkyrc
# maximum_width 200
minimum_size 200These two command are becoming VERY important as of late. It seems that people really need them where before they were created the maximum width of a conky was your longest line.
Now if you don't use them strange things happen - like screen wide conkys or conkys that get info cut off.
Uncomment:
# maximum_width 200and you'll probably find it works.
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.