chiark / gitweb /
do not destroy .i.i.make-exist, since this sometimes causes trouble
[chiark-tcl-applet.git] / example
diff --git a/example b/example
index 0321c6babae35b53ff2af8b6d7d7a17cdd6e46c2..2d07e86d135c6cb5a952452febc8c9f1af4c86e0 100755 (executable)
--- a/example
+++ b/example
@@ -1,10 +1,14 @@
 #!/usr/bin/wish8.4 -f
 # -*- Tcl -*-
 
+# usage:
+#  xbatmon-simple-tray
+
 source applet.tcl
 source subproc.tcl
+source utils.tcl
 
-applet::setup-debug puts
+set debug::debug puts
 
 foreach b {1 3} {
     applet::setup-button-menu $b
@@ -22,7 +26,8 @@ applet::setup-tooltip { puts VIS } { puts INVIS }
 applet::tooltip-set "line\nanother"
 
 proc cmdline {id orientation} {
-    return [list xacpi-simple -into $id]
+    global argv
+    return [concat $argv $id]
 }
 
-applet::setup-subproc 40 40 horizontal darkblue 1 cmdline
+applet::setup-subproc cmdline