Personal tools


From HaskellWiki

Revision as of 14:43, 2 January 2011 by AndyStewart (Talk | contribs)

Jump to: navigation, search


1 Introduction

Manatee is Haskell integrated environment written in Haskell.

The goal of the Manatee project is to provide a fast, safe and flexible integrated environment for haskell hacking.

You can consider it is new environment mix Gnome and Emacs. Like Gnome to provide friendly graphics interface and work efficient like Emacs.

Manatee use Multi-Process Framework, any extension (include core) running in separate process to protected core won't crash. So it minimize your losses when some unexpected exception throw in extension.

Manatee = Chrome (sandbox) + Emacs (behaviour) + GTK+ (render engine) + Haskell (concurrent) + Me (idea)

Many people ask me "What's Manatee?", i think correct answer should be :

   Depend on you how to use it. :)


Manatee is not design for WM, it's design for OS, so don't compare it with XMonad, it's really different thing with XMonad. Please watch Window split feature carefully in video to understand the difference, Manatee can split unlimited window for same application : or

In principle, Manatee just need Linux kernel and GTK+, don't need the help of "Window Manager" or "Desktop Environment".

Manatee is open application framework, you can write any extension or plugins for Manatee, I won't limit it, you just need follow some interface API i build.

This project still in early development, many features are missing, so i DON'T recommend use it as produce tool, just play it and report bug.  :)

At last, Manatee is not Emacs, Manatee is not XMond, Manatee is not Gnome... it's a new software...

3 Hackage package

4 Video

HD version :

Above video include Owl City's music, if you can't watch it, try below video, without sound:

Chinese people (this version is not clear, please fighting GFW access

5 Screenshots

6 Manual

7 IRC channel 6667 ##manatee

8 Mailing-List

9 Download source code

Download script from :

And do

   sudo chmod +x ./ && ./ get

Source code will download at *parent* directory of, example, if at /home/andy/, source code will download at /home

10 Report bug

Manatee is distributed framework, it allowed you install extension don't need depend each other, but it's easy to break if some package is older core packages (manatee-core, manatee-anything, manatee), so please make sure all packages has update to newest version before you report bug to . Thanks! :)

11 Installation

Below is build step for Manatee:

1) Install gold-linker to accelerate installation:

I suggest use gold-linker instead ld to accelerate installation.

In Debian system, you just need do below command:

sudo aptitude install binutils-gold -y

This step is optional, it's okay use ld link program, just much slow. :)

2) Install GHC compiler

Download ghc package for your system, then do below command :

./configure && sudo make install

3) Install C library: In Debian use below command:

sudo aptitude install libgtksourceview2.0-dev libgconf2-dev libwebkit-dev libcurl4-openssl-dev libgtkimageview-dev libpoppler-glib-dev poppler-data libtagc0-dev libvte-dev libvte-common -y

4) Install cabal:

If you're haskell newbie, use below command to install cabal (haskell expert ignore this):

sudo aptitude install cabal-install -y

5) Install dependent Haskell library:

First make sure HOME/.cabal/bin/ in your PATH

Generic way is add `PATH=$PATH:~/.cabal/bin` in your ~/.bashrc

Then do below command (NOTE: don't use root permission with cabal, otherwise Manatee can't work):

cabal update && cabal install happy c2hs gtk2hs-buildtools glib gio pango cairo gtk

6) Install Manatee (same, don't use root permission):

cabal install manatee-core manatee-anything manatee-browser manatee-editor manatee-filemanager manatee-imageviewer manatee-ircclient manatee-mplayer manatee-pdfviewer manatee-processmanager manatee-reader manatee-curl manatee-terminal manatee

That's all, then type command manatee to play it! :)

Manatee can work in Gnome, KDE and XFCE

Unfortunately, Manatee can't work in XMonad, please let me know if some XMonad hacker know how to fix it. :)

12 Quick start

When you first run manatee, it will show a Global Search menu In search menu, it will search different kind candidate for your input.

Example, when you type in it, it will show Browser candidate for you, then you hit RETURN or "Alt + m" will open link in browser.

If you type Haskell filepath, example, /path/Haskell.hs, manatee will call editor module to open /path/Haskell.hs

You can type pdf filepath to open in pdf viewer module, image filepath is same.

You also can type directory to open in file manager.

More tips see below "Global Keymap". :)

13 Customize

After change configure file, re-install current package will mix configure file to build your own version. (Or press "Ctrl + i" in current application)

Manatee developer can press "Ctrl + u" to debug configure file in runtime, you still need to re-install the current package if you want to start the configuration file take effect the next time,

You can find default configure template in package (Config directory)

14 Global keymap

F2 => Process Manager

F3 => RSS/Atom reader

F4 => File Manager

F5 => Webkit browser

F7 => Login IRC with your own nickname

F6 => Login #haskell

F8 => Download Manager

F11 => Toggle fullscreen

F12 => Lock screen

Super + n => Terminal emulator

15 Misc Keymap

Ctrl + u => Debug configure file at runtime

Ctrl + i => Install configure file

Alt + [ => Jump buffer directory

16 Focus Interactivebar

Alt + f => Focus interactive bar

Alt + F => Focus buffer

Alt + b => Toggle focus between interactive bar and current buffer

Alt + g => Close interactive bar

17 Interactivebar keymap

Alt + j => Select next candidate

Alt + k => Select previous candidate

Alt + J => Select next search menu

Alt + K => Select previous search menu

Alt + N => Complete select candidate

Tab => Complete candidate for input

Backspace => Delete char backward

Alt + , => Delete char backward

Alt + < => Delete word backward

Alt + d => Clean input

Alt + x => Cut input

Alt + c => Copy input

Alt + v => Paste input

18 Tab keymap

Alt + 7 => Select left tab

Alt + 8 => Select right tab

Alt + & => Select first tab

Alt + * => Select last tab

Alt + ' => Close current tab

Alt + " => Close all tabs except current one

Alt + 9 => Select previous tab group

Alt + 0 => Select next tab group

Ctrl + 7 => Move current tab to left

Ctrl + 8 => Move current tab to right

Ctrl + & => Move current tab to first

Ctrl + * => Move current tab to last

Ctrl + ' => Undo tab close action with current model

Ctrl + " => Undo tab close action globally

19 Window keymap

Alt + t => Split current window vertically

Alt + T => Split current window hortizontally

Alt + n => Select next window

Alt + p => Select previous window

Alt + ; => Close current window

Alt + : => Close all windows except current one

Super + . => Enlarge current window

Super + , => Shrink current window

Super + j => Enlarge window down

Super + k => Enlarge window up

Super + h => Enlarge window left

Super + l => Enlarge window right

Super + J => Shrink window down

Super + K => Shrink window up

Super + H => Shrink window left

Super + L => Shrink window right

20 Browser keymap

Alt + r => Reload current page

Alt + R => Reload current page without use cache

Alt + , => Backward history

Alt + . => Forward history

Alt + - => Zoom out page

Alt + = => Zoom in page

21 Editor keymap

Alt + a => sourceViewSelectAll

Alt + s => sourceViewSave

Alt + d => sourceViewDelLines

Alt + D => sourceViewDelete

Alt + / => sourceViewUndo

Alt + ? => sourceViewRedo

Alt + r => sourceViewReload

Alt + , => sourceViewDeleteBackwardChar

Alt + . => sourceViewDeleteForwardChar

Alt + < => sourceViewDeleteBackwardWord

Alt + > => sourceViewDeleteForwardWord

Alt + Ctrl + , => sourceViewDeleteToLineStart

Alt + Ctrl + . => sourceViewDeleteToLineEnd

Alt + j => sourceViewForwardLine

Alt + k => sourceViewBackwardLine

Alt + l => sourceViewForwardChar

Alt + h => sourceViewBackwardChar

Alt + m => sourceViewNewline

Alt + L => sourceViewForwardWord

Alt + H => sourceViewBackwardWord

Alt + Super + h => sourceViewSmartHome

Alt + Super + l => sourceViewSmartEnd

Alt + N => sourceViewOpenNewlineBelow

Alt + P => sourceViewOpenNewlineAbove

Alt + w => sourceViewDupLinesBelow

Alt + W => sourceViewDupLinesAbove

Alt + e => sourceViewTraLinesBelow

Alt + E => sourceViewTraLinesAbove

Ctrl + c => sourceViewToggleSelectionMark

Ctrl + C => sourceViewExchangeSelectionMark

Ctrl + o => sourceViewOpenFile

Ctrl + g => sourceViewGotoLine

Ctrl + G => sourceViewGotoColumn

22 File Manager keymap

j => next file

k => previous file

J => scroll to bottom

K => scroll to top

Space => scroll page up

b => scroll page down

n => sort by name.

x => sort by extension type

s => sort by size

t => sort by time

' => jump upper directory

\ => open upper directory in new tab

m => open directory or file

M => open directory in new tab

23 Image Viewer keymap

j => scroll up

k => scroll down

h => scroll right

l => scroll left

Space => scroll page up

b => scroll page down

J => scroll to bottom

K => scroll to up

, => zoom image out

. => zoom image in

m => zoom image to screen size

n => next image

p => prevoius image

N => last image

P => first image

< => rotate left

> => rotate right

/ => rotate mirror

s => auto show

B => set as background (just work for gnome)

24 IRC client keymap

Alt + m => send message

Ctrl + m => translate message and send

Ctrl + n => switch mother-language and translate language

Ctrl + N => send morse code

Alt + M => move to prompt position

Alt + N => clean input

Alt + a => select all

Alt + d => delete lines

Alt + D => delete selection

Alt + , => delete char backward

Alt + . => delete char forward

Alt + < => delete word backward

Alt + > => delete word forward

Alt + Ctrl + , => delete to line start

Alt + Ctrl + . => delete to line end

Alt + j => forward line

Alt + k => backward line

Alt + l => forward char

Alt + h => backward char

Alt + L => forward word

Alt + H => backward word

Alt + Super + h => smart home

Alt + Super + l => smart end

Ctrl + c => toggle select mark

Ctrl + C => exchange select mark

Ctrl + o => open url in browser

Ctrl + j => translate message

Ctrl + J => translate morse code

Ctrl + k => read IRC message (need install festival in your system)

You can use below command install festival in Debian system:

   sudo aptitude install festival esound-clients -y

25 Player keymap

j => select next song

k => select previous sogn

J => scroll to bottom

K => scroll to top

Space => scroll page up

b => scroll page down

m => play current song

M => play or pause

z => stop

h => play forward

l => play backward

, => volume decrease

. => volume increase

n => play next

p => play previous

N => play random

P => switch play mode

1 => sort by title

2 => sort by album

3 => sort by artist

4 => sort by year

5 => sort by track

6 => sort by bitrate

7 => sort by duration

26 PDF viewer keymap

j => scroll up

k => scroll down

Space => scroll page up

b => scroll page down

J => scroll to bottom

K => scroll to up

n => next page

p => previous page

N => last page

P => first page

g => go page.

27 Process manager keymap

j => scroll up

k => scroll down

Space => scroll page up

b => scroll page down

J => scroll to bottom

K => scroll to up

=> kill process

1 => sort by name

2 => sort by processid

3 => sort by user

4 => sort by state

5 => sort by memory

6 => sort by cpu

7 => sort by priority

8 => sort by threads

9 => sort by cmdline

28 RSS/Atom reader

n => next feed

p => previous feed

N => last feed

P => first feed

j => next news

k => previous news

J => last news

K => first news

, => scroll news up

. => scroll news down

Space => scroll news page up

b => scroll news page down

m => open news in browser

29 Manatee Curl (Download Manager)

j => next item

k => previous item

J => scroll to bottom

K => scroll to top

SPACE => scroll page up

b => scroll page down

a => add new download

d => delete current download

p => pause

P => pause all

n => continue

N => continu all

f => jump to file

m => open file

3 => sort by name

4 => sort by size

6 => sort by speed

7 => sort by resttime

8 => sort by thread

9 => sort by url

30 Todo

Optimise Code


Perfect library gtk-serialized-event to support all GTK+ event

Support input method

Search class interface

Customize System

Convert haskell config to graphics make it easy to customize.

Hot Swap

Mix pdynload in current framework to support dynmic update in runtime like Emacs.


Javascript framework

Save password

Auto fill

Cache support

Integrate Google SafeBrowse.

IDE features:

Code completion

Code snippet

Fly check

Fly make

Integrate compiler

RSS/Atom reader

Offline view support

IRC client

SSL support (change code in library fastirc)

Support more command

Support private chat

Support log

Image Viewer

Display current image index

Fullscreen display

Support orientation, need binding library libextractor first.

Pdf Viewer

Support Zoom

Process Manager

Draw CPU log


Support mail search

Support offline view


Build OrgMode for TODO manage.

Session Manager

Support different layout switch

Proxy interface

Build rule to provide proxy interface for Manatee.

File Manager

Basic operation: create, copy, delete.

History forward/backward support.

Multi-Language dictionary

CHM viewer

Binding library libchm first.

PS viewer

Binding library libspectre first.

DVI viewer

Binding djvu first.


Twitter client

Terminal emulator

Use MVC design terminal emulator replace VTE widget, or patch to VTE to support MVC. :)

31 How to write Manatee extension

First, i explain Manatee package hierarchy:

  manatee-core contain DBus protocol detail and toolkit use in other manatee packages.
  manatee-anything is multi-task search interface for user input.
  manatee contain daemon process, 
  Daemon process is root process to manage other manatee processes:
  such as render application process' graphics for sandbox protected, window manage ... etc.
  Daemon process just do manage job and don't running any special application code in it.

  Other manatee-* package, such as manatee-editor, manatee-browser...etc running in
  it's own process, you can write any code to implement your application,
  just need follow some interface:

Manatee application interface: