Commit Graph

172 Commits

Author SHA1 Message Date
mutlusun 57bab3542b adds critical charging state to FreeBSDs battery widget 2018-03-12 21:22:48 +01:00
Joerg Thalheim a81435e1be fs: fix shell quoting of optional argument
fixes #49
2017-11-30 08:50:23 +00:00
Joerg Thalheim 1cfa040fbd re-add format parameter.
This broke custom formats in the date widget.
2017-10-23 15:24:17 +01:00
Brandon Hartshorn 750532a1d8 volume: allow to pass multiple arguments to amixer (#44)
* Added option for a table to configure volume widget, allowing device specification also.

* Updated README.md with new configuration options for volume widget

* volume: allow passing a list of commandline arguments
2017-10-08 15:33:32 +01:00
getzze 983253a27f Allow asynchronous call (for Awesome4+) (#32) 2017-07-13 21:42:26 +01:00
David Udelson ad327267bd Change bat widget discharging state char from U+2212 to U+002D
This avoids using a unicode character that looks just like a hyphen but
isn't, leading to subtle bugs when developers write code that interacts
with the bat_linux widget.
2017-05-27 12:19:42 -04:00
mutlusun f2aa096f83 small fix in bat_freebsd 2017-02-23 22:36:22 +01:00
Roberto d9ecb9f20d Added support for power usage 2017-02-17 19:23:37 +01:00
starenka e8bf98eb7f Fix for not working gmail widget 2017-02-17 00:21:56 +01:00
starenka 6ec9977851 fixing `nil` sent to curl 2017-02-15 16:35:18 +01:00
Elric Milon 1b41fc2132 Add iotime field to dio widget. 2017-01-29 12:02:57 +01:00
mutlusun 012b67a8c0
add fanspeed widget 2017-01-26 10:40:39 +01:00
mutlusun 602eada652
move weather widget to match new layout 2017-01-26 10:40:39 +01:00
mutlusun 785fefc13a
move wifi widget to match new layout 2017-01-26 10:40:39 +01:00
mutlusun 54baa996c4
port volume widget to freebsd 2017-01-26 10:40:39 +01:00
mutlusun f86c60d2fd
port uptime widget to freebsd 2017-01-26 10:40:38 +01:00
mutlusun 22d49a9e5d
move thermal widget to match new layout 2017-01-26 10:40:38 +01:00
mutlusun 5c7c695ea1
move raid widget to match new layout 2017-01-26 10:40:38 +01:00
mutlusun 909db88b00
move pkg widget to match new layout 2017-01-26 10:40:38 +01:00
mutlusun cdaa62884d
move os widget to match new layout 2017-01-26 10:40:38 +01:00
mutlusun b44bd1bb14
move org widget to match new layout 2017-01-26 10:40:38 +01:00
mutlusun c8c43d53ee
port net widget to freebsd 2017-01-26 10:40:38 +01:00
mutlusun 5b30e432e6
move mpd widget to match new layout 2017-01-26 10:40:37 +01:00
mutlusun 70f42e5d54
port mem widget to freebsd 2017-01-26 10:40:08 +01:00
mutlusun 261684f8b8
move mdir widget to match new layout 2017-01-25 21:30:43 +01:00
mutlusun 9695e0fea0
move mboxc widget to match new layout 2017-01-25 21:30:43 +01:00
mutlusun 2605a1b744
move mbox widget to match new layout 2017-01-25 21:30:43 +01:00
mutlusun bb5e6af08c
move hddtemp widget to match new layout 2017-01-25 21:30:43 +01:00
mutlusun 9a727d417e
move gmail to match new layout 2017-01-25 21:30:43 +01:00
mutlusun 108ab2eb82
move fs widget to match new layout 2017-01-25 21:30:42 +01:00
mutlusun ba4b94899e
move dio to match new layout 2017-01-25 21:30:36 +01:00
mutlusun 62dbf146a0
move date widget to match new layout 2017-01-25 21:29:36 +01:00
mutlusun 968fee1a54
move cpuinf widget to match new layout 2017-01-25 21:25:38 +01:00
mutlusun fbd91c9b37
port cpufreq widget to freebsd 2017-01-25 21:25:38 +01:00
mutlusun d7c99133e1
port cpu widget to freebsd 2017-01-25 21:25:38 +01:00
mutlusun 5628c9e478
port bat widget to freebsd 2017-01-25 21:25:38 +01:00
Mellich b6c5a57f41 Added new wifi widget using iw (#20)
* added new wifi widget that uses iw
2016-10-22 23:19:00 +02:00
zhrtz 5fc0e2dae2
Added hwmon interface support, dropped the annoying floating .0 with math.floor 2016-08-18 07:22:22 +02:00
Keith Hughitt e7ee21cc73
Updated base URL for weather widget 2016-08-18 07:22:22 +02:00
Jörg Thalheim c760e43b98
widgets/gmail: shell escape feed variable 2016-08-18 07:22:22 +02:00
Jörg Thalheim 080e28504a Merge branch 'master' of http://git.sysphere.org/vicious 2015-07-26 08:38:41 +02:00
Benoît Zugmeyer 5869a54b20 gmail: fix error when gmail.com is unreachable
ex: no internet connection

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2014-11-19 00:40:56 +01:00
Jörg Thalheim 336ce9bbd7 shell escape variables before passing them to the shell
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2014-11-15 22:03:12 +01:00
Benoît Zugmeyer 50fd2334b6 gmail: fix subject when gmail feed is in one line
For some time now, gmail feeds are in a single line. The goal of this patch is to handle
both cases (single and multiline). It will find the text between title tags after the
first entry tag.

Since the first feed title is skiped with this regex, title regexes aren't needed anymore.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2014-11-15 21:37:29 +01:00
Andrew Merenbach 9fc02f16da fs: add FreeBSD mount point detection to regexp
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2014-04-21 22:25:26 +02:00
Lyderic Lefever 6e16a412ef bat: fix broken battery remaining time (was always N/A)
Bug was introduced in commit dc556e5415 and the new discharging
symbol.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-12-27 17:21:40 +01:00
Adam Lee bfbc1bdd51 volume: get the normalized volume like alsamixer and DE's indicator
Or the percentage value will be different from alsamixer or desktop
environment's indicator, which confuses users.

Quote from amixer's manpage, "Use the mapped volume for evaluating the
percentage representation like alsamixer, to be more natural for human
ear."

ref:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c

Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-12-27 17:21:35 +01:00
Normal Ra 946271c41d bat: expose information on battery wear and tear
Modern batteries should expose information about their design capacity
which we can compare to current capacity and deduce how much 'wear'
the battery got and expose that as a negative value percentage.

Feature sent in August took a while to convince the maintainer many
modern batteries provide this information.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-12-22 13:14:46 +01:00
Jonathan McCrohan 7961ca1454 weather: add support for dew point
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-12-15 17:47:49 +01:00
Martin Ueding dc556e5415 bat: Use a real minus sign for the charging status
Previously, a simple hyphen (“-”) was used to show that the battery is
discharging. The minus sign is a distinct char, and also distinct from
the en-dash (“–”) and the em-dash (“—”).

With this commit, I put in a unicode “MINUS SIGN” (0x2212) which I
created with a Digraph in Vim `^k-2`.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-12-15 17:30:37 +01:00
Jörg Thalheim b0e631f8d6 Merge branch 'master' of http://git.sysphere.org/vicious
Conflicts:
	contrib/README
2013-11-25 09:40:39 +01:00
Adrian C. (anrxc) 75cd1039cf Revert "mpd: workaround command termination bug in mpd server v0.18"
This reverts commit a6a73f47, because the issue was solved in mpd
release 0.18.2. I imported the workaround for historical reasons and
in case someone gets stuck with version 0.18 on his preferred OS
distribution.
2013-11-09 23:52:43 +01:00
joe di castro a6a73f47d6 mpd: workaround command termination bug in mpd server v0.18
See Debian bug report #728982 for more information.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-11-08 17:57:53 +01:00
Adrian C. (anrxc) 563cb6f5e8 pkg: revert to pacman as default Arch method, checkupdates optional
Checkupdates is a good tool avoiding any need for period pacman -Sy
jobs from root crontab, however it works by maintaining its own
database in /tmp by default (and _that_ is a tmpfs by default) so on
every initialization it would stall awesome until it makes the first
sync. Better approach would be to keep its db inside $HOME for
persistence, and then to initiate the first (and longest) sync
manually before converting your package widgets to "Arch C".

All this is the reason I can't recommend it as the default right
now...
2013-11-02 18:14:07 +01:00
Andrea Scarpino 01b2302659 pkg: use checkupdates on Arch Linux.
It prints a list of pending updates without touching the system sync databases.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-11-02 18:12:52 +01:00
Juergen Descher 0fd4fc5c2a mboxc: Fixed typo in setmetatable after ported to lua 5.2
Signed-off-by: Juergen Descher <jhdl@gmx.net>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2013-07-21 21:33:55 +02:00
Jörg Thalheim c1dd257bc7 Merge branch 'master' of http://git.sysphere.org/vicious 2013-05-28 21:26:01 +02:00
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
Jörg Thalheim 0156fd36f9 Merge branch 'master' of http://git.sysphere.org/vicious
Conflicts:
	contrib/README
	widgets/uptime.lua
2012-09-04 10:10:11 +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) c28bac5d71 uptime: metatable bugfix after lua52 port fixed by Jorg Thalheim 2012-06-25 22:35:10 +02:00
Jörg Thalheim 01893953a6 Merge branch 'master' of http://git.sysphere.org/vicious 2012-06-25 20:53:19 +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) 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 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
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) 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
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) 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
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
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) 1384b69384 mem: provide mem.bcuse for Gabriel 2011-06-30 01:02:43 +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
Adrian C. (anrxc) 31d7b2fc6b bat: fixed "no such device" for current and power 2011-02-21 06:46:49 +01:00
Adrian C. (anrxc) 6ddad318e0 bat: added power_now support
Looks like current_now will eventually be deprecated. Thanks to Conrad
Calmez for finding this bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532000
2011-02-15 03:49:43 +01:00
Adrian C. (anrxc) 762593385c wifi: proper fix for SSID regexp 2010-10-29 17:50:13 +02:00
Adrian C. (anrxc) 7f7a94d795 gmail: inbox is now default
With all the tags and other crap, we could be counting mail up to 3-5
times. If you hate this change let me know. Otherwise inbox is now
default.
2010-10-29 16:46:59 +02:00
Adrian C. (anrxc) 82eb67b400 wifi: removed spurious bracket from SSID regexp 2010-10-28 20:16:18 +02:00
Adrian C. (anrxc) 304fa336ed wifi: properly handle disconnects 2010-10-24 23:36:38 +02:00
Adrian C. (anrxc) 32a7be1d6d wifi: provide link quality in percent 2010-10-19 21:23:06 +02:00
Amir Mohammad Saied 49b0913b04 wifi: improved SSID regular expression
Current regular expression only matches two words ESSIDs, the other day
I was at a friend's home with SSID "The Dark Tower". I was getting N/A.

Signed-off-by: Amir Mohammad Saied <amirsaied@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
2010-10-12 14:14:49 +02:00
Adrian C. (anrxc) e51d8ac39e date: turn time widget argument into an offset
The os.time() call should not be passed as an argument it self,
because of a chance it will be stored internally and so we would
always get the same time. Instead we can pass time offsets in seconds,
i.e. to go 6 hours forward we can use the widget argument 21600, to go
6 hours back we use -21600 instead.
2010-10-04 22:42:31 +02:00