X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=xbatmon-simple-tray;h=e53945a4ab6e3c0010a07d59f964e5d06eda2cf9;hb=26a08255c2b85fb059d91c408c01851e87e7fa68;hp=77b9fb1a98e3299081e607f5bca79ff7593301d6;hpb=81dfaea18e9a861fda1949e0ebf88d5c878f1b10;p=chiark-tcl-applet.git diff --git a/xbatmon-simple-tray b/xbatmon-simple-tray index 77b9fb1..e53945a 100755 --- a/xbatmon-simple-tray +++ b/xbatmon-simple-tray @@ -1,11 +1,24 @@ -#!/usr/bin/wish +#!/usr/bin/wish -f # -*- Tcl -*- +# usage: +# xbatmon-simple-tray +# [WISH-OPTIONS... [-- TRAY-EMBED-OPTIONS... [-- XBATMON-SIMPLE-OPTIONS...]]] + source applet.tcl source subproc.tcl +source args.tcl proc cmdline {id orientation} { - return [list xacpi-simple -into $id] + global argv + return [concat [list xacpi-simple -into $id] $argv] +} + +while {[args::next_special arg]} { + switch -exact -- $arg { + -- { break } + default { args::badoption } + } } -applet::setup-subproc 50 50 horizontal darkblue 1 cmdline +applet::setup-subproc cmdline