32 lines · 515 B · Text
RawDownload
# /dis/sh script# wm defines "menu" and "delmenu" builtinsload stdprompt='% ' ''fn % {$*}autoload=stdhome=/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 $*;	rescue 'bad redir' {} {		echo cwd `{pwd} > /chan/shctl	} >[2] /dev/null} plumber >/chan/wmstdout >[2=1] if {ftest -f $home/lib/wmsetup} {run $home/lib/wmsetup} {}