[doc] Use statusbar name in widget_tell

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Chris Ciulla 2008-04-03 08:57:37 -04:00 committed by Julien Danjou
parent 37283e2152
commit c940cd723d
1 changed files with 20 additions and 15 deletions

View File

@ -86,13 +86,13 @@ Simple textbox example
#!/bin/sh #!/bin/sh
while true while true
do do
echo "0 widget_tell clock text `date`" echo "0 widget_tell bottom clock text `date`"
echo "" # an empty line flushes data inside awesome echo "" # an empty line flushes data inside awesome
sleep 1 sleep 1
done | awesome-client done | awesome-client
Note: What we're saying is "awesome-client, tell widget 'clock' to set Note: What we're saying is "awesome-client, tell the bottom status bar's
it's 'text' property to date's output". widget named 'clock' to set it's 'text' property to date's output".
5. Make your ~/bin/awesome-clock executable 5. Make your ~/bin/awesome-clock executable
@ -119,7 +119,10 @@ Simple progressbar example
2. Create ~/.awesome/bottom-status-bar 2. Create ~/.awesome/bottom-status-bar
progressbar diskusage statusbar "bottom"
{
position = "bottom"
progressbar "diskusage"
{ {
data "disk" data "disk"
{ {
@ -132,6 +135,7 @@ Simple progressbar example
width = 100 width = 100
align = "left" align = "left"
} }
}
3. Check the configuration file for errors 3. Check the configuration file for errors
@ -146,14 +150,15 @@ Simple progressbar example
#!/bin/sh #!/bin/sh
while true; do while true; do
usage = `df /dev/sda5 | awk '/\/dev\/sda5/ { print 100-$5 }'` usage = `df /dev/sda5 | awk '/\/dev\/sda5/ { print 100-$5 }'`
echo "0 widget_tell diskusage data disk ${usage}" echo "0 widget_tell bottom diskusage data disk ${usage}"
echo "" # an empty line flushes data inside awesome echo "" # an empty line flushes data inside awesome
sleep 600; sleep 600;
done | awesome-client done | awesome-client
Note: What we're saying is "awesome-client, tell widget 'diskusage' to Note: What we're saying is "awesome-client, tell the bottom status bar's
set it's 'data' property named 'disk' to ${usage}." widget named 'diskusage' to set it's 'data' property named 'disk' to
${usage}."
5. Make ~/bin/awesome-diskusage executable 5. Make ~/bin/awesome-diskusage executable