<pre>
This Page:     http://www.guckes.net/talks/maow.txt
... in colour: http://www.guckes.net/talks/maow.txt.html
Latest change: Mon Nov 30 03:23:42 CET 2015
Re-Created on: Mon Nov 30 00:00:00 CET 2015

= Event =

this talks was given at this event:

= Title =

   _____           _
  |_   _|___ __ __| |_
    | | / -_)\ \ /|  _|
    |_| \___|/_\_\ \__|

   ___       _               __
  |_ _| _ _ | |_  ___  _ _  / _| __ _  __  ___
   | | | ' \|  _|/ -_)| '_||  _|/ _` |/ _|/ -_)
  |___||_||_|\__|\___||_|  |_|  \__,_|\__|\___|

   ___            _             _
  | _ \ ___ __ __(_)__ __ __ _ | |
  |   // -_)\ V /| |\ V // _` || |
  |_|_\\___| \_/ |_| \_/ \__,_||_|


= Overview =

#TODO #include headlines

= Intro =

Web browsers show web pages with lots of graphical content -
and naturally so, their interface is a graphical one.

You click on menus, select a submenu, issue a command -
and it will open a dialog, allowing you to select an
item from a popup menu, click on some radio buttons,
enter text in text fields, and tabbing between them.

However, a mouse only has three to five keys (and those
wheels for scrolling) - yet the keyboard has over 100 keys.
when you know how to use those keys to type words
then you could simply make changes by entering commands.

the concept of a command line (as in shells and
other programs) has proven as a powerful tool.

this talk shows some of the concepts of a command line,
gives some examples of its use as seen with programs
like irssi+mutt+vim and shells (like bash and zsh),
and advocates the addition of such a command line
to Mozilla and its offsprings through an add-on.

This allows for setup files to be mere copies of some
command line commands - just some text which can
easily be stored online for use in a web cafe.
so.. enter a web cafe, start firefox, enter a
short url - and firefox will use it to load all
your preferences, including add-ons and extentions.

= Access =

How to access that command line? different features now?
* press colon to use as command line
* select all in bar, clear, type colon

type CTRL-L to select all within the address bar -
followed by a colon:  "CTRL-L :"

now allow entering commands as words, for example:
    :source foxrc

(rc = "read commands")

= Features =

* Abbreviations
* Mappings/Macros
* Tab Expansion (for both command names and parameters)

Overkill?:
* GNU Readline might already be installed
* Scripting Language (branches, loops, variables)
* maybe use LUA?

= Config/Setup =

"config file" == "setup file"

Read in current setup file:
  :source file

Distribute setup files:
  $ cat config
  source ~/.foo/config.aliases
  source ~/.foo/config.macros
  source ~/.foo/config.colors
  source ~/.foo/config.crypto
  source ~/.foo/config.themes

= Pipe =

special command: pipe (|)

Allow '|' to send the contents of the
current page to some command or script.

This opens a lot of possibilities,
eg filtering, printing, saving.
(mutt offers such a command.)

Also, allow a non-interactive use
of gui tools, ie as a filter:
  $ foo | firefox | bar > file

example: lynx, links, w3m
note: typically, text tools can be used as filters.

= THINK BIG =

allow to redirect the contents of a page $INPUT
to a $PROGRAM which is resides on another machine
to an output file on your local maschine:

expand this to command on websites:
  $ (cat) $INPUT | $PROGRAM > $OUTPUT

now you can think of websites as commands! :-)

this is theoretically possible with ubiquity already;
it just requires services to exist.
then you can create a command like "listen":
     listen to blog.foo.org

and here is its implementation:
  $ cat blog.foo.org |
    www.translate.com/en2de |
    www.text2wav.org |
    www.mixer.net/background_music >
    www.mydomain.org/audiostream

read:
"listen to blog.foo.org
 by translating its contents from english to german
 converting the output to WAV format,
 adding some background music - and handing
 over the result to an audio stream"

= Prefs =

enable your work everywhere by
making your setup ubiquitous!

store the setup *anywhere* - in encrypted form.
make client download the setup.
enter your passphrase to decrypt.  (use gpg?)
simply ":source newsetup" from client.

problem:
strong crypto - export restrictions?
-> allow for external support of encryption! (???)

of course you must respect the laws of both
the exporting country and of importing country!

= Interface =

Add option name prefixes: file_ dir_ prog_

Interface with external tools.
  :set  dir_prefs=$HOME/.mozilla/firefox/ID/
  :set file_prefs=$dir_prefs/foxrc
  :set prog_editor=vim
  :set prog_crypto=gpg
  :set prog_print=script|lpr

= Options =

some nice features on options from Vim's command line:

  :set opt[TAB]       expand options name
  :set opt[C-D]       show all options with prefix "opt"
  :set option?        show current value
  :set option!        toogle boolean value
  :set option=[TAB]   expand the value
  :set option-=bar    remove "bar"
  :set option+=foo    add    "foo"
  :set option^=42     multiply by 42
  :set option&amp;        reset option to default!!
  :set all            show  all values
  :set all&amp;           reset all values

  :opt
creates an overview to *all* options, grouped by
related function, and a short help for each.

  :mkvimrc
creates a setup file from the current state of the
program with its current key mapping and options
which were changed from the default.

irssi:
    /load + /save
just type "/save" the current state to its config file
(~/.irssi/config) - and "/load" to reload a changed config file.

idea: add save points for config (c) Lem

* easier documentation!
* easier startup!

why doesnt every program have a command line with these features?!

= Display =

(1) windows.
(2) tabs.
(3) split views:  horizontal+vertical!

a browser opens windows for each page,
but there are also "tabs" in windows.
but why are there no commands to split
windows horizontally or vertically?!

you can split windows within gnu screen, tmux, and vim.

you could use a split window like this eg:
the left side of a split window shows a list of links -
and the right side show one of these pages.
so - get someone's bookmark page -
and surf through all linked pages!

Firefox already does this when you use
CTRL-B to show the bookmark page.
why not allow this any webpages?

= Jumps =

* jump to next/prev match.

(this is already possible with CTRL-F to enter a string,
and alt-n/alt-p to jump to the next/previous match; and
alt-a toggles the display of all matches on the current page.
but was this the result of some extension?)

anyway - searches for pattern (regex) would be great!
(TODO review some plugins)

= Number Prefix =

allow a number prefix for all commands:
* N G -> jump to line N
* N n -> find Nth next match
* N % -> jump to N percent of text
* N PgDn -> go down N pages

(the plugins vimperator and pterodactyl allow this)

= Name =

find a good name for the new tool..

what's in a name?
* uniqueness. - find info on the web!
* length. - the shorter, the better.
* pronunciation. - vowels are good.

an example:

  MOzilla
  Command
  Line
  Interface
  -> MOwCLI?

"it's a jungle out there!"

better ideas welcome!

= Ubiquity =

how does all that differ from Ubiquity?
a command line is not that interactive!

Ubiquity:
* commands auto-update through trusted feed
* command editor -> easy command generation
* auto-updates throughout typing

Command Line:
* no auto-updates while typing
* no command editor
* no feeds from other users

... for *now*. ;-)

= Summary =

Summary of goals:
* add a command line to every gecko tool!
* allow non-interactive use of the tools
* make code as small and tight as possible
* create a plugin for opt-in use
* allow to call sub-shells (:!date)

= Comments =

"Do not remind novice users of the hell that was DOS."
yep, DOS was hell.  But this here is way more advanced!

Even though not many people will ask for a
command line in all programs, some people will
stumble upon this feature once it exists.
And quite a few people have told me that they are
much more comfortable with a keyboard interface.

consider:
Emacs:      Editor -- Mail -- Web
Firefox:    Editor -- Mail -- Web

-> "Firefox is an Operating System."
work with tools independent
of underlying operating system
ie use tools on local machine.

install all tools on a server
and simply connect to it.
welcome to my world!

= Credits =

Feedback from these people:
* Your name here!

= Feedback =

Please me some your comments, corrections,
enhancements, flames, typos and more to
    firefox-shell(@)guckes.net

= TODO =

* about:config

= Links =

* ThisPage:   http://www.guckes.net/talks/maow.txt

* Bespin:     http://labs.mozilla.com/2009/02/introducing-bespin/
* SkyWriter:  ...
* Ace:        https://en.wikipedia.org/wiki/Ace_%28editor%29
 "Ace (from Ajax.org Cloud9 Editor) is a standalone code editor
  written in JavaScript. The goal is to create a web-based code
  editor that matches and extends the features, usability, and
  performance of existing native editors such as TextMate, Vim, or
  Eclipse. It can be easily embedded in any web page and JavaScript
  application. Ace is developed as the primary editor for Cloud9
  IDE and as the successor of the Mozilla Skywriter project.[3]"

Event: flickr, twitter, irc, video stream.

* Flickr  ...
* Twitter ...
* IRC     ...
* stream  ...

= History =

the text is based on this talk:

  MAOW Berlin - Sat 2009-03-28 10-22h
  Mozilla Add-Ons Workshop MAOW 2009 Berlin
  https://wiki.mozilla.org/MAOW:2009:Berlin

  Venue: c-base  www.c-base.org
  http://tinyurl.com/c-base-org
  Rungestr. 20, 10179 Berlin
  S-Bhf Jannowitzbruecke, U8

  Sven Guckes  15:45--16:30
  maowberlin09(@)guckes.net
  "Text Interface Revival"


</pre>
<!-- vim: set et ft=sven tw=999 nowrap: THPXRF EOF -->