Commit Graph

154 Commits

Author SHA1 Message Date
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
Adrian C. (anrxc) b185e96494 mbox: don't hide when there is no mail 2009-10-04 00:28:54 +02:00
Adrian C. (anrxc) 724366c038 Reworked some variables in entropy, load, mpd, net, init 2009-10-04 00:21:15 +02:00
Adrian C. (anrxc) 643ecb0287 date: function simplified 2009-10-04 00:06:05 +02:00
Adrian C. (anrxc) 3d97d44a02 cpuinf: prepend 'cpu' to CPU ID in table keys
Keys like cpu0 are more suitable, because they match cpufreq widget
arguments. Instead of old format strings, like: ${0 mhz} now use:
${cpu0 mhz}
2009-10-02 23:31:46 +02:00
Adrian C. (anrxc) 0d5f07b86e README: included 'Other uses' section
Vicious modules can be resued for other objects, like awful tooltips
or naughty notifications. We call a module directly and manipulate the
result until we have some nice output to display. For example, a wifi
widget could be a progressbar with the signal level, but on mouse
enter a tooltip is created with ssid/mode/channel information.
2009-10-02 22:46:12 +02:00
Adrian C. (anrxc) 9d518b83a9 volume: added mute support
If a channel is muted we return 0. Something like "Muted" would be
nice, but lets not break progressbars. If it doesn't concern you, then
return what ever you want...
2009-10-02 21:48:05 +02:00
Adrian C. (anrxc) ddf9646b5e thermal: added some comments
We still stick to ACPI thermal zones because they are most commonly
exposed (with proper ACPI modules loaded). But if you can find another
source of temperature exposed trough /sys use it. Current code should
match a lot of sources, but in some cases you will want to modify it a
bit, add a dot, or limit to two numbers (except when the value is
100+, you don't want to miss the fact your CPU is melting).
2009-10-02 20:52:46 +02:00
Adrian C. (anrxc) 0e863a5249 bat: coding style changes 2009-10-02 20:33:58 +02:00
Adrian C. (anrxc) 44f95c3651 cpufreq: widget type rewritten
It also won't break anymore when voltage support is missing since it
happens so often. But there are no handlers for the frequency or
governors - if you don't have those what the hell are you doing with
this widget anyway?
2009-10-02 20:21:21 +02:00