<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;&lt;cite&gt;This is now merged with master and this article should also be merged, with the Configuration article.&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;It is a complete rewrite of amazing&amp;#8217;s handling of configuration. It targets awesome versions later than 2.2, and the configuration can be written either in &lt;acronym title=&quot;Yaml Aint Markup Language&quot;&gt;&lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt;&lt;/acronym&gt; or a Ruby &lt;acronym title=&quot;Domain Specific Language&quot;&gt;&lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt;&lt;/acronym&gt; written specifically for amazing.&lt;/p&gt;
&lt;p&gt;To get you started you may generate a &lt;acronym title=&quot;Domain Specific Language&quot;&gt;&lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt;&lt;/acronym&gt; configuration based on your &lt;code&gt;~/.awesomerc&lt;/code&gt; with the &lt;code&gt;-g&lt;/code&gt; or &lt;code&gt;--scaffold&lt;/code&gt; switch:&lt;/p&gt;
&lt;pre class=&quot;console&quot;&gt;% &lt;span class=&quot;command&quot;&gt;mkdir -p ~/.amazing&lt;/span&gt;
% &lt;span class=&quot;command&quot;&gt;amazing -g &gt; ~/.amazing/config.rb&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;cite&gt;Beware: the above command will overwrite any existing ~/.amazing/config.rb&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;Then, you just edit away &lt;code&gt;~/.amazing/config.rb&lt;/code&gt; to your hearts content. Scroll down to learn more about the &lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt; configuration.&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt; configuration is now structured like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;awesome:
- screen: &amp;lt;screen&amp;gt; (defaults to 0)
  statusbar: &amp;lt;statusbar&amp;gt; (defaults to &quot;mystatusbar&quot;)

  widgets:

  - &amp;lt;identifier name of awesome widget&amp;gt;:

      # be wary of indentation - or use inline syntax

      module: &amp;lt;widget module&amp;gt; (defaults to same as &amp;lt;identifier&amp;gt;)
      # list modules with amazing -w
      # module names can be written in either CamelCase or snake_case

      property: &amp;lt;fallback property if no properties are configured&amp;gt; (defaults to &quot;text&quot;)

      interval: &amp;lt;update interval in seconds&amp;gt; (defaults to unspecified)
      # tip: 5:0 means five minutes, 5:0:0 five hours

      &amp;lt;module option&amp;gt;: &amp;lt;option value&amp;gt; (defaults specific to modules)
      # list these with amazing -w &amp;lt;module&amp;gt;

      properties:
        &amp;lt;property&amp;gt;: &amp;lt;ruby&amp;gt;
        # this works as format did before
        # list variables (&quot;fields&quot;) with amazing -w &amp;lt;module&amp;gt;
        # and examples with amazing -t &amp;lt;module&amp;gt; [&quot;&amp;lt;option&amp;gt;: &amp;lt;value&amp;gt;, ...&quot;]&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;While the &lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt; is really Ruby, the syntax should hopefully be straight-forward even to people who are not familiar with Ruby.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;awesome([options...]) {
  set :screen =&amp;gt; &amp;lt;screen&amp;gt; (defaults to 0)
  set :statusbar =&amp;gt; &amp;lt;statusbar&amp;gt; (defaults to &quot;mystatusbar&quot;)

  widget(&amp;lt;identifier name of awesome widget&amp;gt;, [options...]) {

    set :module =&amp;gt; &amp;lt;widget module&amp;gt; (defaults to same as &amp;lt;identifier&amp;gt;)
    # list modules with amazing -w
    # module names can be written in either CamelCase or snake_case

    set :property =&amp;gt; &amp;lt;fallback property if no properties are configured&amp;gt; (defaults to &quot;text&quot;)

    set :interval =&amp;gt; &amp;lt;update interval in seconds&amp;gt; (defaults to unspecified)
    # tip: 5.minutes returns 300, up to x.years is supported (and the suffix &quot;s&quot; is optional)

    set :&amp;lt;module option&amp;gt; =&amp;gt; &amp;lt;option value&amp;gt; (defaults specific to modules)
    # list these with amazing -w &amp;lt;module&amp;gt;

    property(&amp;lt;property&amp;gt;) {
      &amp;lt;ruby&amp;gt;
      # this works as format did before
      # list variables (&quot;fields&quot;) with amazing -w &amp;lt;module&amp;gt;
      # and examples with amazing -t &amp;lt;module&amp;gt; [&quot;&amp;lt;option&amp;gt;: &amp;lt;value&amp;gt;, ...&quot;]
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Options&lt;/h3&gt;
&lt;p&gt;Options can be set in multiple ways. Directly in the element directive:&lt;/p&gt;
awesome(:statusbar =&amp;gt; &amp;#8220;top&amp;#8221;, &amp;#8230;) { &amp;#8230; }
&lt;p&gt;With the &lt;code&gt;set&lt;/code&gt; directive:&lt;/p&gt;
awesome {
set :statusbar =&amp;gt; &amp;#8220;top&amp;#8221;, &amp;#8230;
}
&lt;h3&gt;Sample configurations&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/dag/dotfiles/tree/master/.amazing/config.rb&quot;&gt;Dag a.k.a. donri&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/gigamo/config/tree/master/.amazing/config.rb&quot;&gt;Gigamo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</body>
  <created-at type="datetime">2008-03-24T06:22:36-07:00</created-at>
  <id type="integer">5816</id>
  <permalink>beyond-awesome-2-2</permalink>
  <repository-id type="integer">1388</repository-id>
  <title>Beyond awesome 2.2</title>
  <updated-at type="datetime">2008-05-23T09:31:45-07:00</updated-at>
  <user-id type="integer">8627</user-id>
</wiki>
