Commit Graph

335 Commits

Author SHA1 Message Date
Adrian C. (anrxc) fac688ec4b wifi: add support for /usr/bin binary path
Years ago iwconfig started its life in /sbin. Then some distributions
moved it to /usr/bin. Then in 2012 some projects started pushing for
deprecation of /usr/sbin and merging everything into /usr/bin.

We now search paths including /usr/bin for the iwconfig binary. This
is because sbin paths are not usually in non privileged user PATH, so
we help io.popen locate the binary on the file-system.

We do this search in the following way:
  - default to basename only, 'iwconfig' for the iwconfig variable
  - search paths one by one once and redeclare variable iwconfig with
    full path if binary is found in any
  - avoid searching paths on next execution if iwconfig variable
    already contains a path
2013-05-27 17:51:58 +02:00
Adrian C. (anrxc) f7fdd909ee README: usage examples are for awesome version 3.4 2013-01-22 23:55:45 +01:00
Andrzej Bieniek d63343efda contrib: add buildbot monitoring widget
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-09-02 12:37:18 +02:00
Adrian C. (anrxc) 8f2f1559c1 Next release, tag 2.1.0 2012-08-25 22:18:12 +02:00
Adrian C. (anrxc) da37c0917a mdir: add support for maildir whitespaces
This feature was sent by pofman@free.fr.
2012-08-19 00:48:24 +02:00
Adrian C. (anrxc) eba6eb0573 README: prefer vicious in global space
We want to expose suspend, activate and force functions to external
shell scripts not just the Lua prompt.
2012-08-02 02:15:53 +02:00
Adrian C. (anrxc) c28bac5d71 uptime: metatable bugfix after lua52 port fixed by Jorg Thalheim 2012-06-25 22:35:10 +02:00
Adrian C. (anrxc) 3b161ffa28 contrib: document how to enable contributed widgets 2012-06-25 01:22:53 +02:00
Adrian C. (anrxc) e1c7c4772a os: change os.getenv init to allow standalone usage of os widget
Test case:
lua> foo = require("vicious.widgets.os")
lua> print(foo()[1])
     /usr/share/lua/5.1/vicious/widgets/os.lua:66: attempt to call
     field 'getenv' (a nil value)
2012-06-25 00:39:23 +02:00
Adrian C. (anrxc) 1a7b43068c contrib: initialization bugfix after lua52 port
The _NAME field was missing in the contrib table. Thanks to Jorg
Thalheim for reporting this.
2012-06-25 00:15:51 +02:00
Adrian C. (anrxc) 4caf95bfd0 README: update initialization instructions
With the Lua 5.2 port we change the way vicious is loaded as a module,
so that it remains backwards compatible with Lua 5.1 users. Also added
the author of the Lua 5.2 port to the contributors list.
2012-06-18 02:09:36 +02:00
Adrian C. (anrxc) 80d523ad93 bat: metatable bugfix after lua52 port 2012-06-18 02:01:29 +02:00
Adrian C. (anrxc) e929bea270 widgets: cleanup behind the last commit 363c03e 2012-06-18 01:31:42 +02:00
Arvydas Sidorenko 363c03e79c Fixed io.lines() bug
In Lua 5.2 io.lines() has to be used to iterate until EOF, otherwise
the fd will not be closed and eventually tons of naughty messages
will start to pop up saying that no more fd can be opened.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-06-18 01:28:01 +02:00
Arvydas Sidorenko 8e35a983bf Ported vicious.contrib to lua 5.2
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-06-18 01:27:53 +02:00
Arvydas Sidorenko 41cc2c0e27 Ported vicious.widgets module to lua 5.2
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-06-18 01:26:31 +02:00
Arvydas Sidorenko b6b5290093 Ported vicious module to lua 5.2
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-06-18 01:26:24 +02:00
Adrian C. (anrxc) 0741531efd cpufreq: skip redudant freq variable check 2012-05-20 04:19:51 +02:00
Adrian C. (anrxc) 97e54d60f8 cpufreq: rework new exception handlers
Now that we are so nice to provide default frequency values check if
frequency exists before calculating voltage, not to screw up *those*
default values.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-05-19 17:11:31 +02:00
jinleileiking 30db4bea7b cpufreq: handle not existing frequency/governer
In some cases not all cpu informations will be provided.
(ex. in virtual machines)
Therefore default to "N/A".

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-05-19 17:11:22 +02:00
Adrian C. (anrxc) 13cec6d35a pkg: update 'Arch S' substitution lines
It would appear pacman v4 now prints only one line before the package
list.
2012-05-09 03:13:13 +02:00
Adrian C. (anrxc) 2d8d7d752b Next release, tag 2.0.4 2012-04-01 00:00:05 +02:00
Adrian C. (anrxc) f972955ce7 README: update thermal documentation
Thermal now accepts an optional third argument when warg is a table.
2012-03-31 20:58:10 +02:00
Adrian C. (anrxc) 5605030ed4 thermal: change coretemp default, allow file as widget argument
Since Linux 3.0 most if not all people have temp1_input file missing,
so default to temp2_input. But also allow an optional third argument
to change to yet another file to avoid this kind of problem in the
future.
2012-03-31 20:53:30 +02:00
Jörg Thalheim 7a3699cf4c division by zero, if battery is full charged
If the battery state change from charging to full,
power_now is reseted to zero for a little time.
This cause division by zero, which was visible as a very big negative
number because of the behaviour of string.format.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-03-04 20:24:22 +01:00
Adrian C. (anrxc) b11bb78e04 hddtemp: fix curl hang in version 7.24.0 2012-02-05 19:38:22 +01:00
Adrian C. (anrxc) 73db82b4c9 README: add format function example for overriding symbols 2012-01-20 14:35:07 +01:00
Sébastien Luttringer 7e81bb8a95 cpufreq: differentiate between ondemand and conservative
In cpufreq widget, governor char is the same for ondemand and
conservative which makes it impossible to overload symbols to
different values for these two governors in a format function.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2012-01-20 14:21:24 +01:00
Adrian C. (anrxc) 6f42ee5e51 README: update wtype argument explanation
Many users miss the fact they can register their functions as widget
types. Documentation for wtype being incomplete wasn't helping.
2011-12-10 17:34:38 +01:00
Adrian C. (anrxc) 45c6ebaeb6 bat: fix time calculation, bug introduced in 350e924 2011-11-20 17:44:04 +01:00
J. Thalheim cd4b04df44 thermal: remove unnecessary read 2011-11-19 02:24:34 +01:00
Adrian C. (anrxc) 350e9240ea bat: another workaround for broken ACPI implementations 2011-11-19 02:20:08 +01:00
Joerg T. (Mic92) eeb27a2916 [cpu] fix division by zero
In rare cases diff_total seems to become 0.
2011-09-24 17:43:27 +02:00
Adrian C. (anrxc) 059442d039 net: sanitize time computation to avoid division by zero 2011-09-03 12:10:51 +02:00
Joerg T. (Mic92) 25b375bd6b [pulse] round volume to integer 2011-09-02 05:13:32 +02:00
Adrian C. (anrxc) 18e1823ded vicious: cleanup tabs and bad intendation 2011-08-18 20:44:04 +02:00
Joerg T. (Mic92) cf996f2ea3 [net] calculate time in a more clean way 2011-08-18 20:39:33 +02:00
Joerg T. (Mic92) f1844decef Allocate reg table with all values in one shot 2011-08-18 20:39:22 +02:00
Adrian C. (anrxc) b11d251ef0 README: provide multigraph usage example 2011-08-07 22:17:26 +02:00
Adrian C. (anrxc) 44aea3786f bat: better fix for missing rate in 31d7b2f
Thanks to Ikke for debugging this.
2011-07-12 23:54:13 +02:00
Adrian C. (anrxc) e01a8ebe21 vicious: document mem.bcuse 2011-06-30 01:06:43 +02:00
Adrian C. (anrxc) 1384b69384 mem: provide mem.bcuse for Gabriel 2011-06-30 01:02:43 +02:00
Adrian C. (anrxc) 324563e51b Next release, tag 2.0.3
Thanks to Jörg Thalheim and his work on improving Vicious, we can make
this tag.
2011-05-10 22:40:34 +02:00
Joerg T. (Mic92) dcc2b60cd8 vicious: load widget modules only when needed
There's no more need to edit init files and manually disable widgets.

Signed-off-by: Joerg T. (Mic92) <jthalheim@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2011-05-10 00:50:41 +02:00
Perry Hargrave 06e8f7c68a mpd: allow named keys or positional arguments
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2011-04-25 21:21:32 +02:00
Adrian C. (anrxc) 729ceb7865 dio: import string.match() 2011-03-29 16:41:24 +02:00
Adrian C. (anrxc) c2f7fbcf23 dio: provide stats for all devices, rewritten by Joerg
Old dio.lua was moved to contrib. New one is used like CPU widget is,
request the device or parition in the format argument, {sda read_mb}
as an example. New widget doesn't provide scheduler information, but I
don't know anyone who used that. If you think this is wrong let me
know.
2011-03-29 02:21:53 +02:00
Adrian C. (anrxc) 6522f58011 cpu: another 10 percent optimization from Joerg 2011-03-17 04:26:20 +01:00
Adrian C. (anrxc) 753ce61de0 cpu: calculation and optimization fixes by Joerg 2011-03-15 05:02:55 +01:00
Adrian C. (anrxc) f85d9444d9 gmail: fixed misleading comment 2011-03-09 06:53:13 +01:00