Download, parse and display METAR data from the NWS.
icao must be a valid icao for the required location
(see for instance https://pilotweb.nas.faa.gov/qryhtml/icao/).
data_type must be one of the following:
last_update : display the date (yyyy/mm/dd) and time (UTC)
of the last update.
temperature_C : display air temperature in degree Celsius.
temperature_F : display air temperature in degree Fahrenheit.
cloud_cover : display the highest cloud cover status.
pressure : display air pressure in millibar.
wind_speed : display wind speed in km/hour.
wind_dir : display wind direction.
wind_dir_DEG : display compass wind direction.
humidity : display relative humidity in %.
weather : display any relevant weather event (rain, snow, etc.).
delay_in_minutes (optional, default 30) cannot be lower than 30 min.
Up to 3 stations can be simultaneously queried.
Use --enable-weather to compile this in.
Most MPD clients read the MPD_HOST and MPD_PORT
environment variables. Now, conky will too.
MPD_HOST can be either "hostname" or "password@hostname".
If a user specifies a host in the configuration, the
password set in MPD_HOST will be ignored. This is to
prevent the password from being sent to the wrong host.
In other words, if the host is specified in the conky
configuration, the password must be too (if there is
one).
Signed-off-by: Brenden Matthews <brenden@rty.ca>
The panel type reserves space along the edge of the
screen, just like regular DE panels, taskbars and the
like. I have tested it for several hours now with lots
of different settings, and it seems to be working fine.
Works especially well with alignment top_??? or
bottom_??? and single-line output. Something like
this:
own_window yes
own_window_type panel
alignment bottom_left
maximum_width 1680
minimum_size 1680
gap_x 0
gap_y 0
stippled_borders 1
draw_borders yes
update_interval 3.0
TEXT
$nodename $tab $freq_g ${color grey}GHz$color $tab $memperc% ${color grey}RAM$color $tab $cpu% ${color grey}CPU $tab etc...etc...$alignr${time %F %R}
The line after TEXT is supposed to be on one line,
just in case some channel has messed it up.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
One useless "if (own_window)" check was removed. It is already inside another
identical check, and so will always evaluate to true.
One strncmp against the word "dock" was limited to four characters instead of
seven, for consistency with the other checks in the configuration parsing code.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Basically, I just added three new process properties (io_read, io_write, io_perc - representing
the amount of I/O done by the process during the update interval) and $top_io, that sorts
processes based on io_perc.
Atm, it's completely #ifdef'd, since it requires kernel support. But that creates some wierd
looking syntax at some places, so it may be better to remove some ifdefs. It even may be
possible to completely remove the ifdefs (ie. convert them to #ifdef linux) since the code will
compile just fine even if the kernel doesn't support I/O accounting. I'll leave that for someone
else to decide.
When a '#' is found in TEXT, section remove_comments() is called. However, that function doesn't
limit itself to removing that particular comment. Instead, it greedily removes all "comments" from
the string, including those in ${color $abcdef} constructs. This, obviously, makes a mess of
things.
Solution: I added a new function, remove_comment(), that only removes the current comment.
Note: Atm, the function doesn't delete the newline, since that was the current behavior, and is
the natural one for the config section. However, for the TEXT it seems better to delete the \n
too, to avoid blank lines.
Note2: this also fixes the bug in strfold(), which incorectly copied the string, truncating it by
one byte.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Closing the X display on reload caused some weirdness. We can just
leave it open between reloads. For whatever reason we had a macro
inside quotes for the default net device.
Changed llua_getinteger() to llua_getnumber() returning a double, so
that you can use floating point values in graphs etc. Lua graph will
scale like other graphs (except execgraph) by default now, and you can
manually set a scale with the scale argument.
In general, initialising last_update_time to next_update_time upon
startup doesn't make sense, as some update functions check for the
distance between the two being higher than a given epsilon to prevent
updating too often. This means that they won't trigger when
update_stuff() is being run for the first time.
When you started "$updates|${addr eth0}" displayed "0|No Address",
after the first update you got something normal like "1|192.168.0.1"
This patch should fix this.
part of the template-handling code was in #ifdef X11, which caused conky to dump core when
compiled without x11.
as a bonus, I changed tests !=' ' to !isspace in two places as it was causing strange effects
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Conky would dump core when encountering templates with no parameters (both $templateX and
${templateX}) and when the line contained improperly nested {}.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
The if_existing with 2 arguments checking whether a file contains a specified
string did not work. This is fixed by this patch.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
See docs for more details on 'temperature gradients', which can be
turned on with the -t switch on graphs. Also improved parsing of
options with $execgraph and $execigraph, but may cause some breakage.
Altough the following configuration is wrong, it should only produce a error
about a missing $endif but instead it also produced a segmentation fault:
TEXT
$if_gw$gw_ip$else
All lines behind a comment line were also removed, comments should also be able
to start in the middle of line, \# shouldn't be replaced if it's in a comment