chiark / gitweb /
fix option processing
[chiark-tcl-applet.git] / example
diff --git a/example b/example
index 4edb4041a650e919ba539d0987e2bb3ea371c067..6d3eb65a9452bc9620570f290060b256c2c048a8 100755 (executable)
--- a/example
+++ b/example
@@ -1,10 +1,13 @@
 #!/usr/bin/wish8.4 -f
 # -*- Tcl -*-
 
+# usage:
+#  xbatmon-simple-tray
+
 source applet.tcl
 source subproc.tcl
 
-#----- menu -----
+applet::setup-debug puts
 
 foreach b {1 3} {
     applet::setup-button-menu $b
@@ -21,8 +24,8 @@ foreach b {1 3} {
 applet::setup-tooltip { puts VIS } { puts INVIS }
 applet::tooltip-set "line\nanother"
 
-proc cmdline {id} {
+proc cmdline {id orientation} {
     return [list xacpi-simple -into $id]
 }
 
-applet::setup-subproc 40 darkblue 1 cmdline
+applet::setup-subproc cmdline