chiark / gitweb /
example can run other programs
[chiark-tcl-applet.git] / example
diff --git a/example b/example
index b9f1c64a966cc614c720c41e90ba20b42fa46775..bd05b1787c97e1eac55a04fbd26b9e3586f40613 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,9 @@ foreach b {1 3} {
 applet::setup-tooltip { puts VIS } { puts INVIS }
 applet::tooltip-set "line\nanother"
 
-proc cmdline {id} {
-    return [list xacpi-simple -into $id]
+proc cmdline {id orientation} {
+    global argv
+    return [concat $argv $id]
 }
 
-applet::setup-subproc 40 cmdline
+applet::setup-subproc cmdline