[doc] generate rc skeleton based on the order found in common/configopts
[awesome.git] / awesomerc.5.txt
blob8e4e93200c6783fdaed80383ab7d12b4da9716c1
1 awesomerc(5)
2 ===========
4 NAME
5 ----
7 awesomerc - Configuration file for the 'awesome window manager'
9 SYNOPSIS
10 --------
11 ..........................
12 <section> [title]
14     <option> = <value>
16     <section> [title]
17     {
18         <option> = <value>
19          ...
20     }
21     ...
24 <option> = <value>
26 include(file.conf)
27 ..........................
29 DESCRIPTION
30 -----------
32 The *awesomerc* file contains configuration informations for *awesome*. It can
33 be used to configure the behaviour and look of awesome in a variety of ways.
35 It is read at startup.
37 OPTIONS
38 --------
39 *awesomerc* contains 5 global sections: *screen*, *rules*, *keys*, *mouse* and *menu* which
40 are described here.
42 All this sections contain options which may be string, integer, float, or even sections again.
44 include::optsdocgen.txt[]
46 UICB FUNCTIONS
47 --------------
49 In awesome, a lot of *functions* are available. These functions are called
50 uicb (User Interface Call Backs). Each function can be bound to a key shortcut
51 or a mouse button.
53 include::uicbdocgen.txt[]
55 EXAMPLES
56 --------
58 More examples are available on awesome's wiki:
59 http://awesome.naquadah.org/wiki/
61 Simple textbox example
62 ~~~~~~~~~~~~~~~~~~~~~~
63 ..............................................
64 1. Add an include directive into ~/.awesomerc
66     screen 0 { include(~/.awesome/bottom-status-bar) }
68 2. Create ~/.awesome/bottom-status-bar
70     statusbar "bottom"
71     {
72         position = "bottom"
73         textbox "clock" { }
74     }
76 3. Check the configuration file for errors
78     $ awesome -k
79     Configuration file OK.
81     Note: If you see anything other than "Configuration file OK." you have a
82     typo somewhere.
84 4. Create ~/bin/awesome-clock
86     #!/bin/sh
87     while true
88     do
89         # if you start this from .xinitrc, the script will start before
90         # awesome, and will fail.
91         if [ -S ~/.awesome_ctl.0 ]; then
92             while true
93             do
94               echo "0 widget_tell bottom clock text `date`"
95               echo "" # an empty line flushes data inside awesome
96               sleep 1
97             done | awesome-client
98         else
99             sleep 1
100         fi
101     done
103     Note: What we're saying is "awesome-client, tell the bottom status bar's
104     widget named 'clock' to set it's 'text' property to date's output".
106 5. Make your ~/bin/awesome-clock executable
108    $ chmod a+x ~/bin/awesome-clock
110 6. Modify ~/.xinitrc
112     ~/bin/awesome-clock &
113     exec awesome
115 7. Restart awesome
117 8. If your didn't get what you were expecting, take a look at
118    ~/.xsession-errors or the terminal where X got started.
119 ..............................................
121 Simple progressbar example
122 ~~~~~~~~~~~~~~~~~~~~~~~~~~
123 ..............................................
125 1. Add an include directive into ~/.awesomerc
127     screen 0 { include(~/.awesome/bottom-status-bar) }
129 2. Create ~/.awesome/bottom-status-bar
131     statusbar "bottom"
132     {
133         position = "bottom"
134         progressbar "diskusage"
135         {
136             data "disk"
137             {
138                 bordercolor = "#006e96"
139                 bg          = "#000000"
140                 fg          = "#ff0000"
141                 fg_center   = "#daaf0a"
142                 fg_end      = "#00ff00"
143             }
144             width = 100
145             align = "left"
146         }
147     }
149 3. Check the configuration file for errors
151     $ awesome -k
152     Configuration file OK.
154     Note: If you see anything other than "Configuration file OK," you have a
155     typo somewhere.
157 4. Create ~/bin/awesome-diskusage
159     #!/bin/sh
160     while true
161     do
162         # if you start this from .xinitrc, the script will start before
163         # awesome, and will fail.
164         if [ -S ~/.awesome_ctl.0 ]; then
165             while true; do
166                 usage = `df /dev/sda5 | awk '/\/dev\/sda5/ { print 100-$5 }'`
167                 echo "0 widget_tell bottom diskusage data disk ${usage}"
168                 echo "" # an empty line flushes data inside awesome
169                 sleep 600;
170             done | awesome-client
171         else
172             sleep 1
173         fi
174     done
177     Note: What we're saying is "awesome-client, tell the bottom status bar's
178     widget named 'diskusage' to set it's 'data' property named 'disk' to
179     ${usage}."
181 5. Make ~/bin/awesome-diskusage executable
183 $ chmod a+x ~/bin/awesome-diskusage
185 6. Modify ~/.xinitrc
187     ~/bin/awesome-diskusage &
188     exec awesome
190 7. Restart awesome
192 8. If your didn't get what you were expecting, take a look at
193    ~/.xsession-errors or the terminal where X got started.
194 ..............................................
196 AWESOMERC SKELETON
197 ------------------
198 Following skeleton lists all available configuration options in *awesomerc*.
200 ..........................
201 include::rcskeletongen.txt[]
202 ..........................
204 SEE ALSO
205 --------
206 awesome(1) awesome-client(1) awesome-menu(1) awesome-message(1)
208 AUTHORS
209 -------
210 This man page was written by Julien Danjou <julien@danjou.info>, Marco Candrian <mac@calmar.ws>
211 and Chris Ciulla <chris.ciulla@gmail.com> (Simple Examples).
215 http://awesome.naquadah.org