documentation updates
[wmiirc-lua.git] / test.lua
blob8ab3a8f4f268c11fcaae5891009a8422f8972fa4
1 #!/usr/bin/env lua
3 require "wmii"
5 wmii.write ("/lbar/1", '#FF0000 #00FF00 #0000FF xxx')
7 foo = wmii.read ("/lbar/1")
8 print ("read /lbar/1 ::\n" .. foo .. "\n")
10 print ("ls / ::")
11 for foo in wmii.ls ("/") do
12 print (" ", foo)
13 end
14 print ("")
16 print ("ls -l /lbar ::")
17 for foo in wmii.ls ("/lbar", "-l") do
18 print (" ", foo)
19 end
20 print ("")
22 print ("switch view left...")
23 wmii.setview(1)
24 posix.sleep(1)
25 print ("switch view right...")
26 wmii.setview(-1)
27 posix.sleep(1)
28 print ("")
30 print ("toggle view...")
31 wmii.toggleview()
32 posix.sleep(1)
33 print ("toggle view...")
34 wmii.toggleview()
35 print ("")
37 --[[
38 print ("read some events...\n")
39 for x in wmii.iread("/event") do
40 print ("ev: " .. x .. "\n")
41 end
42 for x,y in wmii.ievents() do
43 print ("ev: " .. x .. " - " .. y)
44 end
45 ]]--