blob: 963acc42ab50c1aa668f7497a772da7f289e2473 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 $*
|