From 4f7ad0fd866f10e72a96b36ec36f07c5367d0cf9 Mon Sep 17 00:00:00 2001
From: David Soulayrol
Date: Wed, 13 Apr 2011 22:45:28 +0200
Subject: [PATCH] Updated documentation support files (README, man page, luadoc
files).
---
README | 51 +++--------------------------------
flaw.7 | 40 ++++++++++++++++++---------
luadoc/doclet/html/index.lp | 26 +++++++-----------
luadoc/doclet/html/luadoc.css | 4 +--
4 files changed, 42 insertions(+), 79 deletions(-)
diff --git a/README b/README
index 7b27bf3..29417a6 100644
--- a/README
+++ b/README
@@ -1,9 +1,6 @@
-This is Flaw, a Lua OO management framework for Awesome WM widgets.
-
-Flaw stands for Fully Loaded AWesome. It is a LUA object oriented
-library providing a thin abstraction layer above awesome widgets and
-refresh mechanisms. It is aimed at being simple and resources
-efficient.
+Flaw is a LUA object oriented library providing a thin abstraction
+layer above awesome widgets. It is aimed at being simple and resources
+efficient. See .
Flaw requires luafilesystem. To learn more, please read the provided
flaw(7) man page. You can read it without installing it on the system
@@ -18,46 +15,4 @@ documentation pages.
LUA_PATH="path_toflaw/doclet/html/?;;" luadoc -d html --nofiles *.lua
-For the most impatient or curious, here is a quick glance at flaw
-usage:
-
- require('flaw')
-
- -- Create battery monitor icon
- g_bat_icon = flaw.gadget.new('flaw.battery.imagebox', 'BAT0')
- g_bat_icon.add_event(
- flaw.event.LatchTriger:new{condition = function(d) return d.load < 75 end},
- function(g) g.widget.image = image(beautiful.battery_icon) end
- )
- g_bat_icon.add_event(
- flaw.event.LatchTriger:new{condition = function(d) return d.load < 25 end},
- function(g) g.widget.image = image(beautiful.battery_low_icon) end
- )
- g_bat_icon.add_event(
- flaw.event.LatchTriger:new{condition = function(d) return d.load < 10 end},
- function(g) naughty.notify{
- title = "Battery Warning",
- text = "Battery low! " .. g.provider.data.load .. "% left!",
- timeout = 5, position = "top_right",
- fg = beautiful.fg_focus, bg = beautiful.bg_focus} end
- )
- g_bat_icon.add_event(
- flaw.event.LatchTriger:new{condition =
- function(d) return d.status == flaw.battery.STATUS_CHARGING end},
- function(g) g.widget.image = image(beautiful.battery_load_icon) end
- )
-
- -- Create battery monitor textbox
- g_bat_text = flaw.gadget.new('flaw.battery.textbox', 'BAT0')
- g_bat_text.add_event(
- flaw.event.LatchTriger:new{ condition = function(d) return d.load < 10 end },
- function(g) g.pattern = '$load%' end
- )
-
- wibox.widgets = {
- g_bat_icon.widget,
- w_bat_text.widget,
- }
-
-
-- David Soulayrol
\ No newline at end of file
diff --git a/flaw.7 b/flaw.7
index fb073a0..93776b6 100644
--- a/flaw.7
+++ b/flaw.7
@@ -19,7 +19,7 @@ To add functionality to awesome widgets,
defines gadget objects, which are a wrapper around a widget. All
gadgets have properties, events, a refresh mechanism and a data
provider (see below). Gadgets can wrap all awesome widget type,
-namely text boxes, image boxes or graphs.
+namely text boxes, image boxes, graphs or progress bars.
.B flaw
provides many gadgets for common system information (like CPU or
memory activity).
@@ -38,21 +38,35 @@ trigger, which computes the condition, and an action. Event triggers
are tested by the providers only when data changes. Both the
condition and the action are provided by the user.
.SH USAGE
-Before anything else, insert require('flaw') in your configuration file.
-.SS The flaw API
-.IP flaw.gadget.new
-.SH WIDGET TYPES
-.SS Battery
-.SS CPU
-.SS Memory
-.SS Network
-
-.SH EXAMPLES
-
+.B flaw
+depends on the
+.RB lua-filesystem
+package which can be found
+.IR http://luaforge.net/projects/luafilesystem .
+Once installed, the following statement must be inserted in awesome
+configuration before any
+.B flaw
+gadget or mechanism is used.
+.RS
+\f(CWrequire('flaw')\fP
+.RE
+.PP
+Using
+.B flaw
+consists in creating gadgets, passing them parameters to customize their
+display and events to add some behaviour to them, and then adding them
+in a wibox like any other awesome widget.
+.B flaw
+and awful gadgets can live together. The complete
+.B flaw
+documentation is available in Luadoc format. Enter the following command to generate it.
+.RS
+\f(CWLUA_PATH="path_toflaw/doclet/html/?;;" luadoc -d html --nofiles *.lua\fP
+.RE
.SH DIAGNOSTICS
.B flaw
tries to recover upon bad invocations. When something wrong occurs, it
-outpus warning or error messages to stderr (for example, if awesome
+outputs warning or error messages to stderr (for example, if awesome
was started with xsession, output will be found in
.I ~/.xsession-errors
).
diff --git a/luadoc/doclet/html/index.lp b/luadoc/doclet/html/index.lp
index b6ec52f..83fc6b2 100644
--- a/luadoc/doclet/html/index.lp
+++ b/luadoc/doclet/html/index.lp
@@ -37,20 +37,22 @@
you to write new system resources interfaces or to
automate the configuration of new widgets.
+
+ Installation
- To start using flaw, simply add the following
- requirement at the top of your awesome configuration
- file. You will find many code samples in the module
- descriptions.
+ The source code of flaw is hosted
+ on GitHub and can be
+ browsed here. There
+ is neither archive nor stable release at this time.
- require('flaw')
- Please note: flaw tries to remain as easy as
- possible to install. However, to keep some things simple,
- it relies on lua-filesystem which can be found
+ The only dependency of flaw, besides the need to
+ run it inside awesome of course, is
+ the lua-filesystem package which can be found
at LuaForge.net.
<%if not options.nomodules and #doc.modules > 0 then%>
+
Documentation
Modules |
@@ -63,14 +65,6 @@
<%end%>
- Download
-
- The source code of flaw is hosted
- on GitHub and can be
- browsed here. There
- is neither archive nor stable release at this time.
-
-
Credits and License
The awesome
diff --git a/luadoc/doclet/html/luadoc.css b/luadoc/doclet/html/luadoc.css
index e642a62..8ff3720 100644
--- a/luadoc/doclet/html/luadoc.css
+++ b/luadoc/doclet/html/luadoc.css
@@ -20,8 +20,8 @@ h1, h2, h3, h4 { margin-left: 0em; }
textarea, pre, tt { font-size:10pt; }
body, td, th { color:#000000; }
small { font-size:0.85em; }
-h1 { font-size:1.5em; }
-h2 { font-size:1.25em; }
+h1 { font-size:2em; }
+h2 { font-size:1.5em; }
h3 { font-size:1.15em; }
h4 { font-size:1.06em; }