├── README.md ├── bin └── rc │ ├── amail │ ├── anotes │ ├── dt │ ├── git │ └── review │ ├── f │ ├── riostart │ ├── common.rc │ ├── start │ └── ws │ │ ├── irc │ │ ├── main │ │ └── www │ ├── screen │ ├── ts │ ├── wircrc │ └── youtube ├── img ├── acme.jpg ├── glendalab.png ├── screen.acme.png ├── screen.irc.png ├── screen.png └── screen.www.png ├── lib ├── face │ └── 48x48x8 │ │ └── i │ │ └── igor.1 ├── plumbing └── profile └── src └── acme └── cmd └── acmeevent ├── acmeevent.c └── mkfile /README.md: -------------------------------------------------------------------------------- 1 |

2 | Banner 3 |

4 |

5 | 9Front collection of programs, scripts, and notes 6 |

7 | 8 | # Desktop 9 | 10 | ## Screen 11 | 12 | When using the builtin notebook screen `vgasize=1440x900x32` works great. On the external monitor `vesa=2560x1440x32` works great (YMMV). To accommodate both I always boot using the smaller size and have the following **rc** script called `screen` to adjust the monitor size: 13 | 14 | ```sh 15 | ; screen big 16 | ; screen small 17 | ; cat $home/bin/rc/screen 18 | #!/bin/rc 19 | # -- vgasize=1440x900x32 20 | # @{rfork n; aux/realemu; aux/vga -p} 21 | # internal: @{rfork n; aux/realemu; aux/vga -m vesa -l 1440x900x32} 22 | # external: @{rfork n; aux/realemu; aux/vga -m vesa -l 1856x1392x32} 23 | # external: @{rfork n; aux/realemu; aux/vga -m vesa -l 2560x1440x32} 24 | 25 | fn Help{ 26 | echo `{basename $0}^' (small|medium|large)' 27 | } 28 | fn SetDim{ 29 | @{rfork n; aux/realemu; aux/vga -m vesa -l $1} 30 | } 31 | switch ($#*) { 32 | case 0 33 | Help 34 | case * 35 | switch ($1) { 36 | case small ; SetDim 1440x900x32 37 | case medium ; SetDim 1856x1392x32 38 | case large ; SetDim 2560x1440x32 39 | case * 40 | Help 41 | } 42 | } 43 | ``` 44 | 45 | ## Workspaces 46 | 47 | **rio** is configured in a 2-column by 3-rows layout. The top row displays `stats` and `winwatch`. The bottom row has `vdir` and `faces` (don't have mail setup yet in 9front). 48 | 49 | The middle row houses applications in the `main` workspace such as windows with `rc` and `acme` as well as two `virtual` desktops. 50 | 51 | The following sketches out how this is configured (this is still WIP): 52 | 53 | ```sh 54 | ; cat $home/bin/rc/riostart 55 | #!/bin/rc 56 | window workspace.main 57 | ``` 58 | 59 | `workspace.main` takes care of figuring out the screen size and determining key coordinates to place windows the way I like them: 60 | 61 | ```sh 62 | ; cat $home/bin/rc/workspace.main 63 | #!/bin/rc 64 | # -- FUNS 65 | fn ScrDim{ # determine screen dimension (W H) 66 | w=0 67 | h=0 68 | devscr=/dev/screen 69 | if(test -r $devscr){ 70 | scr=`{read -c 59 $devscr} 71 | w=`{echo $scr(4) - $scr(2) | bc} 72 | h=`{echo $scr(5) - $scr(3) | bc} 73 | } 74 | if not { 75 | dim=(`{echo $vgasize | awk -Fx '{printf("%d %d", $1, $2)}'}) 76 | w=$dim(1) 77 | h=$dim(2) 78 | } 79 | echo $w $h 80 | } 81 | fn TopRow{ 82 | { xlen=$1 ; shift 1 } # param 1: list x length 83 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 84 | { ylen=$1 ; shift 1 } # param 3: list y length 85 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 86 | 87 | window -r ($x(1) $y(1) $x(2) $y(2)) stats -lmisce 88 | window $x(3)^,^$y(1)^,^$x(4)^,^$y(2) winwatch -e '^(winwatch|stats|faces|vdir)' 89 | } 90 | fn MidRow{ 91 | { xlen=$1 ; shift 1 } # param 1: list x length 92 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 93 | { ylen=$1 ; shift 1 } # param 3: list y length 94 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 95 | 96 | w=`{echo $x(4) - $x(1) | bc} 97 | h=`{echo $y(4) - $y(3) | bc} 98 | w0font=$font 99 | echo $w $h >$home/tmp/w0.dim 100 | window -hide -r ($x(1) $y(3) $x(4) $y(4)) rio -i workspace.w0 -f $w0font 101 | 102 | w=`{echo $x(4) - $x(1) | bc} 103 | h=`{echo $y(4) - $y(3) | bc} 104 | w1font=/lib/font/bit/pelm/euro.9.font 105 | echo $w $h >$home/tmp/w1.dim 106 | window -hide -r ($x(1) $y(3) $x(4) $y(4)) rio -i workspace.w1 -f $w1font 107 | 108 | window -hide -r ($x(1) $y(3) $x(4) $y(4)) acme -c3 -a 109 | window -r ($x(1) $y(3) $x(2) $y(4)) rc 110 | window -r ($x(3) $y(3) $x(4) $y(4)) rc 111 | } 112 | fn BotRow{ 113 | { xlen=$1 ; shift 1 } # param 1: list x length 114 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 115 | { ylen=$1 ; shift 1 } # param 3: list y length 116 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 117 | window -r ($x(1) $y(5) $x(2) $y(6)) vdir 118 | window -r ($x(3) $y(5) $x(4) $y(6)) faces 119 | } 120 | fn TileScreen{ 121 | Dim=(`{ScrDim}) # screen dimension (W x H) 122 | W=$Dim(1) 123 | H=$Dim(2) 124 | s=5 # space from border 125 | w=`{echo $W | awk '{print $1/2}'} # window width ratio 126 | h=`{echo $H | awk '{print $1/10}'} # window height ratio 127 | # x..list of x point pairs (2 columns -> 2 pairs) 128 | x=(`{echo $w $s | awk '{printf("%d %d %d %d", 129 | (0*$1)+$2 , (1*$1)-$2, 130 | (1*$1)+$2 , (2*$1)-$2)}'}) 131 | # y..list of y point pairs (3 rows -> 3 pairs) 132 | y=(`{echo $h $s | awk '{printf("%d %d %d %d %d %d", 133 | (0*$1)+$2 , ( 1*$1)-$2, 134 | (1*$1)+$2 , ( 9*$1)-$2, 135 | (9*$1)+$2 , (10*$1)-$2)}'}) 136 | TopRow $#x ($x) $#y ($y) 137 | MidRow $#x ($x) $#y ($y) 138 | BotRow $#x ($x) $#y ($y) 139 | } 140 | # -- MAIN 141 | >$home/tmp/w0.dim 142 | >$home/tmp/w1.dim 143 | TileScreen 144 | ``` 145 | 146 | You can see that two other workspaces are created, here is what one looks like to give an idea: 147 | 148 | ```sh 149 | ; cat $home/bin/rc/workspace.w1 150 | #!/bin/rc 151 | # -- FUNS 152 | fn TopRow{ 153 | { xlen=$1 ; shift 1 } # param 1: list x length 154 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 155 | { ylen=$1 ; shift 1 } # param 3: list y length 156 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 157 | window $x(1)^,^$y(1)^,^$x(4)^,^$y(2) winwatch -e '^(winwatch|stats|faces|vdir)' 158 | } 159 | fn MidRow{ 160 | { xlen=$1 ; shift 1 } # param 1: list x length 161 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 162 | { ylen=$1 ; shift 1 } # param 3: list y length 163 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 164 | #window -r ($x(1) $y(3) $x(2) $y(4)) rc 165 | #window -r ($x(3) $y(3) $x(4) $y(4)) rc 166 | } 167 | fn BotRow{ 168 | { xlen=$1 ; shift 1 } # param 1: list x length 169 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 170 | { ylen=$1 ; shift 1 } # param 3: list y length 171 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 172 | window -scroll -r ($x(1) $y(5) $x(4) $y(6)) wircrc 173 | } 174 | fn TileScreen{ 175 | Dim=(`{read -m $home/tmp/w1.dim}) # screen dimension (W x H) 176 | W=$Dim(1) 177 | H=$Dim(2) 178 | s=4 # space from border 179 | w=`{echo $W | awk '{print $1/2}'} # window width ratio 180 | h=`{echo $H | awk '{print $1/10}'} # window height ratio 181 | # x..list of x point pairs (2 columns -> 2 pairs) 182 | x=(`{echo $w $s | awk '{printf("%d %d %d %d", 183 | (0*$1)+$2 , (1*$1)-$2, 184 | (1*$1)+$2 , (2*$1)-$2)}'}) 185 | # y..list of y point pairs (3 rows -> 3 pairs) 186 | y=(`{echo $h $s | awk '{printf("%d %d %d %d %d %d", 187 | (0*$1)+$2 , ( 1*$1)-$2, 188 | (1*$1)+$2 , ( 9*$1)-$2, 189 | (9*$1)+$2 , (10*$1)-$2)}'}) 190 | TopRow $#x ($x) $#y ($y) 191 | MidRow $#x ($x) $#y ($y) 192 | BotRow $#x ($x) $#y ($y) 193 | } 194 | # -- MAIN 195 | label w1:irc 196 | TileScreen 197 | 198 | ``` 199 | 200 | Here is what the **main** workspace looks like: 201 | 202 |

203 | Screenshot 204 |

205 | 206 | **main** workspace with **acme** in front: 207 | 208 |

209 | Screenshot 210 |

211 | 212 | On this screenshot you can see the a virtual desktop with **wircrc** running: 213 | 214 |

215 | Screenshot 216 |

217 | 218 | And finally, this is what the web looks like :-P : 219 | 220 |

221 | Screenshot 222 |

223 | 224 | 225 | # Acme 226 | 227 |

228 | ACME 229 |

230 | 231 | `acmeevent` is a small program that prints all events an **acme** window receives (stolen a from **Plan9 from User Space**). 232 | 233 | Compile and install it: 234 | 235 | ```sh 236 | ; cd src/acme/cmd/acmeevent 237 | ; mk 238 | ; echo $objtype 239 | amd64 240 | ; cp acmeevent $home/bin/$objtype 241 | ``` 242 | 243 | Open **acme** and paste the following into the **tag** of the **window** you want to debug: 244 | 245 | ```sh 246 | cat /mnt/acme/$winid/event | acmeevent 247 | ``` 248 | 249 | Then you should see all events that are received by the **window** (see **event** in acme(4)). 250 | 251 | # Go 252 | 253 | To install Go one has to bootstrap the installation with an earlier version of Go already compiled for Plan 9. The process consists of obtaining the bootstap version and the target version, followed by telling the target version to use the bootstrapped version in order to build the toolchain. 254 | 255 | Temporary scratch space: 256 | ```sh 257 | term% ramfs 258 | term% cd /tmp 259 | ``` 260 | 261 | Download **bootstrap** and **target** versions of **go**: 262 | ```sh 263 | term% hget http://www.9legacy.org/download/go/go1.16.3-plan9-amd64-bootstrap.tbz | bunzip2 -c | tar x 264 | term% hget https://golang.org/dl/go1.16.3.src.tar.gz | gunzip -c | tar x 265 | ``` 266 | 267 | Create **target** installation directory and **bind** downloaded version to that directory: 268 | ```sh 269 | term% mkdir -p /sys/lib/go/amd64-1.16.3 270 | term% bind -c go /sys/lib/go/amd64-1.16.3 271 | ``` 272 | 273 | Setup `GOROOT_BOOTSTRAP`: 274 | ```sh 275 | term% cd /sys/lib/go/amd64-1.16.3/src 276 | term% GOROOT_BOOTSTRAP=/tmp/go-plan9-amd64-bootstrap 277 | ``` 278 | 279 | To pass standard library tests configure loopback address: 280 | ```sh 281 | term% ip/ipconfig -P loopback /dev/null 127.1 282 | term% ip/ipconfig -P loopback /dev/null ::1 283 | ``` 284 | 285 | Start the install: 286 | ```sh 287 | term% ./make.rc 288 | Building Go cmd/dist using /tmp/go-plan9-amd64-bootstrap 289 | Building Go toolchain1 using /tmp/go-plan9-amd64-bootstrap. 290 | Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. 291 | Building Go toolchain2 using go_bootstrap and Go toolchain1. 292 | Building Go toolchain3 using go_bootstrap and Go toolchain2. 293 | Building packages and commands for plan9/amd64. 294 | --- 295 | Installed Go for plan9/amd64 in /sys/lib/go/amd64-1.16.3 296 | Installed commands in /sys/lib/go/amd64-1.16.3/bin 297 | *** You need to bind /sys/lib/go/amd64-1.16.3/bin before /bin. 298 | ``` 299 | 300 | Persist installation and cleanup: 301 | ```sh 302 | term% unmount /sys/lib/go/amd64-1.16.3 303 | term% dircp /tmp/go /sys/lib/go/amd64-1.16.3 304 | term% cp /sys/lib/go/amd64-1.16.3/bin/* /amd64/bin 305 | term% unmount /tmp 306 | ``` 307 | 308 | Extend `$home/lib/profile` with: 309 | ```sh 310 | term % cat $home/lib/profile 311 | ... 312 | GO111MODULE=on 313 | switch($service){ 314 | case terminal 315 | bind -a $home/go/bin /bin 316 | ... 317 | ``` 318 | 319 | To build go modules CA certificates are required: 320 | ```sh 321 | term% hget https://curl.haxx.se/ca/cacert.pem >/sys/lib/tls/ca.pem 322 | ``` 323 | 324 | # Hugo 325 | 326 | To install the go based static site generator **hugo** you can do the following: 327 | 328 | ```sh 329 | ; mkdir -p $home/src 330 | ; cd $home/src 331 | ; git/clone https://github.com/1g0rb0hm/hugo 332 | ; cd hugo 333 | ; go install 334 | ``` 335 | 336 | -------------------------------------------------------------------------------- /bin/rc/amail: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | rfork n 3 | label Mail 4 | bind /dev/null /dev/label 5 | if (test -e /mnt/plumb/edit) 6 | bind /dev/null /mnt/plumb/edit 7 | if (test -e /mnt/term/mnt/plumb/edit) 8 | bind /dev/null /mnt/term/mnt/plumb/edit 9 | acme -c1 -l $home/acme.mail 10 | 11 | -------------------------------------------------------------------------------- /bin/rc/anotes: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | rfork n 3 | label Notes 4 | bind /dev/null /dev/label 5 | if (test -e /mnt/plumb/edit) 6 | bind /dev/null /mnt/plumb/edit 7 | if (test -e /mnt/term/mnt/plumb/edit) 8 | bind /dev/null /mnt/term/mnt/plumb/edit 9 | cd $home 10 | acme -c1 Notes/Inbox.md Notes/Work/Meetings.md Notes/Setup.md Notes/Develop.md 11 | -------------------------------------------------------------------------------- /bin/rc/dt/git: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | # run git via drawterm os command for nSIM project 3 | if(test -d /mnt/term/$OS_NSIM_SRC){ 4 | os -d $OS_NSIM_SRC git $* 5 | } 6 | if not { 7 | echo 'git failed: - '^$OS_NSIM_SRC^' not present' 8 | } 9 | -------------------------------------------------------------------------------- /bin/rc/dt/review: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | # run git diff drawterm os command for nSIM project 3 | if(test -d /mnt/term/$OS_NSIM_SRC){ 4 | A=develop 5 | B=`{dt/git branch --show-current} 6 | dt/git diff --relative --no-prefix `{dt/git merge-base $A $B} $B 7 | } 8 | if not { 9 | echo 'review failed: - '^$OS_NSIM_SRC^' not present' 10 | } 11 | -------------------------------------------------------------------------------- /bin/rc/f: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | walk | grep $* 3 | -------------------------------------------------------------------------------- /bin/rc/riostart/common.rc: -------------------------------------------------------------------------------- 1 | 2 | fn ScrDim{ # determine screen dimension (W H) 3 | w=0 4 | h=0 5 | devscr=/dev/screen 6 | if(test -r $devscr){ 7 | scr=`{read -c 59 $devscr} 8 | w=`{echo $scr(4) - $scr(2) | bc} 9 | h=`{echo $scr(5) - $scr(3) | bc} 10 | } 11 | if not { 12 | dim=(`{echo $vgasize | awk -Fx '{printf("%d %d", $1, $2)}'}) 13 | w=$dim(1) 14 | h=$dim(2) 15 | } 16 | echo $w $h 17 | } 18 | 19 | fn PutWsDim{ 20 | w=$1 21 | h=$2 22 | echo $w $h >$home/tmp/riostart.ws.dim 23 | } 24 | 25 | fn GetWsDim{ 26 | read -m $home/tmp/riostart.ws.dim 27 | } 28 | -------------------------------------------------------------------------------- /bin/rc/riostart/start: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | 3 | window riostart/ws/main 4 | -------------------------------------------------------------------------------- /bin/rc/riostart/ws/irc: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | . /bin/riostart/common.rc 3 | 4 | # -- FUNS 5 | fn TopRow{ 6 | { xlen=$1 ; shift 1 } # param 1: list x length 7 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 8 | { ylen=$1 ; shift 1 } # param 3: list y length 9 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 10 | window $x(1)^,^$y(1)^,^$x(4)^,^$y(2) winwatch -e '^(winwatch|stats|faces|vdir|wircrc)' 11 | } 12 | fn MidRow{ 13 | { xlen=$1 ; shift 1 } # param 1: list x length 14 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 15 | { ylen=$1 ; shift 1 } # param 3: list y length 16 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 17 | #window -r ($x(1) $y(3) $x(2) $y(4)) rc 18 | #window -r ($x(3) $y(3) $x(4) $y(4)) rc 19 | } 20 | fn BotRow{ 21 | { xlen=$1 ; shift 1 } # param 1: list x length 22 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 23 | { ylen=$1 ; shift 1 } # param 3: list y length 24 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 25 | window -scroll -r ($x(1) $y(5) $x(4) $y(6)) rc 26 | } 27 | fn TileScreen{ 28 | Dim=(`{GetWsDim}) # screen dimension (W x H) 29 | W=$Dim(1) 30 | H=$Dim(2) 31 | s=4 # space from border 32 | w=`{echo $W | awk '{print $1/2}'} # window width ratio 33 | h=`{echo $H | awk '{print $1/10}'} # window height ratio 34 | # x..list of x point pairs (2 columns -> 2 pairs) 35 | x=(`{echo $w $s | awk '{printf("%d %d %d %d", 36 | (0*$1)+$2 , (1*$1)-$2, 37 | (1*$1)+$2 , (2*$1)-$2)}'}) 38 | # y..list of y point pairs (3 rows -> 3 pairs) 39 | y=(`{echo $h $s | awk '{printf("%d %d %d %d %d %d", 40 | (0*$1)+$2 , ( 1*$1)-$2, 41 | (1*$1)+$2 , ( 9*$1)-$2, 42 | (9*$1)+$2 , (10*$1)-$2)}'}) 43 | TopRow $#x ($x) $#y ($y) 44 | MidRow $#x ($x) $#y ($y) 45 | BotRow $#x ($x) $#y ($y) 46 | } 47 | # -- MAIN 48 | label ws:irc 49 | TileScreen 50 | -------------------------------------------------------------------------------- /bin/rc/riostart/ws/main: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | . /bin/riostart/common.rc 3 | 4 | # -- FUNS 5 | fn TopRow{ 6 | { xlen=$1 ; shift 1 } # param 1: list x length 7 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 8 | { ylen=$1 ; shift 1 } # param 3: list y length 9 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 10 | # -- stats 11 | window -r ($x(1) $y(1) \ 12 | `{echo $x(2) - 260|bc} $y(2)) stats -lme term.home nine.home 13 | # -- vdir 14 | window -r (`{echo $x(2) - 250|bc} $y(1) \ 15 | `{echo $x(3) + 250|bc} $y(2)) vdir 16 | # -- winwatch 17 | window `{echo $x(3) + 260|bc}^,^$y(1)^,^$x(4)^,^$y(2) winwatch -e '^(clock|winwatch|stats|faces|vdir)' 18 | } 19 | fn MidRow{ 20 | { xlen=$1 ; shift 1 } # param 1: list x length 21 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 22 | { ylen=$1 ; shift 1 } # param 3: list y length 23 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 24 | w=`{echo $x(4) - $x(1)|bc} 25 | h=`{echo $y(4) - $y(3)|bc} 26 | PutWsDim $w $h 27 | # -- Workspaces 28 | window -hide -r ($x(1) $y(3) $x(4) $y(4)) rio -i riostart/ws/www 29 | window -hide -r ($x(1) $y(3) $x(4) $y(4)) rio -i riostart/ws/irc 30 | # -- acme 31 | window -r ($x(1) $y(3) $x(4) $y(4)) acme -c3 -a 32 | # -- rc (left|right) 33 | window -hide -scroll -r ($x(1) $y(3) $x(2) $y(4)) 'label rc:left; rc' 34 | window -hide -scroll -r ($x(3) $y(3) $x(4) $y(4)) 'label rc:right; rc' 35 | # -- rcpu (left|right) 36 | window -hide -scroll -r ($x(1) $y(3) $x(2) $y(4)) 'label nine:rc:left; rcpu -p' 37 | window -hide -scroll -r ($x(3) $y(3) $x(4) $y(4)) 'label nine:rc:right; rcpu -p' 38 | } 39 | fn BotRow{ 40 | { xlen=$1 ; shift 1 } # param 1: list x length 41 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 42 | { ylen=$1 ; shift 1 } # param 3: list y length 43 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 44 | # -- kmesg 45 | window -scroll -r ($x(1) $y(5) \ 46 | `{echo $x(2) - 90|bc} $y(6)) 'label console:term; tail +0f /dev/kmesg' 47 | # -- clock 48 | window -r (`{echo $x(2) - 80|bc} $y(5) \ 49 | `{echo $x(3) + 80|bc} $y(6)) clock 50 | # -- faces 51 | window -scroll -r (`{echo $x(3) + 90|bc} $y(5) \ 52 | $x(4) $y(6)) faces -i 53 | } 54 | fn TileScreen{ 55 | Dim=(`{ScrDim}) # screen dimension (W x H) 56 | W=$Dim(1) 57 | H=$Dim(2) 58 | s=5 # space from border 59 | w=`{echo $W | awk '{print $1/2}'} # window width ratio 60 | h=`{echo $H | awk '{print $1/10}'} # window height ratio 61 | # x..list of x point pairs (2 columns -> 2 pairs) 62 | x=(`{echo $w $s | awk '{printf("%d %d %d %d", 63 | (0*$1)+$2 , (1*$1)-$2, 64 | (1*$1)+$2 , (2*$1)-$2)}'}) 65 | # y..list of y point pairs (3 rows -> 3 pairs) 66 | y=(`{echo $h $s | awk '{printf("%d %d %d %d %d %d", 67 | (0*$1)+$2 , ( 1*$1)-$2, 68 | (1*$1)+$2 , ( 9*$1)-$2, 69 | (9*$1)+$2 , (10*$1)-$2)}'}) 70 | TopRow $#x ($x) $#y ($y) 71 | MidRow $#x ($x) $#y ($y) 72 | BotRow $#x ($x) $#y ($y) 73 | } 74 | # -- MAIN 75 | TileScreen 76 | -------------------------------------------------------------------------------- /bin/rc/riostart/ws/www: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | . /bin/riostart/common.rc 3 | 4 | # -- FUNS 5 | fn TopRow{ 6 | { xlen=$1 ; shift 1 } # param 1: list x length 7 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 8 | { ylen=$1 ; shift 1 } # param 3: list y length 9 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 10 | window $x(1)^,^$y(1)^,^$x(4)^,^$y(2) winwatch -e '^(winwatch|stats|faces|vdir|rc)' 11 | } 12 | fn MidRow{ 13 | { xlen=$1 ; shift 1 } # param 1: list x length 14 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 15 | { ylen=$1 ; shift 1 } # param 3: list y length 16 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 17 | window -r ($x(1) $y(3) $x(2) $y(4)) rc 18 | window -r ($x(3) $y(3) $x(4) $y(4)) rc 19 | } 20 | fn BotRow{ 21 | { xlen=$1 ; shift 1 } # param 1: list x length 22 | { x=$*(1-$xlen) ; shift $xlen } # param 2: list x 23 | { ylen=$1 ; shift 1 } # param 3: list y length 24 | { y=$*(1-$ylen) ; shift $ylen } # param 4: list y 25 | window -scroll -r ($x(1) $y(5) $x(4) $y(6)) rc 26 | } 27 | fn TileScreen{ 28 | Dim=(`{GetWsDim}) # screen dimension (W x H) 29 | W=$Dim(1) 30 | H=$Dim(2) 31 | s=4 # space from border 32 | w=`{echo $W | awk '{print $1/2}'} # window width ratio 33 | h=`{echo $H | awk '{print $1/10}'} # window height ratio 34 | # x..list of x point pairs (2 columns -> 2 pairs) 35 | x=(`{echo $w $s | awk '{printf("%d %d %d %d", 36 | (0*$1)+$2 , (1*$1)-$2, 37 | (1*$1)+$2 , (2*$1)-$2)}'}) 38 | # y..list of y point pairs (3 rows -> 3 pairs) 39 | y=(`{echo $h $s | awk '{printf("%d %d %d %d %d %d", 40 | (0*$1)+$2 , ( 1*$1)-$2, 41 | (1*$1)+$2 , ( 9*$1)-$2, 42 | (9*$1)+$2 , (10*$1)-$2)}'}) 43 | TopRow $#x ($x) $#y ($y) 44 | MidRow $#x ($x) $#y ($y) 45 | BotRow $#x ($x) $#y ($y) 46 | } 47 | 48 | # -- MAIN 49 | label ws:www 50 | TileScreen 51 | -------------------------------------------------------------------------------- /bin/rc/screen: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | # -- vgasize=1440x900x32 3 | # @{rfork n; aux/realemu; aux/vga -p} 4 | # internal: @{rfork n; aux/realemu; aux/vga -m vesa -l 1440x900x32} 5 | # external: @{rfork n; aux/realemu; aux/vga -m vesa -l 1856x1392x32} 6 | # external: @{rfork n; aux/realemu; aux/vga -m vesa -l 2560x1440x32} 7 | 8 | fn Help{ 9 | echo `{basename $0}^' (small|medium|large)' 10 | } 11 | fn SetDim{ 12 | @{rfork n; aux/realemu; aux/vga -m vesa -l $1} 13 | } 14 | switch ($#*) { 15 | case 0 16 | Help 17 | case * 18 | switch ($1) { 19 | case small ; SetDim 1440x900x32 20 | case medium ; SetDim 1856x1392x32 21 | case large ; SetDim 2560x1440x32 22 | case * 23 | Help 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bin/rc/ts: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | # ts: print timestamp YYYY-MM-DD hh:mm 3 | 4 | dt=(`{date -t | tr 'T+' ' '}) # (date time timezone) 5 | t=(`{echo $dt(2) | tr ':' ' '}) # (hh mm ss) 6 | 7 | echo -n $dt(1) $t(1)^':'^$t(2) 8 | -------------------------------------------------------------------------------- /bin/rc/wircrc: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | 3 | basename `{echo $0} | tr -d \x0a >/mnt/wsys/label 4 | 5 | wins=() 6 | cons=() 7 | # 'irc.freenode.net!#plan9' \ 8 | # 'irc.freenode.net!#9front' \ 9 | chans=(\ 10 | 'irc.freenode.net!#cat-v' \ 11 | ) 12 | 13 | server=irc.freenode.net 14 | realname='0x2A' 15 | nick=boehm_igor 16 | pass=() 17 | userpass=`{auth/userpasswd 'server='^$server^' service=irc user='^$nick >[2]/dev/null} 18 | if(~ $#userpass 2) { 19 | nick=$userpass(1) 20 | pass=$userpass(2) 21 | } 22 | 23 | tmpdir=/tmp/ircrc.`{date -n} 24 | mkdir $tmpdir 25 | mntgen $tmpdir 26 | bind '#|' $tmpdir/ircrc 27 | 28 | rfork en 29 | 30 | fn wmk { 31 | id=$1 32 | >$tmpdir/ircrc/data1 { 33 | @{ 34 | rfork s 35 | d=$tmpdir/ircrc.$id 36 | p=`{cat /dev/ppid} 37 | mount $wsys $d 'new -scroll -pid '^$p || exit 38 | echo -n $id | sed 's/^.*!//' | tr -d \x0a >$d/label 39 | echo wnew $id $d $p 40 | <$d/cons { 41 | while(line=`{read}){ 42 | ~ $line '' || echo wtype $id $line 43 | label=`{sed -n 's/\* //gp' $d/label | tr -d \x0a} 44 | ~ $label '' || echo -n $label > $d/label 45 | } 46 | } 47 | } 48 | echo wclose $id 49 | } 50 | exit 51 | } 52 | 53 | fn wio { 54 | if(~ $1 $wins){ 55 | d=wd$1 56 | d=$$d 57 | if(! ~ $1 $server && 58 | ! ~ $1 *'!#'*){ 59 | if(! ~ `{cat $d/label} '* '*) { 60 | label = ('*' `{cat $d/label}) 61 | echo -n $label > $d/label 62 | } 63 | } 64 | shift 65 | @{echo `{date | awk '{print $4}'} $* >$d/cons} 66 | if(! ~ $* *NickServ* && 67 | ~ $*(3-) *^$nick^*) { 68 | if(! ~ `{cat $d/label} '* '*) { 69 | label = ('*' `{cat $d/label}) 70 | echo -n $label > $d/label 71 | } 72 | } 73 | } 74 | } 75 | 76 | fn sio { 77 | d=$1 78 | if(~ $d *!*) 79 | d=`{echo $d | awk -F'!' '{print $1}'} 80 | if(~ $d $cons){ 81 | d=cd$d 82 | d=$$d 83 | shift 84 | @{echo $* >$d/data} 85 | #@{echo $* >>$home/lib/rawirclog} 86 | } 87 | } 88 | 89 | fn wctl { 90 | if(~ $1 $wins){ 91 | d=wd$1 92 | d=$$d 93 | shift 94 | @{echo $* >$d/wctl} 95 | } 96 | } 97 | 98 | fn hangup { 99 | if(~ $1 $cons){ 100 | d=cd$1 101 | d=$$d 102 | @{echo hangup >$d/ctl} & 103 | } 104 | } 105 | 106 | fn trydial { 107 | $conn/ctl >[2]/dev/null || exit 'connect failed' 110 | <>$conn/data >[1=0] { 111 | irc 112 | exit 113 | } 114 | } 115 | } 116 | 117 | fn dial { 118 | echo $1 | ndb/csquery /net/cs | sed 's/> //g;/^$/d' | 119 | while(l=`{read} && ~ $#l 2 && ! @{trydial $l(2) $2}){ 120 | status=failed 121 | } 122 | } 123 | 124 | fn irc { 125 | >[3]$tmpdir/ircrc/data1 { 126 | echo cnew $server $conn >[1=3] 127 | tr -d ' ' | @{ 128 | while(line=`{read}){ 129 | echo $line >/dev/cons 130 | if(~ $line(1) PING) 131 | echo PONG $line(2-) 132 | if not { 133 | line=`{echo $line | sed ' 134 | s/^:([^!]+)[^ ]+ PRIVMSG (#[^ ]+)[^:]+:(.*)/cmsg '$server'!\2 \1 \3/g; 135 | s/^:([^!]+)[^ ]+ PRIVMSG :?([^ ]+)[^:]+:(.*)/cmsg '$server'!\1 \1 \3/g; 136 | s/^:([^!]+)[^ ]+ NOTICE \*[^:]+:(.*)/cmsg '$server' \1 \2/g; 137 | s/^:([^!]+)[^ ]+ NOTICE ([^ ]+)[^:]+:(.*)/cmsg '$server'!\1 \1 \3/g; 138 | s/^:([^!]+)[^ ]+ ([0-9]+)[^:]+:?(.*)/xmsg '$server' \2 \3/g; 139 | s/^:([^!]+)[^ ]+ (MODE|TOPIC) (#[^ ]+) :?(.*)/xmsg '$server'!\3 \2 \4/g; 140 | s/^:([^!]+)[^ ]+ (QUIT|NICK) :(.*)/xmsg '$server' \2 \1 \3/g; 141 | s/^:([^!]+)[^ ]+ (JOIN|PART) (#[^\ ]+).*/xmsg '$server'!\3 \2 \1/g; 142 | s/^:(.*) (PONG) [^ ]+[^:]+:(.*)/cmsg '$server'!\1 \1 \2/g; 143 | '} 144 | ~ $line '' || echo $line >[1=3] 145 | } 146 | } 147 | } 148 | echo cclose $server >[1=3] 149 | } 150 | } 151 | 152 | fn shutdown { 153 | for(i in $cons) 154 | hangup $i 155 | for(i in $wins){ 156 | d=wp$i 157 | d=$$d 158 | @{echo hangup >/proc/$d/notepg} & 159 | } 160 | exec cat $tmpdir/ircrc/data >/dev/null 161 | } 162 | 163 | fn sighup { 164 | shutdown 165 | } 166 | 167 | fn sigint { 168 | shutdown 169 | } 170 | 171 | wmk $server & 172 | dial tcp!$server!6667 $server & 173 | 174 | <$tmpdir/ircrc/data { 175 | while(a=`{read}){ 176 | id=$a(2) 177 | switch($a(1)){ 178 | case cnew 179 | cd$id=$a(3) 180 | cons=($id $cons) 181 | sio $id USER $user foo bar :$realname 182 | sio $id NICK $nick 183 | if(! ~ $#pass 0) 184 | sio $id nickserv identify $pass 185 | for(i in $chans){ 186 | if(~ $i $id!'#'*){ 187 | wmk $i & 188 | sio $id JOIN `{echo $i | awk -F'!' '{print $2}'} 189 | } 190 | } 191 | case cclose 192 | d=cd$id 193 | $d=() 194 | oids=$cons 195 | cons=() 196 | for(i in $oids){ 197 | if(! ~ $i $id) 198 | cons=($i $cons) 199 | } 200 | for(i in $wins){ 201 | if(~ $i $id || ~ $i $id!*) 202 | wio $i HUNGUP $id 203 | } 204 | case wnew 205 | wd$id=$a(3) 206 | wp$id=$a(4) 207 | wins=($id $wins) 208 | wio $id '---' $id '---' 209 | case wclose 210 | d=wd$id 211 | p=wp$id 212 | unmount $$d 213 | $d=() 214 | $p=() 215 | oids=$wins 216 | wins=() 217 | for(i in $oids){ 218 | if(! ~ $i $id) 219 | wins=($i $wins) 220 | } 221 | if(~ $id $chans){ 222 | oids=$chans 223 | chans=() 224 | for(i in $oids){ 225 | if(! ~ $i $id) 226 | chans=($i $chans) 227 | } 228 | sio $id PART `{echo $id | awk -F'!' '{print $2}'} 229 | } 230 | case xmsg 231 | if(~ $id $wins) 232 | wio $id $a(3-) 233 | if not { 234 | for(i in $wins){ 235 | if(~ $i $id!*) 236 | wio $i $a(3-) 237 | } 238 | } 239 | case cmsg 240 | if(~ $id $wins) 241 | wio $id $a(3) '→' $a(4-) 242 | if not if(! ~ $id *!'#'*){ 243 | id=`{echo $id | awk -F'!' '{print $1}'} 244 | for(i in $wins) 245 | if(~ $i $id || ~ $i $id!*) 246 | wio $i /t $a(3) '→' $a(4-) 247 | } 248 | case wtype 249 | switch($a(3)){ 250 | case /x 251 | shutdown 252 | case /s 253 | server=$a(4) 254 | if(! ~ $server '' && ! ~ $server $cons){ 255 | if(! ~ $server $wins) 256 | wmk $server & 257 | dial tcp!$server!6667 irc $server & 258 | } 259 | case /j /t 260 | target=$a(4) 261 | server=`{echo $id | awk -F'!' '{print $1}'} 262 | if(! ~ $target '' && ~ $server $cons){ 263 | id=$server!$target 264 | if(~ $id $wins){ 265 | wctl $id unhide 266 | wctl $id current 267 | } 268 | if not { 269 | wmk $id & 270 | } 271 | if(~ $a(3) /j && ~ $target '#'*){ 272 | if(! ~ $id $chans){ 273 | chans=($id $chans) 274 | sio $server JOIN $target 275 | } 276 | } 277 | } 278 | case /h 279 | if(~ $a(3) $cons) 280 | id=$a(3) 281 | hangup `{echo $id | awk -F'!' '{print $1}'} 282 | case /n 283 | nick = $a(4) 284 | server=`{echo $id | awk -F'!' '{print $1}'} 285 | sio $server NICK $a(4) 286 | case /p 287 | server=`{echo $id | awk -F'!' '{print $1}'} 288 | sio $server PING $server 289 | case * 290 | target=`{echo $id | awk -F'!' '{print $2}'} 291 | if(~ $target '') 292 | sio $id $a(3-) 293 | if not { 294 | a=$a(3-) 295 | sio $id PRIVMSG $target ':'^$"a 296 | } 297 | } 298 | } 299 | } 300 | } 301 | shutdown 302 | -------------------------------------------------------------------------------- /bin/rc/youtube: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | rfork ne 3 | vitag=`{youtubedr -info $"1 | awk ' 4 | /av01/ { 5 | tags[ntags++] = $2 6 | if($2 == "398"){ # prefer hd720 7 | tags[0] = $2 8 | exit 9 | } 10 | } 11 | END { 12 | if(ntags > 0) 13 | print tags[0] 14 | } 15 | '} 16 | if(~ $#vitag 0) 17 | treason `"{youtubedr -i 18 -o /tmp/_vid.mp4 $"1} 18 | if not 19 | treason -a `"{youtubedr -i 140 -o /tmp/_aud.mp4 $"1} `"{youtubedr -i $vitag -o /tmp/_vid.mp4 $"1} 20 | rm -f /tmp/_^(aud vid)^.mp4 21 | -------------------------------------------------------------------------------- /img/acme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/acme.jpg -------------------------------------------------------------------------------- /img/glendalab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/glendalab.png -------------------------------------------------------------------------------- /img/screen.acme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/screen.acme.png -------------------------------------------------------------------------------- /img/screen.irc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/screen.irc.png -------------------------------------------------------------------------------- /img/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/screen.png -------------------------------------------------------------------------------- /img/screen.www.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/img/screen.www.png -------------------------------------------------------------------------------- /lib/face/48x48x8/i/igor.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1g0rb0hm/9lab/90c03cffa340d22df46aa4a7286b0acaf1300a84/lib/face/48x48x8/i/igor.1 -------------------------------------------------------------------------------- /lib/plumbing: -------------------------------------------------------------------------------- 1 | # to update: cp /usr/igor/lib/plumbing /mnt/plumb/rules 2 | 3 | editor = sam 4 | browser = mothra 5 | 6 | # plumb youtube videos to treason 7 | type is text 8 | data matches 'https://(www.)?youtu(.)?be[^ ]+' 9 | plumb start window youtube ''''$0'''' 10 | 11 | include basic 12 | 13 | # existing files in /mnt/term, possibly tagged by line number, go to editor 14 | type is text 15 | data matches '([.a-zA-Z¡-￿0-9_/+\-]*[a-zA-Z¡-￿0-9_/+\-])('$addr')?' 16 | arg isfile /mnt/term/$1 17 | data set $file 18 | attr add addr=$3 19 | plumb to edit 20 | plumb client window $editor 21 | 22 | # nsim .(h|def) files are looked up in inc and passed to edit 23 | type is text 24 | data matches '([a-zA-Z¡-￿0-9/_\-]+\.(h|def))('$addr')?' 25 | arg isfile /n/nsim.dev/inc/$1 26 | data set $file 27 | attr add addr=$3 28 | plumb to edit 29 | plumb client $editor 30 | 31 | # .h files in /mnt/term are looked up in inc and passed to edit 32 | type is text 33 | data matches '([a-zA-Z¡-￿0-9/_\-]+\.h)('$addr')?' 34 | arg isfile /mnt/term/Library/Developer/CommandLineTools/usr/include/c++/v1/$1 35 | data set $file 36 | attr add addr=$3 37 | plumb to edit 38 | plumb client $editor 39 | 40 | # c++ <...> header files in /mnt/term are looked up in inc and passed to edit 41 | type is text 42 | data matches '<([a-zA-Z¡-￿0-9/_\-]+)>('$addr')?' 43 | arg isfile /mnt/term/Library/Developer/CommandLineTools/usr/include/c++/v1/$1 44 | data set $file 45 | attr add addr=$3 46 | plumb to edit 47 | plumb client $editor 48 | -------------------------------------------------------------------------------- /lib/profile: -------------------------------------------------------------------------------- 1 | bind -qa $home/bin/rc /bin 2 | bind -qa $home/bin/$cputype /bin 3 | font=/lib/font/bit/lucidasans/typeunicode.9.font 4 | editor=(sam -d -a) 5 | GO111MODULE=on 6 | switch($service){ 7 | case terminal 8 | bind -a $home/go/bin /bin 9 | webcookies 10 | webfs 11 | plumber 12 | echo -n accelerated > '#m/mousectl' 13 | echo -n 'res 3' > '#m/mousectl' 14 | prompt=('term% ' ' ') 15 | fn term%{ $* } 16 | editor=(sam -a) 17 | cat $home/lib/ssh/key > /mnt/factotum/ctl 18 | rio -i riostart 19 | case cpu 20 | bind /mnt/term/dev/cons /dev/cons 21 | bind -q /mnt/term/dev/consctl /dev/consctl 22 | >[2] /dev/null { 23 | cp /dev/sysname /mnt/term/dev/label 24 | if(wsys=`{cat /mnt/term/env/wsys}) 25 | wsys=/mnt/term^$wsys 26 | } 27 | bind -a /mnt/term/dev /dev 28 | bind -a $home/go/bin /bin 29 | prompt=('cpu% ' ' ') 30 | fn cpu%{ $* } 31 | editor=(sam -a) 32 | if(! test -e /mnt/term/dev/wsys){ 33 | # call from drawterm 34 | if(test -e /mnt/term/dev/secstore){ 35 | auth/factotum -n 36 | read -m /mnt/term/dev/secstore >/mnt/factotum/ctl 37 | echo >/mnt/term/dev/secstore 38 | } 39 | if not 40 | auth/factotum 41 | webcookies 42 | webfs 43 | plumber 44 | cat $home/lib/ssh/key > /mnt/factotum/ctl 45 | rio -i riostart 46 | } 47 | case con 48 | prompt=('cpu% ' ' ') 49 | } 50 | -------------------------------------------------------------------------------- /src/acme/cmd/acmeevent/acmeevent.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | /** 6 | * To view window events in acme on plan9 run the following in a tag: 7 | * 'cat /mnt/acme/$winid/event | acmeevent' 8 | */ 9 | 10 | int 11 | getn(Biobuf *b) 12 | { 13 | int c, n; 14 | 15 | n = 0; 16 | while((c = Bgetc(b)) != -1 && '0'<=c && c<='9') 17 | n = n*10+c-'0'; 18 | if(c != ' ') 19 | sysfatal("bad number syntax"); 20 | return n; 21 | } 22 | 23 | char* 24 | getrune(Biobuf *b, char *p) 25 | { 26 | int c; 27 | char *q; 28 | 29 | c = Bgetc(b); 30 | if(c == -1) 31 | sysfatal("eof"); 32 | q = p; 33 | *q++ = c; 34 | if(c >= Runeself){ 35 | while(!fullrune(p, q-p)){ 36 | c = Bgetc(b); 37 | if(c == -1) 38 | sysfatal("eof"); 39 | *q++ = c; 40 | } 41 | } 42 | return q; 43 | } 44 | 45 | void 46 | getevent(Biobuf *b, int *c1, int *c2, int *q0, int *q1, int *flag, int *nr, char *buf) 47 | { 48 | int i; 49 | char *p; 50 | 51 | *c1 = Bgetc(b); 52 | if(*c1 == -1) 53 | exits(0); 54 | *c2 = Bgetc(b); 55 | *q0 = getn(b); 56 | *q1 = getn(b); 57 | *flag = getn(b); 58 | *nr = getn(b); 59 | if(*nr >= 256) 60 | sysfatal("event string too long"); 61 | p = buf; 62 | for(i=0; i<*nr; i++) 63 | p = getrune(b, p); 64 | *p = 0; 65 | if(Bgetc(b) != '\n') 66 | sysfatal("expected newline"); 67 | } 68 | 69 | void 70 | main(void) 71 | { 72 | int c1, c2, q0, q1, eq0, eq1, flag, nr, x; 73 | Biobuf b; 74 | char buf[2000], buf2[2000], buf3[2000]; 75 | 76 | doquote = needsrcquote; 77 | quotefmtinstall(); 78 | Binit(&b, 0, OREAD); 79 | for(;;){ 80 | getevent(&b, &c1, &c2, &q0, &q1, &flag, &nr, buf); 81 | eq0 = q0; 82 | eq1 = q1; 83 | buf2[0] = 0; 84 | buf3[0] = 0; 85 | if(flag & 2){ 86 | /* null string with non-null expansion */ 87 | getevent(&b, &x, &x, &eq0, &eq1, &x, &nr, buf); 88 | } 89 | if(flag & 8){ 90 | /* chorded argument */ 91 | getevent(&b, &x, &x, &x, &x, &x, &x, buf2); 92 | getevent(&b, &x, &x, &x, &x, &x, &x, buf3); 93 | } 94 | print("event %c %c %d %d %d %d %d %d %q %q %q\n", 95 | c1, c2, q0, q1, eq0, eq1, flag, nr, buf, buf2, buf3); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/acme/cmd/acmeevent/mkfile: -------------------------------------------------------------------------------- 1 |