Commit Graph

163 Commits

Author SHA1 Message Date
Michael Unterkalmsteiner 1790abb0ed hddtemp: adapt regex to match disks like /dev/sg0
The regular expression did not match the following output from
hddtemp: |/dev/sg0|ST9160823ASG|38|C|. Fixed by allowing digits in the
"disk" part of the expression.

Signed-off-by: Michael Unterkalmsteiner <miciu@gmx.de>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2009-11-12 01:41:57 +01:00
Adrian C. (anrxc) 249294551e fs: minor coding style change 2009-11-12 01:41:33 +01:00
Hiltjo Posthuma f5b47dca8b mdir: support for multiple directories
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2009-11-12 01:40:16 +01:00
Adrian C. (anrxc) 1d0cfd3aed Cleanup widgets that use pathtotable helper 2009-11-11 14:32:37 +01:00
Adrian C. (anrxc) 76942d17a4 helpers: simplify pathtotable, patch by filmor 2009-11-11 14:30:26 +01:00
Adrian C. (anrxc) 26c1f078d9 Next release, tag 1.0.19 2009-11-11 04:44:36 +01:00
Adrian C. (anrxc) 2e9b811770 README: document new truncate and scroll usage 2009-11-11 04:36:30 +01:00
Adrian C. (anrxc) d0aa48afb8 entropy: widget rewritten, poolsize no longer an argument 2009-11-11 03:56:43 +01:00
Adrian C. (anrxc) 493150c888 uptime: merged with load widget type
Total uptime and seconds are no longer returned. Returns are now:
days, hours, minutes, load avg 1, load avg 5 and load avg 15.
2009-11-11 03:55:03 +01:00
Adrian C. (anrxc) 7be560b70c bat: widget rewritten for sysfs
This also means that it replaces batsys, and we are left with only
one, universal, battery widget.
2009-11-11 03:50:25 +01:00
Adrian C. (anrxc) a99c1cf118 cpufreq: widget rewritten, governor symbols enabled 2009-11-11 03:15:56 +01:00
Adrian C. (anrxc) 5f9818f9d3 dio: widget type rewritten
I wrote this module with graphs in mind and returned values were
somewhat hostile towards textbox widgets. Now KB/MB values are
formatted to one decimal point. There is still work to be done.
2009-11-11 03:00:33 +01:00
Adrian C. (anrxc) 92be5fbae5 thermal: widget rewritten for sysfs
Default path is set to /sys/class/thermal but at least it's easier to
switch to /sys/class/hwmon (i.e. coretemp) now without much code
modification. Note; zone IDs are probably different than those in
/proc/acpi/thermal_zone
2009-11-11 02:57:30 +01:00
Adrian C. (anrxc) 46d52face8 helpers: import pathtotable
This helper exposes paths as Lua tables. It will help simplify a lot
of widgets. Thanks to Benedikt Sauer for the original idea.
2009-11-11 02:43:11 +01:00
Adrian C. (anrxc) eb661f6e17 batsys: add note about other charge/rate sources
As in capacity case maybe there are other rate sources. Exposed in
different files depending on the implementation?
2009-11-10 16:18:39 +01:00
Adrian C. (anrxc) 6fadee6fb5 batsys: don't return 0 if only rate is missing 2009-11-10 16:10:20 +01:00
Adrian C. (anrxc) 8e21d264d2 batat: widget type removed, now available in the contrib branch
This was one of the first widgets on top of Wicked, now that we have
both procfs and sysfs covered there is no need to keep it in master.
2009-11-10 15:53:04 +01:00
Adrian C. (anrxc) e66e5075a0 batsys: import battery widget that uses sysfs
Initial widget code was sent by Benedikt Sauer. After some cleanup it
is ready to go into master. It uses data exposed trough /sys and it is
used in the exact same way as the bat widget (and /proc). This widget
will replace batat and acpitool, it will be moved to contrib and
retired.
2009-11-10 15:46:54 +01:00
Adrian C. (anrxc) 896df4dd98 De-obfuscate e-mail address 2009-11-04 23:39:38 +01:00
Adrian C. (anrxc) 94cf0b7d7f Minor changes in mboxc and org 2009-11-03 01:38:43 +01:00
Adrian C. (anrxc) 44d943d024 gmail: add scrolling support and truncate control
Same as the mpd widget. No argument, string is returned in
full. Number enables truncate. Table enables scrolling.
2009-11-03 01:34:48 +01:00
Adrian C. (anrxc) 9e91408ccb mbox: add scrolling support and truncate control
Widget argument can now be a string (full path to the mbox) or a
table. In case of a table 1st field is full path to the mbox and 2nd
is maximum text lenght after which it will be truncated. If there is a
third field scrolling will be used - if so, 3rd field should be the
widget name.
2009-11-03 01:28:37 +01:00
Adrian C. (anrxc) 5ff8927b4b mpd: add scrolling support and truncate control
Widget takes an optional argument that controls truncate and
scrolling. In case of a number truncate is used, it represents the
maximum lenght of widget text. In case of a table scrolling is used,
1st field is maximum lenght, and 2nd is widget name. An example:
{24, "mpdwidget"}
2009-11-03 01:19:37 +01:00
Adrian C. (anrxc) 589feb1ce9 helpers: import scroll from Remy Clouard
First scroll helper, that provides an alternative to truncate. Text
shifts every time the widget is updated, there is no internal timer.
2009-11-03 01:09:46 +01:00
Adrian C. (anrxc) 0d73f6d8ae Ensure returned numbers are of type number
Thanks to Felix for bringing this to my attention. Obviously there was
already a safety net for feeding progressbars and graphs... and while
this makes for a good coding practice it's not a big deal. We have
widgets of type textbox for one, and a lot of string concatenation
happens. Strings are formatted, markup is applied...
2009-10-26 20:32:48 +01:00
Adrian C. (anrxc) b105ae21cd README: updated net description 2009-10-22 16:36:54 +02:00
Adrian C. (anrxc) 3dc7c5e308 net: unit formatting delegated to a function
This simplifies the code, in addition string.format is now used to
ensure all values have one decimal point at all time. We'll see how
recent changes and this one will affect people that use network graphs.
2009-10-22 16:15:53 +02:00
Adrian C. (anrxc) 5c6f544787 README: more information in Power section 2009-10-22 14:52:47 +02:00
Adrian C. (anrxc) 40d7881977 Adapt to awful.widget.graph max_value of 1
Vicious will now divide values by 100 to match the default graph
max_value of 1. Graphs support changing this value, but progressbars
don't. We shouldn't use 100 for one and 1 for the other.
2009-10-20 21:15:19 +02:00
Adrian C. (anrxc) 25ce79e4e5 batat: better returns when handling insufficient data
If we return "N/A" like we usually do then format string "$1$2" would
look like "N/AN/A". If "/" is returned a progressbar could be
broken. Now returns are: symbol for state "unknown", 0 for battery
charge, N/A for remaining time.
2009-10-16 16:53:31 +02:00
Adrian C. (anrxc) baa3612828 Next release, tag 1.0.18 2009-10-16 00:12:23 +02:00
Adrian C. (anrxc) 97d2ecbb19 bat: better returns when handling insufficient data
If we return "N/A" like we usually do then format string "$1$2" would
look like "N/AN/A". If "/" is returned a progressbar could be
broken. Now returns are: symbol for state "unknown", 0 for battery
charge, N/A for remaining time.
2009-10-15 23:38:55 +02:00
Adrian C. (anrxc) 4d1af1e5ad bat: better fix for ACPI, from bioe007
Previous commit had redudant string > number conversions, and only
covered one scenario - when battery is charged. bioe007 suggested to
use math.min. Now lets explain why this is needed. Some (lousy)
batteries report "remaining capacity" higher than "last full capacity"
when AC is connected. That leads to battery charges like "160%".
2009-10-15 23:11:36 +02:00
Adrian C. (anrxc) 2cfdd5aac7 bat: quick fix for broken BAT/ACPI implementations 2009-10-15 21:36:24 +02:00
Adrian C. (anrxc) 64464efbd4 README: removed obsolete widget names 2009-10-14 01:14:50 +02:00
Adrian C. (anrxc) 11985f6aed README: added padding example 2009-10-12 18:15:12 +02:00
Adrian C. (anrxc) feca5da29b mem: tonumber is redudant 2009-10-11 16:08:52 +02:00
Adrian C. (anrxc) 7f3d31e0cb uptime: fixed problem discovered by jabbas 2009-10-11 16:07:41 +02:00
Adrian C. (anrxc) 65e57fa9bf README: document tables returned by widget types 2009-10-10 00:24:23 +02:00
Adrian C. (anrxc) 893a85c386 README: caching documentation improved 2009-10-08 01:42:53 +02:00
Adrian C. (anrxc) 00e7b2d5a4 README: fixed disk i/o warg documentation 2009-10-07 22:31:06 +02:00
Adrian C. (anrxc) 0eea1a1bb6 cpu: simplified CPU identification 2009-10-07 22:06:27 +02:00
Adrian C. (anrxc) e252fd955a Next release, tag 1.0.17 2009-10-05 00:23:16 +02:00
Adrian C. (anrxc) a2b9de4e41 mem: widget type rewritten 2009-10-05 00:13:05 +02:00
Adrian C. (anrxc) c84f515690 mbox: read a 30kb chunk by default 2009-10-05 00:11:44 +02:00
Adrian C. (anrxc) 4602ca2fa5 Lots of coding style changes 2009-10-05 00:10:47 +02:00
Adrian C. (anrxc) af4e85f99d bat: added a handler for incompetent users
A lot of people expect widgets like this one to auto-magically work,
and somehow don't understand that *they* need to make sure there is a
source of information. Is ACPI module loaded? Is battery info exposed
in the same place that widget expects by default? You need to answer
those questions before loading the widget and sending me "bug"
reports.
2009-10-04 16:26:34 +02:00
Adrian C. (anrxc) fcf1027cb5 cpufreq: use string library for find/match 2009-10-04 00:55:56 +02:00
Adrian C. (anrxc) b4e028b21f Removed some useless else statements 2009-10-04 00:54:27 +02:00
Adrian C. (anrxc) b65d509380 Reworked counters in mboxc, mdir, org 2009-10-04 00:31:12 +02:00