X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl-applet.git;a=blobdiff_plain;f=xbatmon-simple-tray;h=e53945a4ab6e3c0010a07d59f964e5d06eda2cf9;hp=6c617c3e446f40aefdf7debf190dc9c40e2422ec;hb=0ea9173f66089f0fc27a9d2751a44e15c16ca235;hpb=164fa32f125324078dbf45342d5e2a363a04ef1c diff --git a/xbatmon-simple-tray b/xbatmon-simple-tray index 6c617c3..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} { + global argv + return [concat [list xacpi-simple -into $id] $argv] +} -proc cmdline {id} { - return [list xacpi-simple -into $id] +while {[args::next_special arg]} { + switch -exact -- $arg { + -- { break } + default { args::badoption } + } } -applet::setup-subproc 70 darkblue 1 cmdline +applet::setup-subproc cmdline