X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=example;h=2d07e86d135c6cb5a952452febc8c9f1af4c86e0;hb=f6dacaec04481ca53da7f627b463553cf254d745;hp=b9f1c64a966cc614c720c41e90ba20b42fa46775;hpb=8bb8186db142691bfb06753a00f2fb0ddc199e29;p=chiark-tcl-applet.git diff --git a/example b/example index b9f1c64..2d07e86 100755 --- 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 -#----- menu ----- +set debug::debug puts foreach b {1 3} { applet::setup-button-menu $b @@ -21,8 +25,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