interesting, that in dev version or in 1.8.x it is no longer true ;P
interesting, that in dev version or in 1.8.x it is no longer true ;P
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Since I can't write a script - I need help.
Unfortunately, if_match does NOT evaluate "><" (greater than or less than)if_match - - expression - - - Evaluates the given boolean expression, printing everything between $if_match and the matching $endif depending on whether the evaluation returns true or not. Valid expressions consist of a left side, an operator and a right side. Left and right sides are being parsed for contained text objects before evaluation. Recognised left and right side types are:
* double - Argument consists of only digits and a single dot.
* long - Argument consists of only digits.
* string - Argument is enclosed in quotation mark or the checks for double and long failed before.
Valid operands are: '>', '<', '>=', '<=', '==', '!='.
Sooooooooooo:
${if_match ${time %y} == 00}${color}${else}${color4}
${if_match ${time %y} == 01}${color}${else}${color4}
${if_match ${time %y} == 02}${color}${else}${color4}
${if_match ${time %y} == 03}${color}${else}${color4}
${if_match ${time %y} == 04}${color}${else}${color4}
- - - {snip a whole bunch}
${if_match ${time %y} == 94}${color}${else}${color4}
${if_match ${time %y} == 95}${color}${else}${color4}
${if_match ${time %y} == 96}${color}${else}${color4}
${if_match ${time %y} == 97}${color}${else}${color4}
${if_match ${time %y} == 98}${color}${else}${color4}
${if_match ${time %y} == 99}${color}${else}${color4}
all on one line and ending with 100 ${endif} statements is a tad much
Any scripter out the that can take:
${time %y}/10 = I.D (Intiger point Deciaml)
Then I could do
${if_match ${I} == 0}${color}${else}${color4}
${if_match ${I} == 1}${color}${else}${color4}
${if_match ${I} == 2}${color}${else}${color4}
${if_match ${I} == 3}${color}${else}${color4}
${if_match ${I} == 4}${color}${else}${color4}
${if_match ${I} == 5}${color}${else}${color4}
${if_match ${I} == 6}${color}${else}${color4}
${if_match ${I} == 7}${color}${else}${color4}
${if_match ${I} == 8}${color}${else}${color4}
${if_match ${I} == 9}${color}${else}${color4}
on one line with 9 ${endif} statements
and continue with${else}
${if_match ${D} == 0}${color}${else}${color4}
${if_match ${D} == 1}${color}${else}${color4}
${if_match ${D} == 2}${color}${else}${color4}
${if_match ${D} == 3}${color}${else}${color4}
${if_match ${D} == 4}${color}${else}${color4}
${if_match ${D} == 5}${color}${else}${color4}
${if_match ${D} == 6}${color}${else}${color4}
${if_match ${D} == 7}${color}${else}${color4}
${if_match ${D} == 8}${color}${else}${color4}
${if_match ${D} == 9}${color}${else}${color4}
on one line with 9 ${endif} statements
Anyone up to a challange?
Thanks, Have a nice day.
Bruce
Last edited by Bruce M.; February 4th, 2010 at 08:06 PM.
Valid operands are: '>', '<', '>=', '<=', '==', '!='.
There are 100 years in a century, if I use '==' I need 100 ${if_matching}, 100 ${else} and 100 ${endif} statements.
If I use '>=' it's the same because I'll need 100 >= statements.
I need the "Decades" and the "Years" ie: 61/10 = 6.1 filter the 6 and the 1 as two separate variables and I'm down to 18 of eaxt ${ifmatching ${else} and ${endif} A lot less computer intensive.
I want to fill the space.
CHIMO!
Bruce
Last edited by Bruce M.; February 4th, 2010 at 10:02 PM.
Last edited by dk75; February 6th, 2010 at 01:24 AM.
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Last edited by mobilediesel; February 6th, 2010 at 02:31 AM. Reason: I had more than that typed...
As I post my entry for the January's CotM here, I just want to say THANKS to all people who vote for my conky script because I won this contest !!
Also I updated this script, with :
- today's date can now be set anywere in the arc : yoffset
- today's date can now have an offset (positive or negative) : xoffset
- the main thing is that the calendar is draw only at the start of the conky and when the date change (i.e. the calendar is saved in a PNG file and this is this file that will be displayed in the conky) or if the PNG file is deleted : so the conky become really really fast ...
- it can be drawn on the right side of the screen
(more info on my blog)
Edit 22 Feb 2010, new version (1.3) with minor changes can be downloaded in the attachments
Edit 01 April 2010, version 1.3a : updatedREADME with some feedbacks I received
Edit 6 april 2010 - v1.4 : This calendar is now a widget and it can be call with a simple function with some parameters. To use the calendar, you don't need to copy/paste the code in your lua script, just import the script file with his path (more infos in the README):
Edit 7 april 2010 - v1.4.1 : new parameters for font and alpha of text info and for calendar.txt fileCode:dofile("/home/wlourf/calendar/calendar.lua")
Last edited by wlourf; April 7th, 2010 at 05:01 PM. Reason: version 1.4.1
Hey wlourf,
Congrats for your conky.
I was trying to make it work in my desktop (latest version)
and I've got a problem.
Things are doing fine and calendar is working
but when I click out of its layer, it disappears.
(see attachment, the layer's end is visible on the right)
(btw, I don't know if it matters but I changed the size to 300x800 for other conky's sake)
Don't want the century, just the "decade" and the "year" number For example next year will be 2011 so I need it to look like:
and in 2012X O O X 0 0
0 0 0 0 0 0
0 0 0 0 0 0
and "!=" would be a case of another 100 commands.Code:X 0 0 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0
Have a nice day
Bruce
will give you decadeCode:echo $(date +%y) |cut -c1
will give you year in that decadeCode:echo $(date +%y) |cut -c2
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Bookmarks