#6 open
Dag Odenhall

Config example in module info

Reported by Dag Odenhall | May 16th, 2008 @ 03:41 PM | in First Release

Idea

Display one or more generated or hard-coded configuration examples or scaffolds for modules with --list-widgets similar to --scaffold.

Example

% amazing -w clock
Clock - Displays date and time

 OPTION | DESCRIPTION                         | DEFAULT
--------------------------------------------------------
 format | Time format as described in DATE(1) | "%R"
 offset | UTC offset in hours                 | 2

 FIELD  | DESCRIPTION    | DEFAULT
-----------------------------------
 @time  | Formatted time | nil

 CONFIGURATION EXAMPLES
------------------------

widget("my_widget") {
  set :module => :clock
  set :property => "text"
  set :interval => 1
  set :format => "%R"
  set :offset => 2

  property("text") {
    @time
  }
}

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

An amazing widget manager for an awesome window manager

People watching this ticket

Pages