* Added input tolerance of DeskCalc, moved Terminal function to end of list

* Added CodyCam to list of apps in applications.html
* Added aligning tip for icons to tracker.html
* Added a few tips for working in Terminal
* Added a topic on scripting, linking to online resources
* Described function of UserBootscript an shutdown scripts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29105 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Joachim Seemer 2009-01-31 22:55:49 +00:00
parent 28e82de7b3
commit 7c2cc28dc9
8 changed files with 115 additions and 14 deletions

View File

@ -70,7 +70,7 @@ Otherwise, uninstalling is simply done by deleting the application's folder.</p>
<tr><td style="width:24px;"><img src="../images/apps-images/cdplayer-icon_16.png" alt="icon" width="16" height="16" /></td><td><a href="applications/apps-cdplayer.html">CDPlayer</a></td><td>&#160;</td>
<td valign="top"><span style="color:silver">A player for audio CDs. [<i>still missing</i>]</span></td></tr>
<tr><td style="width:24px;"><img src="../images/apps-images/codycam-icon_16.png" alt="icon" width="16" height="16" /></td><td><a href="applications/apps-codycam.html">CodyCam</a></td><td>&#160;</td>
<td valign="top"><span style="color:silver">A tool to regularly upload images from a webcam to a server. [<i>still missing</i>]</span></td></tr>
<td valign="top">A tool to regularly upload images from a webcam to a server.</td></tr>
<tr><td style="width:24px;"><img src="../images/apps-images/deskcalc-icon_16.png" alt="icon" width="16" height="16" /></td><td><a href="applications/apps-deskcalc.html">DeskCalc</a></td><td>&#160;</td>
<td valign="top">A calculator.</td></tr>
<tr><td style="width:24px;"><img src="../images/apps-images/diskprobe-icon_16.png" alt="icon" width="16" height="16" /></td><td><a href="applications/apps-diskprobe.html">DiskProbe</a></td><td>&#160;</td>

View File

@ -41,7 +41,7 @@ width="64" height="64" />CodyCam</h1>
<table summary="layout" border="0" cellspacing="0" cellpadding="2">
<tr><td>Deskbar:</td><td style="width:15px;"></td><td><i>Applications</i></td></tr>
<tr><td>Location:</td><td></td><td><tt>/boot/beos/apps/CodyCam</tt></td></tr>
<tr><td>Settings:</td><td></td><td><tt>~/config/settings/???</tt></td></tr>
<tr><td>Settings:</td><td></td><td><tt>~/config/settings/codycam</tt></td></tr>
</table>
<p>With CodyCam you take pictures at a specified interval from a connected webcam or any other video-in device and save it via FTP.</p>

View File

@ -49,22 +49,26 @@ width="64" height="64" />DeskCalc</h1>
<li><p>DeskCalc understands much more than its simple keypad suggests.<br />
Besides the operators <tt>+</tt>, <tt>-</tt>, <tt>*</tt>, <tt>/</tt>, <tt>%</tt>, <tt>^</tt> and the constants <tt>pi</tt> and <tt>e</tt> the following math functions are supported:<br />
<tt>acos</tt>, <tt>asin</tt>, <tt>atan</tt>, <tt>atan2</tt>, <tt>ceil</tt>, <tt>cos</tt>, <tt>cosh</tt>, <tt>exp</tt>, <tt>floor</tt>, <tt>log</tt>, <tt>log10</tt>, <tt>pow</tt>, <tt>sin</tt>, <tt>sinh</tt>, <tt>sqrt</tt>, <tt>tan</tt>, <tt>tanh</tt>.</p></li>
<li><p>DeskCalc can be used in Terminal. Just put the expression in double quotes, like this:</p>
<pre class="terminal">~> DeskCalc "sin(45)*(cos(12)+3.45)"
3.6536554673202546181795194727005826674359494735820338441084848</pre></li>
<li><p>Right-clicking offers a menu to open a simple options dialog:</p>
<li><p>When it comes to user input, DeskCalc is quite tolerant:<br />
<tt>/</tt>, <tt>:</tt>, <tt>\</tt> are all interpreted as division operators,<br />
<tt>*</tt>, <tt>x</tt> are valid symbols for multiplication.<br />
Also, be aware that <tt>.</tt> and <tt>,</tt> are both considered floating points, which means you mustn't use them as 1000 separators.</p></li>
<li><p>Right-clicking offers these options:</p>
<table summary="layout" border="0" cellspacing="0" cellpadding="2">
<tr><td><i>Auto Num Lock</i></td><td style="width:15px;"></td><td>automatically activates the number block when launching DeskCalc</td></tr>
<tr><td><i>Audio Feedback</i></td><td></td><td>plays a sound when showing a result</td></tr>
<tr><td><i>Show Keypad</i></td><td></td><td>hides the keypad when deactivated</td></tr>
</table></li>
<li><p>You can resize the calculator until it fits your needs and then put it as Replicant onto the Desktop via drag&drop of the symbol in the bottom right corner. Make sure "Show Replicants" is activated in the Deskbar.</p></li>
<li><p>The keypad can be colored with a drag&amp;drop from any color well, e.g. from Icon-O-Matic.</p></li>
<li><p>You can resize the calculator until it fits your needs and then put it as Replicant onto the Desktop via drag&drop of the symbol in the bottom right corner. Make sure <i>Show Replicants</i> is activated in the Deskbar.</p></li>
<li><p>The keypad can be colored with a drag&amp;drop from any color well, e.g. from <i>Icon-O-Matic</i>.</p></li>
<li><p>You can move up and down in a history of past calculations with the <tt>CURSOR-UP/DOWN</tt> keys.</p></li>
<li><p>You can select DeskCalc's contents and drag&amp;drop it into any application. Or you drop it into a Tracker window or onto the Desktop and a text file with that clipping is created there.</p>
<p>Even better, the reverse is also possible:<br />
Create clippings as described at various stages of your calculation and go back to them by drag&amp;dropping them back into DeskCalc.<br />
Or you drag&amp;drop a calculation directly out of an email onto DeskCalc.</p></li>
<li><p>DeskCalc can be used in Terminal. Just put the expression in double quotes, like this:</p>
<pre class="terminal">~> DeskCalc "sin(45)*(cos(12)+3.45)"
3.6536554673202546181795194727005826674359494735820338441084848</pre></li>
</ul>
</div>

View File

@ -5,7 +5,7 @@
<head>
<!--
*
* Copyright 2008, Haiku. All rights reserved.
* Copyright 2008-2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -45,8 +45,7 @@
<tt>~/.inputrc</tt> - adds/overrides defaults in <tt>/boot/beos/etc/inputrc</tt></td></tr>
</table>
<p>The Terminal is Haiku's interface to bash, the Bourne Again Shell.</p>
<p>If you want to learn more about using the shell, have a look at this <a href="http://www.beforever.com/bashtut.htm">Introduction to bash</a>. After becoming familiar with the command line, you should study the possibilies of scripting, the <a href="http://www.tldp.org/LDP/abs/html/">Advanced Bash-Scripting Guide</a> is one of many resources on the net.</p>
<p>Here, however, we'll concentrate on the Terminal application itself.</p>
<p>Please refer to the topic on <a href="../bash-scripting.html">Scripting</a> for a few links to online tutorials on working in the shell. Here, we'll concentrate on the Terminal application itself.</p>
<h2><a id="appearance" name="appearance">Appearance</a></h2>
<p>You can open as many Terminals as needed, either each in it's own window by simply launching more Terminals or with <tt>ALT+N</tt> from an already running Terminal. Or you use Terminal's tabbed view and open another tab with <tt>ALT+T</tt>.</p>
@ -78,6 +77,20 @@ Both files can be created in the <tt>home/</tt> folder and add or override the s
<h2><a id="shortcuts" name="shortcuts">Keyboard shortcuts</a></h2>
<p>You'll find a list of useful shortcuts in <a href="../keyboard-shortcuts.html#terminal">Shortcuts and key combinations</a>.</p>
<h2><a id="hints" name="hints">Hints for working with the Terminal</a></h2>
<ul><li><p>Dragging a file or folder from a Tracker window into the Terminal will insert its path at the location of the cursor. Dragging with the right mouse button offers additional actions in a context menu:</p>
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
<tr><td><i>Insert Path</i></td><td>&#160;</td><td>Inserts the location of the file, same as drag&dropping with the left mouse button.</td></tr>
<tr><td><i>Change Directory</i></td><td>&#160;</td><td>Changes to the folder of the dragged file.</td>
<tr><td><i>Create Link Here</i></td><td>&#160;</td><td>Creates a link to the dragged file in the current working directory of the Terminal.</td>
<tr><td><i>Move Here</i></td><td>&#160;</td><td>Moves the dragged file into the current working directory of the Terminal.</td>
<tr><td><i>Copy Here</i></td><td>&#160;</td><td>Copies the dragged file into the current working directory of the Terminal.</td></tr>
</table></li>
<li><p>You can open any file with its preferred application with the command <tt>open <i>[filename]</i></tt>. This also works with the representation of the current ("<tt>.</tt>") and parent ("<tt>..</tt>") folder which then open in a Tracker window. So, to open the current working directory, you type:</p>
<pre class="terminal">open .</pre>
</li></ul>
</div>
<div class="bottomnav">

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"../../html-dtd/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<!--
*
* Copyright 2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Humdinger <humdingerb@gmail.com>
*
-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="robots" content="all" />
<title>Bash and Scripting</title>
<link rel="stylesheet" type="text/css" href="../../Haiku-doc.css" />
</head>
<body>
<div class="logo">
<img src="../images/logo.png" alt="logo" width="372" height="86" />
<div class="title">Bash and Scripting</div>
</div>
<div class="topnav">
<p>
<a href="contents.html">Contents</a>
&#160;&#160;&#160;
Previous: <a href="preferences.html">Preferences</a>
<!-- &#160;&#160;&#160;
Next: <a href="filesystem-layout.html">Filesystem layout</a>
--> </p>
</div>
<div class="content">
<p>"Scripting" is the technique of automating procedures by stringing together commands and saving it all as text files, so called "scripts". Every time you run such a script, the commands are processed one after the other just like they would if you entered them into the <a href="applications/apps-terminal.html">Terminal</a> by hand.<br />
Scripts can range from simply executing a few commands in a specific order to sophisticated pieces of code that solve complex tasks.</p>
<h1><a id="bash" name="bash">The Bash</a></h1>
<p>Since scripts rely naturally a lot on the shell they are interpreted by, you should first familiarize yourself with the BASH that's used by Haiku. There are many resources online as it's a widely used shell. One nice document is Johan Jansson's <a href="http://www.beforever.com/bashtut.htm">Introduction to bash - a tutorial for bash under BeOS</a>.</p>
<h1><a id="scripting-bible" name="scripting-bible">The Scripting Bible</a></h1>
<p>After you've learned a few basics about working in the shell, it's time to slowly ease yourself into the world of scripting. Again, you'll find loads of tutorials and reference material online as well as in bookstores. A very nice introduction that's practically tailor-made for Haiku is the online available <a href="http://www.birdhouse.org/beos/bible/bos/ch_scripting1.html">Scripting Chapter</a> (<a href="http://www.birdhouse.org/beos/bible/bos/BeOS.scripting.PDF">PDF, 900kb</a>) of Scot Hacker's BeOS Bible.</p>
<h1><a id="user-scripts" name="user-scripts">Scripts in Haiku</a></h1>
<p>In Haiku, the system makes of course also use of scripting. Booting and shutting down are typical scripting procedures. These defined sequences can be augmented by the user with certain user scripts.<br />
If they don't exist already, you'll have to create the needed files yourself. Otherwise simply add your commands where in the process you want them to be executed.</p>
<h2><a id="userbootscript" name="userbootscript">The UserBootscript</a></h2>
<p><tt>/boot/home/config/boot/UserBootscript</tt> will be executed after the system has finished its boot process. For example, you could launch a number of programs that would then be automatically started on every boot up:</p>
<pre># Start LaunchBox
/boot/beos/apps/LaunchBox &amp;
# Start Workspaces Applet
/boot/beos/apps/Workspaces &amp;</pre>
<p>Remember to end a command with an "<tt>&amp;</tt>" to start it as a background process, or the script will halt until that command has finished (in this case: the launched app was closed again).</p>
<h2><a id="usershutdownscript" name="usershutdownscript">The UserShutdownScript</a></h2>
<p><tt>/boot/home/config/boot/UserShutdownScript</tt> will be executed as the first step in the shutdown process. If the script returns a non-zero exit status, the shutdown is aborted.</p>
<h2><a id="usershutdownfinishscript" name="usershutdownfinishscript">The UserShutdownFinishScript</a></h2>
<p><tt>/boot/home/config/boot/UserShutdownFinishScript</tt> is executed as the last step in the shutdown process. Note, that most parts of the system have terminated by the time this script is executed.</p>
</div>
<div class="bottomnav">
<p>
<a href="contents.html">Contents</a>
&#160;&#160;&#160;
Previous: <a href="preferences.html">Preferences</a>
<!-- &#160;&#160;&#160;
Next: <a href="filesystem-layout.html">Filesystem layout</a>
--> </p>
</div>
</body>
</html>

View File

@ -5,7 +5,7 @@
<head>
<!--
*
* Copyright 2008, Haiku. All rights reserved.
* Copyright 2008-2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -32,7 +32,7 @@
<div class="content">
<h2><a name="welcome">Welcome to Haiku's User Guide</a></h2>
<h2><a name="welcome">Welcome to the Haiku User Guide</a></h2>
<p>Below, you'll find the documentation of the most important aspects of Haiku. Naturally, completing and extending the documentation is a continuing process. If you find errors or would like to suggest topics or maybe even contribute yourself, please file a <a href="../../welcome/en/bugreports.html">bugreport</a> or get in touch on the <a href="http://www.freelists.org/list/haiku-doc">documentation mailing list</a>.</p>
<table summary="contents" border="0" cellpadding="10" cellspacing="0">
<tr><td valign="top"><a href="installation.html">Installation</a><ul>
@ -119,6 +119,8 @@
<tr><td valign="top"><a href="demos.html">Demos</a></td>
<td>Games and demo applications.</td></tr>
-->
<tr><td valign="top"><a href="bash-scripting.html">Bash and Scripting</a></td>
<td>Learn of some interesting scripts in the system and about online resources for working in the shell and scripting.</td></tr>
</table>
</div>

View File

@ -89,7 +89,7 @@ If you do want to know more about how things tick in Haiku, have a look at this
<td>Complements the system's <tt>/boot/beos/bin/</tt> folder and holds all your command line programs.</td></tr>
<tr><td><tt>~/config/boot/</tt></td><td>&#160;</td>
<td>This folder holds the <tt>UserBootscript</tt> which is executed after the system has booted up and the <tt>UserShutdownscript</tt> which will be executed before the system does all the necessary things to safely shut down.</td></tr>
<td>This folder is the place for <a href="scripting.html#user-scripts">User Scripts</a> that are executed before or after the system boots up or shuts down.</td></tr>
<tr><td><tt>~/config/fonts/</tt></td><td>&#160;</td>
<td>Simply copy a TrueType or Postscript font into this folder and its usable right away.</td></tr>

View File

@ -75,6 +75,7 @@ This is also true for keyboard navigation. For more on that, see topic <a href="
<li><b>Clean Up</b> (<tt>ALT+K</tt>) - Aligns all icons to an invisible grid. Hold down <tt>SHIFT</tt> and the menu becomes <i>Clean Up All</i> which additionally sorts all icons alphabetically.</li>
<li><b>Select...</b> (<tt>SHIFT+ALT+A</tt>) - Select files according to a regular expression.</li>
</ul>
<p>Sometimes you just want to rearrange a few icons without doing a complete <i>Clean Up</i> (<tt>ALT+K</tt>). In that case, you select these icons and start to drag them to their new location. Before you drop them there, keep <tt>ALT</tt> pressed until you've released the mouse button. This will align the icons to the invisible grid.</p>
<p>The rest of the functions are pretty self-explanatory, leaving the Tracker preferences.</p>
<h3><a id="tracker-preferences" name="tracker-preferences">Tracker preferences</a></h3>