Permalink
Browse files

2nd attempt to fix lua params

Lua just don't like 0's as param
  • Loading branch information...
1 parent 5186b4c commit 3e2e4fa2fb43d80f6f92caec428032e983cf0897 @android-808 android-808 committed Sep 16, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 conkycolors/scripts/conkySLS.lua
  2. +1 −1 src/conkyrc_sls.c
@@ -888,7 +888,7 @@ function conky_main(color, theme, drawbg, weather_code, battery_value)
-- BATTERY
for i=1,2 do
settings={
- value=tonumber(conky_parse("${battery_percent BAT" .. tostring(battery_value) .. "}")),
+ value=tonumber(conky_parse("${battery_percent " .. battery_value .. "}")),
value_max=100 ,
x=xp , y=yp ,
divisions=29 ,
@@ -905,7 +905,7 @@ function conky_main(color, theme, drawbg, weather_code, battery_value)
end
for i=1,4 do
settings={
- value=tonumber(conky_parse("${battery_percent BAT" .. tostring(battery_value) .. "}")),
+ value=tonumber(conky_parse("${battery_percent " .. battery_value .. "}")),
value_max=100 ,
x=xp , y=yp ,
divisions=30 ,
@@ -922,7 +922,7 @@ function conky_main(color, theme, drawbg, weather_code, battery_value)
end
for i=1,2 do
settings={
- value=tonumber(conky_parse("${battery_percent BAT" .. tostring(battery_value) .. "}")),
+ value=tonumber(conky_parse("${battery_percent " .. battery_value .. "}")),
value_max=100 ,
x=xp , y=yp ,
divisions=29 ,
@@ -938,7 +938,7 @@ function conky_main(color, theme, drawbg, weather_code, battery_value)
yp = yp + 5
end
settings = {
- txt=conky_parse("${battery_percent BAT" .. tostring(battery_value) .. "}") .. '%',
+ txt=conky_parse("${battery_percent " .. battery_value .. "}") .. '%',
x=200 , y=235 ,
txt_weight=1 , txt_size=14 ,
txt_fg_colour=bgc , txt_fg_alpha=1 ,
View
@@ -125,7 +125,7 @@ void conkyrc_sls () {
fprintf(fp,"%s ", weather_code );
//BATTERY
- fprintf(fp,"%i ", battery_value );
+ fprintf(fp,"BAT%i ", battery_value );
fprintf(fp,"\n");
fprintf(fp,"\n");

0 comments on commit 3e2e4fa

Please sign in to comment.