chiark
/
gitweb
/
~ian
/
chiark-tcl-applet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
argument parser
[chiark-tcl-applet.git]
/
xbatmon-simple-tray
diff --git
a/xbatmon-simple-tray
b/xbatmon-simple-tray
index 77b9fb1a98e3299081e607f5bca79ff7593301d6..876cccbd5266aff36b712014fbc7050fe18b5235 100755
(executable)
--- a/
xbatmon-simple-tray
+++ b/
xbatmon-simple-tray
@@
-3,9
+3,18
@@
source applet.tcl
source subproc.tcl
source applet.tcl
source subproc.tcl
+source args.tcl
proc cmdline {id orientation} {
proc cmdline {id orientation} {
- return [list xacpi-simple -into $id]
+ global argv
+ return [concat [list xacpi-simple -into $id] $argv]
}
}
-applet::setup-subproc 50 50 horizontal darkblue 1 cmdline
+while {[args::next_special arg]} {
+ switch -exact $arg {
+ -- { break }
+ default { args::badoption }
+ }
+}
+
+applet::setup-subproc $args::w $args::h $args::orientation $args::bc $args::bw cmdline