Commit Graph

242 Commits

Author SHA1 Message Date
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
Adrian C. (anrxc) aed924512e README: fixed some typos 2009-10-02 20:20:37 +02:00
Adrian C. (anrxc) f9335668c1 README: updated gmail information 2009-10-01 12:11:21 +02:00
Adrian C. (anrxc) f99a74b7c8 gmail: count all unread messages
Widget now uses the Gmail unread tag to get a list of all unread
messages, not only the Inbox. The auth argument was removed, and login
information should now be placed directly in the widget (and file made
read-only by user) until a safer storage is introduced.
2009-10-01 12:08:39 +02:00
Adrian C. (anrxc) 5dac6a44fd mboxc: support for multiple mbox files
Widget takes a table with full paths to mbox files as an argument.
2009-10-01 11:46:28 +02:00
Adrian C. (anrxc) 32fe7703c0 README: fixes from git-diff --check 2009-09-29 23:08:18 +02:00
Adrian C. (anrxc) b0f737ea56 Rewrote all headers 2009-09-29 22:33:19 +02:00
Adrian C. (anrxc) 8e544fd91b Next release, tag 1.0.16 2009-09-25 21:53:22 +02:00
Adrian C. (anrxc) b8f288b6e5 README: clarified caching usage 2009-09-25 21:49:55 +02:00
Adrian C. (anrxc) 46a7241015 README: added more caching information 2009-09-25 21:31:20 +02:00
Adrian C. (anrxc) eadf0c93e1 Caching is controlled by users 2009-09-25 21:16:55 +02:00
Adrian C. (anrxc) 09457245e9 README: minor fix in mem widget example 2009-09-24 16:12:20 +02:00
Adrian C. (anrxc) 51d52551a3 README: include pbar/graph properties in examples 2009-09-21 02:01:12 +02:00