Well, not really. I don't dare putting it all together into a single
source file, as that would just not make sense. Instead, this patch
eliminates the --enable-smapi configure option and all related checks,
replacing them with the equivalents from --enable-ibm.
Despite this is actually not much code and could stay inside linux.c as
well, this makes sense as I want to combine smapi and ibm-acpi
functionality. Virtually every user of a notebook made by IBM/Lenovo
will want both, so this should be a feature not a bug.
Besides making the ibm-acpi objects being built optionally, this should
not change anything to the code flow.
* change the height of execbar and execibar to be the same as other
bars have by default (6 pixels)
* treat mixer values as percentages as they're usually 0-100 (switch
to spaced_print() with pad_percents)
* change temp_print() from snprintf() to spaced_print()
* remove decimals from temp_print() as none of the current sources can
supply values smaller than 1 degree (C or F, doesn't matter)
* add a space between number and the unit in human_readable()
* fix number printing in human_readable()
* network $upspeed and $downspeed now use human_readable()
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 was a bug, not a feature. From the FreeBSD manpage rtentry(9):
| Vt struct sockaddr *rt_gateway;
|
| The "target" of the route, which can either represent a destination in
| its own right (some protocols will put a link-layer address here), or
| some intermediate stop on the way to that destination (if the
| RTF_GATEWAY flag is set).
So for a default route with "dest" and "mask" both zero, either
RTF_GATEWAY is present, or "gate" is zero.
The new command line option '-D' ('--debug') increases debugging level by one.
For debugging output a user could be interested in, use the macros DEBUG() and
DEBUG2(). Functionality is equal to the ERR() macro. DEBUG2() prints stuff only
if debugging level is greater one, which means that '--debug' has been
specified more than once. This patch also includes usage of the macros for the
new template object (as debugging syntax errors in templates is one thing a
user potentially needs to do).
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1273 7f574dfc-610e-0410-a909-a81674777703
Basically you can define a template like this:
| template0 \1:\n ${fs_free \2} / ${fs_used \2}
and use it later like this:
| ${template0 root /}
| ${template0 boot /boot}
which is exactly the same as the following:
| root:
| ${fs_free /} / ${fs_used /}
| boot:
| ${fs_free /boot} / ${fs_used /boot}
hope you like it, I do already. :)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1270 7f574dfc-610e-0410-a909-a81674777703