In theory, this may fail to compile on ancient systems that don't have IPv6 types (struct
sockaddr_in6 et al.) available. If it turns out that such systems are still in use, the best way
to solve it would be to provide dummy declarations via configure tests.
The problem with the original commit was that some session-managers set
stdin to /dev/null for the processes they launch, therefore the variable
wasn't very effective.
This commit change the variable conky_user_time to user_time.
This variable has a mandatory argument, a console identifier
(eg. tty7, pts/0, etc.).
Once called, this will list how long the user for the given console has been
logged in for.
This commit also allows multiple user_time to be specified for different
consoles, as well as correctly handle a conky restart.
the manpage says the hex color string should include the '#', but that's not true (not now,
anyway). Also, the syntax highlighting is wrong, but i don't know how to fix that.
The bug reporter asks if it is possible to add a variable giving the "current
user time" only, since the variable user_times reports the times for ALL
logged users.
AFAIK, the only info one can gather inside conky, is the login time for the
tty connected to conky's standard input.
This commit adds support for it (it should work on any posix compliant *nix).
Note that in coherence with the definition, the variable is called
conky_user_time (for a single user stand-alone machine used as a desktop
this would be the "current" user time).
All ERR()'s are renamed to NORM_ERR() and box to mbox so that they don't
clash with things in ncurses.h .
Ncurses is enabled by default when building conky but can be disabled with
--disable-ncurses .
At the moment configure doesn't check if ncurses is actually available.
I'm adding support for ncurses so that we can make as much things as possible
that are only available in X11 also available in console in the future.
The alias option was broken by fb8ccd7a05,
and it seems like trying to make it work again will only result in
breakage for env var substitution anyway.
Added conky_set_update_interval() API call, which allows you to change
Conky's update interval from a Lua script. Added the 'conky_info' table
to global Lua context, which still needs populating with stuff (right
now it only contains the current update interval and the system uptime).
Added support for X alignment across multi-lined objects (i.e., using
$alignr with $exec). This may be a bit buggy. Disabled OpenMP code
until GCC's implementation stabilizes (it's causing too many problems).
A couple Lua API changes.
First of all, we may or may not agree, but I consider reverting my
commits without prior discussion as a minimum unpolite.
I also don't like sites that oblige to register, thats the very reason
why I went with noaa first (and why I use that myself).
Howver, weather.com has a couple of nice features forom an user
viewpoint:
1. Their icons can be used to add a visual quality to the weather
report.
2. They have forecast data, which is not possible to have with noaa
(using TAF its an option, but its going to be very difficult and will
be limited in time and scope).
Nobody is obliged to do anything, people who likes noaa will use noaa,
people that don't mind register or wants the additional benefit will use
weather.com.
Having libxms2 as a dragged depends is, first of all, also with other
options (rss and eve), second we can try to work around it with an
additional compilation flag if really deemed necessary.
This reverts commit d872562942.
I am not really comfortable with adding support to the conky-code
for sites that only work when you register, that's more something
for in a script.
But the biggest reason I undid the commits is that it is now
impossible to compile conky with support for weather if you don't
have the xml libs installed. Users used to be able to compile with
support for weather (using the other site) without xml2.
If you really want to include this other site in the conky code
then split WEATHER in WEATHERCOM and WEATHERNOAA (altough my personal
opinion is that weather.com should only be supported with scripts)
I moved the weather stuff into its own thread, and also fixed up some
abuse of <simplelist> formatting throughout the docs. Hopefully we can
keep things a little more uniform from now on.
Should work with any window manager that supports the
freedesktop.org Window Manager Specification
(see http://www.freedesktop.org/wiki/Specifications/wm-spec).
I have tested succesfully with openbox but some more testing with other
wm would be needed!
Support is built-in; if it is not acceptable to loose cpu cycles for this
at every conky refresh step than it should be conditionally compiled.
Improved Lua API (lua_read_parse has been removed in favour of the
conky_parse() Lua API call). The docs have been improved to reflect the
recent Lua API stuff as well. Introduced new Lua Cairo and Imlib2
bindings, which require the tolua++ tool. Fixed some other
miscellaneous doc related things.
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.
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>
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.
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.
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.
Also undid the last change because sony.h was not included, feel free to submit
it again if you include this file and other sourcefiles needed (there is also
no definition of get_sony_fanspeed). If sony systems already have this file and
a definition of this function, please update the configure file so that support
for this is disabled by default and can be enabled by sony owners.
Added the (incomplete) check_docs.py, to 'synchronize' the docs with the
code, as well as vim/nano syntax stuff.
Removed some unused OBJ_* stuff from text_objects.h, and updated docs
with some missing things. Also removed a couple deprecated objects
which were still documented.
The inconsistent naming of the cpu parameter in the docs led me to this,
so I also simplified parsing by introducing the macro SCAN_CPU(). Note
that this introduces a syntactical change to the config: the cpuN
argument now has to be passed at first position to $cpugraph.
If you're using `less' to view the readme, it should display properly.
If we run the man page through `col', it results in weird characters
hanging around.
This object makes use of the possibility to escape dollar signs in TEXT.
Take the following example in the conkyrc:
| $${downspeed ${gw_iface}}
will be evaluated to (assuming the gw_iface is eth0):
| ${downspeed eth0}
and finally interpreted to print the gateway interface's downspeed rate.
This patch is written by a anonymous author, see patch on sf.net
id #2663691 . I changed it a bit so that it can't overwrite
existing environment variables and updated the docs and syntaxfiles
With my last patch I did only update the XML documentation file without
updating the auto-generated manpage and README file.
This patch also updates README and conky.1.
In general, argument types should match, but for combined long and
double usage the long is being converted to double before evaluation.
A few examples:
${if_match ${cpu} < 30}
${if_match "asdf" != "qwer"}
${if_match 0.5 < 0.50001}
${if_match 49.999 < 50}
The crux is to split args between those for scan_graph() on one hand and
prepare_diskio_stat() on the other hand. To make the code working with
minimal changes, move the yet optional devicename to the end.
General note on graphs:
- for all graphs there exist the optional arguments for scan_graph()
which come first and are optional (intended duplicate)
- all other args are object specific, and may be optional as well
This introduces a new configuration variable called "temperature_unit",
specifying the unit of all temperature sensors. To achieve this, each
object outputting a temperature has to call temp_print() like so:
| temp_print(p, p_max_size, <temp val as double>, <unit of val>);
to specify the input temperature unit, either one of the constants
TEMP_CELSIUS or TEMP_FAHRENHEIT.