To determine which socket is to be used, it reads the DISPLAY environment variable. awesome2-client reads commands from standard input.
When you pipe multiple lines into awesome2-client, an empty line will flush already collected lines into awesome2 with an according immediate execution.
The command format is: screen_number command argument
For example, to change a statusbar textbox text on screen 0, you can do the following:
echo 0 widget_tell <statusbar-name> <textbox-name> text Hello, world | awesome2-client
To change an iconbox image on screen 1, you can do the following:
echo 0 widget_tell <statusbar-name> <iconbox-name> image /home/user/image.jpg | awesome2-client
To view tag number 3 on screen 1:
echo 1 tag_view 3 | awesome2-client
To zoom focused window on screen 0:
echo 0 client_zoom | awesome2-client