[config] add missing documentation
[awesome.git] / awesomerc.5.txt
blob56c3809776953973619789275823da9279a87ef5
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       echo "0 widget_tell clock text `date`"
90       echo "" # an empty line flushes data inside awesome
91       sleep 1
92     done | awesome-client
94     Note: What we're saying is "awesome-client, tell widget 'clock' to set
95     it's 'text' property to date's output".
97 5. Make your ~/bin/awesome-clock executable
99    $ chmod a+x ~/bin/awesome-clock
101 6. Modify ~/.xinitrc
103     ~/bin/awesome-clock &
104     exec awesome
106 7. Restart awesome
108 8. If your didn't get what you were expecting, take a look at
109    ~/.xsession-errors or the terminal where X got started.
110 ..............................................
112 Simple progressbar example
113 ~~~~~~~~~~~~~~~~~~~~~~~~~~
114 ..............................................
116 1. Add an include directive into ~/.awesomerc
118     screen 0 { include(~/.awesome/bottom-status-bar) }
120 2. Create ~/.awesome/bottom-status-bar
122     progressbar diskusage
123     {
124         data "disk"
125         {
126             bordercolor = "#006e96"
127             bg          = "#000000"
128             fg          = "#ff0000"
129             fg_center   = "#daaf0a"
130             fg_end      = "#00ff00"
131         }
132         width = 100
133         align = "left"
134     }
136 3. Check the configuration file for errors
138     $ awesome -k
139     Configuration file OK.
141     Note: If you see anything other than "Configuration file OK," you have a
142     typo somewhere.
144 4. Create ~/bin/awesome-diskusage
146     #!/bin/sh
147     while true; do
148         usage = `df /dev/sda5 | awk '/\/dev\/sda5/ { print 100-$5 }'`
149         echo "0 widget_tell diskusage data disk ${usage}"
150         echo "" # an empty line flushes data inside awesome
151         sleep 600;
152     done | awesome-client
155     Note: What we're saying is "awesome-client, tell widget 'diskusage' to
156     set it's 'data' property named 'disk' to ${usage}."
158 5. Make ~/bin/awesome-diskusage executable
160 $ chmod a+x ~/bin/awesome-diskusage
162 6. Modify ~/.xinitrc
164     ~/bin/awesome-diskusage &
165     exec awesome
167 7. Restart awesome
169 8. If your didn't get what you were expecting, take a look at
170    ~/.xsession-errors or the terminal where X got started.
171 ..............................................
174 SEE ALSO
175 --------
176 awesome(1) awesome-client(1) awesome-menu(1) awesome-message(1)
179 AUTHORS
180 -------
181 This man page was written by Julien Danjou <julien@danjou.info>, Marco Candrian <mac@calmar.ws>
182 and Chris Ciulla <chris.ciulla@gmail.com> (Simple Examples).
186 http://awesome.naquadah.org