summaryrefslogtreecommitdiff
path: root/lib/wmcharon
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /lib/wmcharon
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'lib/wmcharon')
-rw-r--r--lib/wmcharon28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/wmcharon b/lib/wmcharon
new file mode 100644
index 00000000..963acc42
--- /dev/null
+++ b/lib/wmcharon
@@ -0,0 +1,28 @@
+# /dis/sh script
+# wm defines "menu" and "delmenu" builtins
+load std
+prompt='% ' ''
+fn % {$*}
+autoload=std
+home=/usr/^"{cat /dev/user}
+
+if {! {~ wm ${loaded}}} {
+ echo wmsetup must run under wm >[1=2]
+ raise usage
+}
+
+fn wmrun {
+ args := $*
+ {
+ pctl newpgrp
+ fn wmrun
+ $args
+ } > /chan/wmstdout >[2] /chan/wmstderr &
+}
+
+fn cd {
+ builtin cd $*; echo cwd `{pwd} > /chan/shctl >[2] /dev/null
+}
+
+plumber >[2] /chan/wmstderr >/chan/wmstdout
+wmrun $*