-#!/usr/bin/wish8.4 -f
+#!/usr/bin/wish -f
# -*- Tcl -*-
-source applet.tcl
-source subproc.tcl
+# Copyright 2016,2020 Ian Jackson
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
-applet::setup-debug puts
+# usage:
+# .../example program arguments...
+# will run
+# program arguments... WINDOWID
+# and program sbould put up an X11 window as a child of WINDOWID
+#
+# eg, for a silly example:
+# .../example xterm -id
+
+set lib .
+
+source $lib/applet.tcl
+source $lib/subproc.tcl
+source $lib/utils.tcl
+
+set debug::debug puts
foreach b {1 3} {
applet::setup-button-menu $b
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