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
fix respawn error handling
[chiark-tcl-applet.git]
/
xbatmon-simple-tray
diff --git
a/xbatmon-simple-tray
b/xbatmon-simple-tray
index eb206f6f6d0323a0435c813f72b679cab5a5f9f4..e53945a4ab6e3c0010a07d59f964e5d06eda2cf9 100755
(executable)
--- a/
xbatmon-simple-tray
+++ b/
xbatmon-simple-tray
@@
-1,11
+1,24
@@
-#!/usr/bin/wish
+#!/usr/bin/wish
-f
# -*- Tcl -*-
# -*- Tcl -*-
+# usage:
+# xbatmon-simple-tray
+# [WISH-OPTIONS... [-- TRAY-EMBED-OPTIONS... [-- XBATMON-SIMPLE-OPTIONS...]]]
+
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]
+}
+
+while {[args::next_special arg]} {
+ switch -exact -- $arg {
+ -- { break }
+ default { args::badoption }
+ }
}
}
-applet::setup-subproc
70 70 horizontal darkblue 1
cmdline
+applet::setup-subproc cmdline