This Page:     http://www.guckes.net/maow/
Latest change: Sat Mar 28 15:30:08 CET 2009

= Header =

  Event: 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

= Title =

    Sven Guckes  15:45--16:30
    maowberlin09(@)guckes.net

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

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

   ___            _             _
  | _ \ ___ __ __(_)__ __ __ _ | |
  |   // -_)\ 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
items from a popup menu, click on some radio buttons,
entering 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.
and if you know how to use those keys to type words
then you could simply make changes by entering commands.

Still, the concept of a command line (as in shells
and other programs) have 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 irssi+mutt+vim
and shells, and advocates the addition of such
a command line to Mozilla and its offsprings.

This allows for setup files to be mere copies
of some command line commands - just text
which can easily be stored online
for reuse in a web cafe.

= Class =

Classification of talk:
 * Art - in the code
 * Business - weeell.... see talk in Main Room.
 * Code - gimme, gimme, gimme!
 * Development - tomorrow!
 * Extension - yes!
 * Fun - always!

= Access =
How to access the different features now?
Location Bar -> awesome bar -> taskfox

 * press colon to use as command line
 * select all in bar, clear, type colon

just type CTRL-L followed by a colon:  "CTRL-L :"

evolution of the "top field":
  (1) URL
  (2) URL History Search
  (3) Ubiquity Commands
  (4) Command Line

now allow entering commands as words.
= Features =
 * Abbreviations
 * Mappings/Macros
 * Tab Expansion (Command Names and Parameters)

Overkill?:
 * GNU Readline
 * Scripting Language (branches, loops, variables)

= 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 =

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.

expand this to command on websites:
  $ (cat) $URL | $URL/prog > $URL.out

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 this is its implementation:
  $ cat blog.foo.org |
    www.translate.com/en2de |
    www.text2wav.org |
    www.mixer.net/background_music >
    www.mydomain.org/audiostream

"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 passphrase to decrypt.  (use gpg?)
simply ":source newsetup" from client.

strong crypto - problems with export restrictions?
-> allow for external support of encryption!
respect laws of exporting country and of importing country!

= Interface =

Add option name prefixes: file_ dir_ prog_

Interface with external tools.
    :set prog_editor=vim
    :set prog_crypto=gpg
    :set prog_print=script|lpr

= Options =

vim:
: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&        reset option to default!!
:set all            show  all values
:set all&           reset all values

:opt
create overview to all options and their current values.

:mkvimrc
create a setup file from the current state of the program

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

idea: add save points for config (c) Lem

 * easier documentation!
 * easier startup!

= 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 can't you split windows -
neither horizontally nor vertically?

you can split windows within gnu screen 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.

= 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!

= 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

= 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 good.

  MOzilla
  Command
  Line
  Interface
  -> MOwCLI?

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!
 * allows 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 now, there might be quite some people
who will stumble upon this feature when it exists.
And quite a few people have told me that they are
much more comfortable with a keyboard interface.

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

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

my world: installa all tools on
a server and simply connect to it.

= Thanks =
Feedback from:
 * Yan 't' Minagawa
 * Your name here!

= Feedback =

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

= TODO =
 * about:config
 * Bespin

= Links =
 * Flickr  http://www.flickr.com/search/?q=maowberlin09&w=all
 * Twitter http://www.twitter.com/maowberlin09
 * IRC      IRC://irc.mozilla.org/maowberlin09
 * stream  http://icecast.mozilla.org/maow.ogv

 * Bespin:   http://labs.mozilla.com/2009/02/introducing-bespin/
 * ThisPage: http://www.guckes.net/maow/

 Talks+Slides;
 * Rob Nyman: http://bitbucket.org/robnyman/maow-berlin/