Unified · Split
| @@ -402,8 +402,9 @@ fs_read(Ixp9Req *r) { · 401 unmodified lines | |||
| 402 | ixp_respond(r, nil); | 402 | ixp_respond(r, nil); |
| 403 | return; | 403 | return; |
| 404 | case FsFWctl: | 404 | case FsFWctl: |
| 405 | // XXX TODO: visible, current | 405 | // XXX TODO: current |
| 406 | sprint(buf, "%11d %11d %11d %11d %s %s ", w->orig.x + w->screenr.min.x, w->orig.y + w->screenr.min.y, w->screenr.max.x, w->screenr.max.y, w-> visible ? "visible" : "hidden", "current"); | 406 | s = w-> visible ? "visible" : "hidden"; |
| 407 | sprint(buf, "%11d %11d %11d %11d %s %s ", w->orig.x + w->screenr.min.x, w->orig.y + w->screenr.min.y, w->screenr.max.x, w->screenr.max.y, s, "current"); | ||
| 407 | ixp_srv_readbuf(r, buf, strlen(buf)); | 408 | ixp_srv_readbuf(r, buf, strlen(buf)); |
| 408 | ixp_respond(r, nil); | 409 | ixp_respond(r, nil); |
| 409 | return; | 410 | return; |
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/rc | 1 | #!/bin/rc |
| 2 | 2 | ||
| 3 | # Usage | 3 | # Usage |
| 4 | # wctl=`{wctl $wsys} | 4 | # wctl=`{ wctl wsys [defaultcmd] } |
| 5 | 5 | ||
| 6 | fn window-m { | 6 | fn window-m { |
| 7 | dir = /mnt/wsys | 7 | dir = /mnt/wsys |
| @@ -26,11 +26,15 @@ fn window-m { · 18 unmodified lines | |||
| 26 | case -hide | 26 | case -hide |
| 27 | shift | 27 | shift |
| 28 | } | 28 | } |
| 29 | if(~ $#* 0) cmd = rc | 29 | if(~ $#* 0) cmd = $defaultcmd |
| 30 | if not cmd = $* | 30 | if not cmd = $* |
| 31 | echo -n `{basename $cmd(1)} > /dev/label >[2] /dev/null | 31 | echo -n `{basename $cmd(1)} > /dev/label >[2] /dev/null |
| 32 | { | 32 | if(test -f $dir/kill){ |
| 33 | echo kill > /proc/^`{cat $dir/kill}^/note | 33 | f=/proc/^`{cat $dir/kill}^/note |
| 34 | # the proces could have finished on | ||
| 35 | # its own, check it is still there. | ||
| 36 | if(test -f $f) | ||
| 37 | echo kill > $f | ||
| 34 | } & | 38 | } & |
| 35 | exec $cmd < /dev/cons > /dev/cons >[2] /dev/cons | 39 | exec $cmd < /dev/cons > /dev/cons >[2] /dev/cons |
| 36 | } | 40 | } |
| @@ -51,12 +55,17 @@ fn wctl { · 14 unmodified lines | |||
| 51 | if (~ $a(1) new) $a | 55 | if (~ $a(1) new) $a |
| 52 | } | 56 | } |
| 53 | 57 | ||
| 54 | if(! ~ $1 '') | 58 | defaultcmd=(rio -i window) |
| 59 | if(! ~ $1 ''){ | ||
| 55 | wsys=$1 | 60 | wsys=$1 |
| 61 | shift | ||
| 62 | } | ||
| 56 | if(~ $wsys ''){ | 63 | if(~ $wsys ''){ |
| 57 | echo 'wctl: $wsys not defined' | 64 | echo 'wctl: $wsys not defined' |
| 58 | exit bad | 65 | exit bad |
| 59 | } | 66 | } |
| 67 | if(! ~ $1 '') | ||
| 68 | defaultcmd=$* | ||
| 60 | 69 | ||
| 61 | service=wctl.$user | 70 | service=wctl.$user |
| 62 | # we want to know the pid of the wctl rc, | 71 | # we want to know the pid of the wctl rc, |