Okay, you see this part?
Code:
{
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=40,
bg_colour={0xFFFFFF,0.25},
fg_colour={0xFF0000,0.6},
alarm_colour={0x00FF00,0.6},
x=94,y=472,
blocks=42,
space=1,
height=2,width=8,
angle=90,
smooth=true,
mid_colour={{0.5,0xFFFF00,0.6}}
},
You can, I believe, chunk the whole thing together like this:
Code:
local something1=tonumber(conky_parse('${if_existing /sys/class/net/wlan0/operstate up}1${else}0${endif}'))
local something1=tonumber(conky_parse('${if_existing /sys/class/net/wlan1/operstate up}1${else}0${endif}'))
if something1==1 then
{
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=40,
bg_colour={0xFFFFFF,0.25},
fg_colour={0xFF0000,0.6},
alarm_colour={0x00FF00,0.6},
x=94,y=472,
blocks=42,
space=1,
height=2,width=8,
angle=90,
smooth=true,
mid_colour={{0.5,0xFFFF00,0.6}}
},
elseif something2==1 then
{
name="wireless_link_qual_perc",
arg="wlan1",
max=100,
alarm=40,
bg_colour={0xFFFFFF,0.25},
fg_colour={0xFF0000,0.6},
alarm_colour={0x00FF00,0.6},
x=94,y=472,
blocks=42,
space=1,
height=2,width=8,
angle=90,
smooth=true,
mid_colour={{0.5,0xFFFF00,0.6}}
},
else
end
I BELIEVE. It should work, though if there's a problem, someone else can happily join in and I won't be offended.
It's stupid-easy. "If all else fails, parse it with conky and send the results in an if statement, deciding what configuration to use, if at all."
I STILL maintain I feel stupid about it, and I'm completely comfortable in it's use already.
Bookmarks