diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-04-11 19:47:05 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-04-11 19:47:05 +0000 |
commit | 45bab89362ebe122d60d5e9b1e2b949b26168db3 (patch) | |
tree | c430eb677a06d8c823fd1d2d4a9f7790c0c275d2 /usr | |
parent | 05569f6f2c54a19c1c85a7f10742913cd8904787 (diff) |
livecd
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/glenda/bin/rc/pull | 17 | ||||
-rwxr-xr-x | usr/glenda/bin/rc/riostart | 17 | ||||
-rwxr-xr-x | usr/glenda/bin/rc/screensize | 9 | ||||
-rw-r--r-- | usr/glenda/lib/acme.dump | 12 | ||||
-rw-r--r-- | usr/glenda/lib/acme.dump.small | 16 | ||||
-rwxr-xr-x | usr/glenda/lib/first.window | 5 | ||||
-rw-r--r-- | usr/glenda/lib/newstime | 0 | ||||
-rw-r--r-- | usr/glenda/lib/plumbing | 6 | ||||
-rw-r--r-- | usr/glenda/lib/profile | 36 | ||||
-rw-r--r-- | usr/glenda/readme.acme | 102 | ||||
-rw-r--r-- | usr/glenda/readme.rio | 178 |
11 files changed, 398 insertions, 0 deletions
diff --git a/usr/glenda/bin/rc/pull b/usr/glenda/bin/rc/pull new file mode 100755 index 000000000..42b5ecc27 --- /dev/null +++ b/usr/glenda/bin/rc/pull @@ -0,0 +1,17 @@ +#!/bin/rc + +rfork e +flags=() +while(! ~ $#* 0 && ~ $1 -*){ + if(~ $1 -c -s){ + flags=($flags $1) + shift + } + flags=($flags $1) + shift +} +if(test -f /srv/kfs.cmd) + disk/kfscmd allow +replica/pull -v $flags /dist/replica/network $* +if(test -f /srv/kfs.cmd) + disk/kfscmd disallow diff --git a/usr/glenda/bin/rc/riostart b/usr/glenda/bin/rc/riostart new file mode 100755 index 000000000..c8515d08e --- /dev/null +++ b/usr/glenda/bin/rc/riostart @@ -0,0 +1,17 @@ +#!/bin/rc + +scr=(`{cat /dev/draw/new >[2]/dev/null || status=''}) +wid=$scr(11) +ht=$scr(12) + +window 0,0,161,117 stats -lmisce +window 161,0,560,117 faces -i + +if(~ `{screensize} small) + dump=acme.dump.small +if not + dump=acme.dump + +a=`{echo $wid-35 | hoc } +window 60,90,$a,$ht acme -l lib/$dump +window 20,140,610,450 /usr/glenda/lib/first.window diff --git a/usr/glenda/bin/rc/screensize b/usr/glenda/bin/rc/screensize new file mode 100755 index 000000000..e38ed4d47 --- /dev/null +++ b/usr/glenda/bin/rc/screensize @@ -0,0 +1,9 @@ +#!/bin/rc + +scr=(`{cat /dev/draw/new >[2]/dev/null || status=''}) +wid=$scr(11) +ht=$scr(12) +if(test $wid -le 1024) + echo small +if not + echo normal diff --git a/usr/glenda/lib/acme.dump b/usr/glenda/lib/acme.dump new file mode 100644 index 000000000..1be4a18ec --- /dev/null +++ b/usr/glenda/lib/acme.dump @@ -0,0 +1,12 @@ +/usr/glenda +/lib/font/bit/lucidasans/unicode.8.font +/lib/font/bit/lucm/unicode.9.font + 0 20 75 +f 0 24 0 0 1 + 24 34 16 1 0 /usr/glenda/ Del Snarf Get | Look +f 1 25 567 567 1 + 25 34 567 0 0 readme.acme Del Snarf Undo | Look +e 2 0 0 0 1 + 23 49 52 0 0 /mail/fs/mbox/ Del Snarf | Look Put Mail Delmesg +/acme/mail +Mail mbox diff --git a/usr/glenda/lib/acme.dump.small b/usr/glenda/lib/acme.dump.small new file mode 100644 index 000000000..518a483f7 --- /dev/null +++ b/usr/glenda/lib/acme.dump.small @@ -0,0 +1,16 @@ +/usr/glenda +/lib/font/bit/lucidasans/unicode.7.font +/lib/font/bit/lucidasans/typelatin1.7.font + 0 20 75 +f 0 24 0 0 1 + 24 34 16 1 0 /usr/glenda/ Del Snarf Get | Look +e 0 0 0 0 8 + 28 51 6 0 1 /usr/glenda/-serzone Del Snarf | Look Send Noscroll +/usr/glenda +win +f 1 25 567 567 1 + 25 34 567 0 0 readme.acme Del Snarf Undo | Look +e 2 0 0 0 1 + 23 49 52 0 0 /mail/fs/mbox/ Del Snarf | Look Put Mail Delmesg +/acme/mail +Mail mbox diff --git a/usr/glenda/lib/first.window b/usr/glenda/lib/first.window new file mode 100755 index 000000000..cf9544e98 --- /dev/null +++ b/usr/glenda/lib/first.window @@ -0,0 +1,5 @@ +#!/bin/rc +echo -n readme > /dev/label +cat readme.rio +exec rc -i + diff --git a/usr/glenda/lib/newstime b/usr/glenda/lib/newstime new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/usr/glenda/lib/newstime diff --git a/usr/glenda/lib/plumbing b/usr/glenda/lib/plumbing new file mode 100644 index 000000000..b209d2d66 --- /dev/null +++ b/usr/glenda/lib/plumbing @@ -0,0 +1,6 @@ +# to update: cp /usr/glenda/lib/plumbing /mnt/plumb/rules + +editor = acme + +include basic + diff --git a/usr/glenda/lib/profile b/usr/glenda/lib/profile new file mode 100644 index 000000000..fe2728986 --- /dev/null +++ b/usr/glenda/lib/profile @@ -0,0 +1,36 @@ +bind -a $home/bin/rc /bin +bind -a $home/bin/$cputype /bin +bind -c tmp /tmp +if(! syscall create /tmp/xxx 1 0666 >[2]/dev/null) + ramfs # in case we're running off a cd +font = /lib/font/bit/pelm/euro.9.font +upas/fs +fn cd { builtin cd $* && awd } # for acme +switch($service){ +case terminal + plumber + echo -n accelerated > '#m/mousectl' + echo -n 'res 3' > '#m/mousectl' + prompt=('term% ' ' ') + fn term%{ $* } + exec rio -i riostart +case cpu + if (test -e /mnt/term/mnt/wsys) { # rio already running + bind -a /mnt/term/mnt/wsys /dev + if(test -w /dev/label) + echo -n $sysname > /dev/label + } + bind /mnt/term/dev/cons /dev/cons + bind /mnt/term/dev/consctl /dev/consctl + bind -a /mnt/term/dev /dev + prompt=('cpu% ' ' ') + fn cpu%{ $* } + news + if (! test -e /mnt/term/mnt/wsys) { # cpu call from drawterm + font=/lib/font/bit/pelm/latin1.8.font + exec rio + } +case con + prompt=('cpu% ' ' ') + news +} diff --git a/usr/glenda/readme.acme b/usr/glenda/readme.acme new file mode 100644 index 000000000..18cc16ad0 --- /dev/null +++ b/usr/glenda/readme.acme @@ -0,0 +1,102 @@ +Welcome to acme, the editor/shell/window system hybrid. Acme is a +complete environment you can use to edit, run programs, browse the +file system, etc. + +You can scroll the text this window by moving the mouse into +the window (no clicking necessary) and typing the up and down +arrows. + +When you start Acme, you see several windows layered into two +columns. Above each window, you can see a ``tag line'' (in blue). The +first thing to notice is that all the text you see is just that: +text. You can edit anything at will. + +For example, in the left column is a directory window. +If you look at the window's tag line, you will see that it contains + + /usr/glenda/ Del Snarf Get | Look + +(This might be truncated if the column is narrow.) +That is just text. + +Each mouse button (1, 2, 3, from left to right) does a different +thing in Acme: + + * Button 1 can be used to select text (press it, sweep, release it), + and also to select the point where text would be inserted in the + window. Use it now in your /usr/glenda window. + * Button 2 can be used to execute things. For example, use button 1 + to type "ls -l" before "lib/" in the window showing + /usr/glenda. Now use button 2 to select "ls -l lib/" (press + it, select, release it). As you can see, button 2 means + "execute this". + * Button 3 can be used to get things. For example, click button 3 on + "lib/" within the "/usr/glenda" window. Can you see how a new window + shows the contents of "/usr/glenda/lib"? Button 3 can also be used + to search within the body of a window. Just click button 3 on the + thing you want to search. Again, you can select something with + button 1 and then use button 3 on the selection. + +You can double-click with button 1 to select words; a double click at +the end or beginning of a line selects the whole line. Once you have +text selected, you can click on it with button 2 to execute the +selected text. A single click of button 2 would execute the word +clicked as a command. + +Now let's pay attention to the tag line once more. As you can see, +the left part has a path. That is the name for the window and shows +also the directory for the thing shown (file/directory/program +output). When you execute something using button 2, the current +directory for the command is the directory shown in the left part of +the tag (if the thing shown is a file, its directory is used). + +As you saw before in the example, there are windows labeled +"/dir/+Errors", that is where Acme shows the output of a command +executed in "/dir". + +Another thing you can see is that tag lines contain words like "New", +"Del", "Snarf", etc. Those are commands understood (implemented) by +Acme. When you request execution of one of them, Acme does the job. +For example, click with button 2 on "Del" in the +"/usr/glenda/+Errors" window: it's gone. + +The commands shown by Acme are just text and by no means special. Try +to type "Del" within the body of the window "/usr/glenda", and then +click (button-2) on it. + +These are some commands understood by Acme: + * Newcol: create a new column of windows + * Delcol: delete a column + * New: create a new window (edit it's tag to be a file name and you + would be creating a new file; you would need to click on "Put" to + put the file in the file system). + * Put: write the body to disk. The file is the one named in the tag. + * Get: refresh the body (e.g. if it's a directory, reread it and + show it). + * Snarf: What other window systems call "Copy". + * Paste: Can you guess it? + * Exit: exit acme + +Acme likes to place new windows itself. If you prefer to change the +layout of a window, you only need to drag the layout box at the left +of the tag line and drop it somewhere else. The point where you drop +it selects the column where the window is to be placed now, as well +as the line where the window should start. You can also click the +layout box to enlarge its window a small amount (button 1), as much +as possible without obscuring other tag lines in the column (button +2), and to fill the whole column (button 3). You can get your other +windows back by button-1- or button-2-clicking the layout box. + +This is mostly what you need to get started with Acme. You are +missing a very useful feature: using combinations (chords) of mouse +buttons to do things. You can cut, paste, snarf, and pass arguments +to programs using these mouse chords. You can read this in the +acme(1) manual page, but it's actually extremely simple: Select a +region with button 1 but don't release the button. Now clicking +button 2 deletes the selected text (putting it into the snarf +buffer); clicking button 3 replaces the selected text with the snarf +buffer. That's it! + +For more information, read /sys/doc/acme/acme.ps (you can just +button-3 click on that string to view the file). + diff --git a/usr/glenda/readme.rio b/usr/glenda/readme.rio new file mode 100644 index 000000000..0eb0e44db --- /dev/null +++ b/usr/glenda/readme.rio @@ -0,0 +1,178 @@ +Rio is the Plan 9 window system. + +To read more of this window, the up and down arrows +scroll the text up and down half screens. + +To effectively use rio, you need at least a three +button mouse. If you only have a two button mouse you +can emulate the middle button by holding down shift key +whilst pressing the right button. + +Button 1, 2, and 3 are used to refer to the left, +middle, and right buttons respectively. + +THE POP-UP MENU + +Pressing and holding down button 3 on the desktop or +shell window will give you a menu with the following +options: + + * New - create a new window + * Resize - reshape a window + * Move - move a window without reshaping it + * Delete - close a window + * Hide - hides a window from display (it will appear + in this menu) + * <label> - the label of a hidden window, + selecting it unhides it + +You select an item by releasing the button over the +menu item. rio uses the same button that started an +action throughout that operation. If you press another +button during the action the operation is aborted and +any intermediate changes are reversed. + +The menu acts as a action verb selector which then +requires an object (i.e. window) to be picked to +indicate which window the verb is to act on. A further +mouse action may then be required. + +EXAMPLES + +After selecting New, the cursor will change into a +cross. Using button 3 again, you should then drag out +a rectangle to indicate the size and location of the +new window. When you release the button a new window +will be created. + +New windows will contain the rc shell. Invoking a rio +program from the shell will allow that program to take +over the window. As there is no job control in the +shell (e.g. &, fg, bg), you just create another window +if you want to run another program concurrently. + +To Resize a window, you select Resize, then click +(remember using the same button that started the +action, i.e. button 3) on the window you want to +resize. The cursor will change to a cross-hair theat +will allow you to drag out the desired shape of the +window. + +After selecting Move, click and keep the button +depressed over the window you want to move, then move +the mouse to move the red rectangle that represents the +new location you want. Release the button to finish +the action. + +Delete and Hide both operate by requiring you to click +on the window you wish to respectively Delete or Hide. + +WINDOW CONTROL TIPS + +Clicking on a window brings it to the front. + +You can directly change the shape of a window by +clicking and dragging on the edge or corner of the +window border. Button 1 or 2 will allow you to drag +the edge or corner to a new size, and Button 3 will +allow you to move the window. + +The pop-up menu remembers the last command chosen, so +as a short cut you can just press and release button 3 +without moving the mouse between pressing and releasing +to select the previous command again. + +BASIC TEXT CONTROL + +Unlike in other systems, the text cursor can only be +controlled by the mouse or the side-effects of certain +commands. + +Clicking with button 1 will move the text insertion +point (indicated by an I-beam) to just before the +character closest to the mouse pointer. Dragging +across a section of text will select that portion of +text. It may be useful to know that the insertion +I-beam represents an empty selection (between two +characters). In text editors, the current selection is +known as "dot". + +In the shell window button 2 will invoke a pop-up menu. +Most of it's commands operate on dot. + + * cut - moves the contents of the dot to the clipboard + if dot is non-empty + * paste - replaces dot with the contents of the clipboard + * snarf - copies dot to the clipboard + * plumb - sends dot (or text surrounding dot, if dot is + empty)to the plumber. + * send - completes the current input line with the dot, + if it is non-empty, or the contents of the clipboard. + If the dot is non-empty it does a snarf at the same time. + * scroll - toggles the automatic scrolling of the window + on output. + +Double-clicking will allow you to automatically select +a section of text surrounding that point. The +selection is made by an analysis of appropriate +delimeters. A whole line is selected by +double-clicking at either end of the line. A quoted or +bracketed selection is made by double-clicking just +inside of the quote or bracket. + +SCROLLING + +The arrow keys will let you scroll up or down by half a +page at a time. + +Clicking button 1 on the scrollbar scrolls up by half a +page. Button 3 scrolls down by half a page. Button 2 +jumps to position in the document relative to the +position on the scrollbar clicked. Holding a button on +the scrollbar will have the effect of invoking the +clicking action continuously. + +The white elevator box on the scrollbar is sized +proportionally to the proportion of the document that +is currently visible. + +Scrolling does not affect the text cursor. + +RIO AND THE RC SHELL WINDOW + +Rc is a command interpreter for Plan 9 that provides +similar facilities to UNIX's Bourne shell. See the +additional references at the end of this document for +information specifically about rc. + +Rio provides some additional features that enhance the +interface to programs that use the text console. The +rc shell command interpreter is one such program. + +Rc commands are typed after the prompt on the last line +of the text buffer. The commands are sent to rc only +after each newline so line editing may be performed if +desired. You can move the cursor and edit the previous +lines of commands and program output but none of this +will be interpreted by rc shell. + +The interpretation of commands is supressed altogether +when ESC is pressed to put the window in hold mode. +The window border and text will change to dark blue to +indicate the hold mode is active. In this mode you can +type multiple lines of commands and edit them. +Pressing ESC again will release the hold and send the +lines of text to the rc command interpreter. + +The DEL key sends an 'interrupt' note to all processes +in the window's process group. The usual intent is to +terminate the execution of the current command. It is +also a convenient short cut for ensuring you have a +fresh command prompt. + +FURTHER INFORMATION + +For further information, try the rio(1) manual page. +Type "man rio" or click on rio(1) in either of these +sentences and select plumb from the button 2 menu. + |