Commit Graph

45 Commits

Author SHA1 Message Date
Enric Morales 1277889978 Make helpers.sysctl_async cross-platform & let bat_openbsd use it (#93) 2019-10-17 21:30:00 +07:00
Nguyễn Gia Phong b9c424c768 Fix styling according to CONTRIBUTING.md 2019-10-17 21:26:06 +07:00
Nguyễn Gia Phong f54f1a7d8e Update some copyright headers along with style change
Additionall introduce helpers.setcall to replace the cumbersome setmetatable
at the end of most synchronous widget types
2019-09-05 12:41:38 +07:00
Nguyễn Gia Phong 08170d67ff Update copyright notices in libraries with the help of an auto-generator 2019-09-05 10:48:50 +07:00
Nguyễn Gia Phong 83efd26802 Nitpick style, mainly to make luacheck happy
Only cover the widget types that were recently refactored.
A few conventions are set as followed:
* Textwidth is preferably 80, since the whole point of tiling windows
  is to be able to view more pane of codes
* Standard, 3rd-party and local require should be grouped together
* Closing parentheses should not be on lines by themselves

There should be a style guide to clarify these.
2019-08-23 22:50:13 +07:00
mutlusun b7490a20af
improved sysctl_async documentation line 2019-08-23 09:51:23 +02:00
mutlusun 875e98e24e
[helpers.lua] Removed old sysctl functions 2019-07-31 18:26:06 +02:00
mutlusun 2b60a72d06
[uptime_freebsd] Deprecate synchronous sysctl 2019-07-31 17:51:47 +02:00
mutlusun df4048da37
[thermal_freebsd] Deprecate synchronous sysctl 2019-07-31 17:09:11 +02:00
Nguyễn Gia Phong 6ba97712f5 Introduce helpers.setasyncall which simplifies calling of async wtype
Also add note about potential breakage on changing default symbol in volume_linux
2019-05-15 16:12:15 +07:00
Enric Morales 96c9d59eb5 Add battery support for OpenBSD (#76) 2019-03-08 11:57:08 +07:00
Alexander Koch 6b4910e0d1 helpers: Fix typo in widget-not-found error message 2019-01-15 20:55:45 +07:00
Jörg Thalheim d11703d589 move format_progress to mpd module
The function is not used by any other module and is only really useful
for formatting durations as exposed by mpd.
2018-12-15 00:10:38 +07:00
Nguyễn Gia Phong e84be352c5 Make mpd widget type expose more info
By default, format time values in [hh:]mm:ss. Also use printf instead of
echo, which is shell-specific.
2018-12-15 00:10:38 +07:00
Joerg Thalheim 2877baa7f4 Do not hide loading errors when widgets failed to load
Previously the use of pcall masked errors.
2017-11-24 12:16:32 +00:00
Jörg Thalheim 5b9b4961d8
helpers:shellquote: stringify argument
fixes #34
2017-04-17 16:50:23 +02:00
mutlusun 78e1242601
helpers: add sysctl helper for freebsd 2017-01-25 21:25:38 +01:00
mutlusun 3baade7b06
helpers.lua: restructure to support multiple operating systems 2017-01-25 21:25:33 +01:00
Jörg Thalheim a31d49b00b
helpers.lua: fix typo in comment 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
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
Jörg Thalheim 01893953a6 Merge branch 'master' of http://git.sysphere.org/vicious 2012-06-25 20:53:19 +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
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
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
Adrian C. (anrxc) d38584386d helpers: properly handle magic characters 2011-02-15 05:47:21 +01:00
Adrian C. (anrxc) 49b1b0972f helpers: index subdirectories in pathtotable() 2010-03-15 03:02:50 +01:00
Adrian C. (anrxc) ad14818d4e helpers: import capitalize
This helper will capitalize the first letter of every word in a given
string. It'll be useful for some widget string which look out of place
otherwise, like "rain, snow" (<- where did this come from?). But it
can also be useful for people that like to use this format, camel case
or simillar.
2010-03-06 03:11:54 +01:00
Adrian C. (anrxc) b96cb98352 bat: added a note about Apple PMU and ACPI/procfs 2010-02-20 04:33:27 +01:00
Adrian C. (anrxc) e29ea6288a helpers: uformat helper replaces formatting done by widgets 2010-02-20 03:24:42 +01:00
Adrian C. (anrxc) 15dd6ea287 vicious: update copyright 2010-01-02 21:21:54 +01:00
Adrian C. (anrxc) 76942d17a4 helpers: simplify pathtotable, patch by filmor 2009-11-11 14:30:26 +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) 896df4dd98 De-obfuscate e-mail address 2009-11-04 23:39:38 +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) b0f737ea56 Rewrote all headers 2009-09-29 22:33:19 +02:00
Adrian C. (anrxc) c9fba4e0d2 Widgets derived from wicked include a notice 2009-09-20 23:16:10 +02:00
Adrian C. (anrxc) 9f75b0dc9d Spurious folds removed from helpers. 2009-08-07 23:23:07 +02:00
Adrian C. (anrxc) 41d4acb7a2 Truncate helper, txtlen is local. 2009-08-07 23:19:50 +02:00
Adrian C. (anrxc) 44aea404c7 Remove a spurious comment from helpers.lua 2009-08-05 22:21:37 +02:00
Adrian C. (anrxc) 3c76e0ddd2 Introduced the truncate helper.
Function takes two arguments, the text to be truncated and the max
lenght. Last three characters will be replaced by "...". Mbox and MPD
widgets that previously did it them selves are now using this helper.
2009-08-05 22:11:11 +02:00
Adrian C. (anrxc) 4c74de711f Padding removed, along with deprecated helper functions.
If you have any use for it then continue using an older vicious tag,
or keep maintaining it in your local vicious copy.
2009-08-05 21:50:41 +02:00
Adrian C. (anrxc) 09fda0ab05 Rewrite of the escape helper.
It is simillar to the awful.util.escape now, using a table which we
could expand (and rename) with other unwated characters if it comes to
that. I saw awesome break on many occasions because of encoding
problems.
2009-08-03 04:29:06 +02:00
Adrian C. (anrxc) 19ca7b5a03 Replaced TODO with Todo in helpers. 2009-07-29 23:40:50 +02:00
Adrian C. (anrxc) 98e26ee043 Import of vicious source tree.
Vicious is a modular widget library for 'awesome' window manager,
derived from the 'Wicked' widget library.

Summary of changes:
  * Original wicked code modularized
  * Widgets ported from Wicked:
    - CPU, MEM, FS, NET, Date, Uptime, MPD
      * CPU widget rewritten, uses pattern matching
      * MEM widget rewritten, uses pattern matching
        - Swap widget merged with MEM widget type
      * FS widget rewritten, uses pattern matching
        - Also fixed padding in the process
      * NET widget rewritten, uses pattern matching
      * MPD widget rewritten, a bit more versatile
      * Removed deprecated helper functions
  * Widgets written for Vicious:
    - Thermal, Battery, Mbox, OrgMode, Volume, Entropy,
      Disk I/O, System Load, Wireless, Pacman, Maildir
2009-07-29 17:59:32 +02:00