Revision as of 10:34, 7 May 2011
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 :
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...
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 YouTube.com):
5 Hackage package
6 IRC channel
irc.freenode.net 6667 ##manatee
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 http://www.haskell.org/ghc/download_ghc_7_0_3:
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 -y
4) Install cabal:
Decompress cabal-install-0.10.2.tar.gz and do below command:
cd ./cabal-install-0.10.2 && sudo chmod +x ./bootstrap.sh && ./bootstrap.sh
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 alex happy c2hs && cabal install gtk2hs-buildtools glib gio pango cairo gtk
6) Install Manatee (same, don't use root permission):
cabal install manatee-core 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! :)
I have test, Manatee can works well in Gnome, KDE, XMonad and XFCE
10 Quick start
When you first use Manatee, will show all manatee extension in a welcome tab. Just click to use it.
If you don't know keymap, just hit C-/ or C-?
11 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 than core packages (manatee-core, manatee), so please make sure all packages has update to newest version before you report bug to email@example.com . Thanks! :)
12 Download source code
Download script from :
sudo chmod +x ./repos.sh && ./repos.sh get
Source code will download at *parent* directory of reposh.sh, example, if repos.sh at /home/andy/, source code will download at /home
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 (manatee-*/Config directory)
14 How to write Manatee extension
Please look Framework before continue.
Template package at http://hackage.haskell.org/package/manatee-template
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:
class Typeable a => PageBuffer a where -- Get buffer name. pageBufferGetName :: a -> IO String -- Set buffer name. pageBufferSetName :: a -> String -> IO () -- DBus client to handle DBus signal pageBufferClient :: a -> Client -- How to create view with buffer for MVC design. pageBufferCreateView :: a -> PagePlugId -> IO PageViewWrap -- Page buffer mode. pageBufferMode :: a -> PageMode -- Get package name to update user's configure. pageBufferPackageName :: a -> IO String class Typeable a => PageView a where -- Buffer for view. pageViewBuffer :: a -> PageBufferWrap -- GtkPlug id to send DBus signal to other process. pageViewPlugId :: a -> TVar PagePlugId -- How to handle key action from daemon process. pageViewHandleKeyAction :: a -> Text -> SerializedEvent -> IO () -- How to do when manatee framework focus on current application. pageViewFocus :: a -> IO () -- Scrolled window to contain application widget. pageViewScrolledWindow :: a -> ScrolledWindow -- How to handle cut action, can ignore. pageViewCut :: a -> IO Bool -- How to handle copy action, can ignore. pageViewCopy :: a -> IO Bool -- How to handle paste action, can ignore. pageViewPaste :: a -> IO Bool -- How to scroll top postion, can ignore. pageViewScrollToTop :: a -> IO () -- How to scroll bottom postion, can ignore. pageViewScrollToBottom :: a -> IO () -- How to scroll vertical page, can ignore. pageViewScrollVerticalPage :: Bool -> a -> IO () -- How to scroll vertical step, can ignore. pageViewScrollVerticalStep :: Bool -> a -> IO () -- How to scroll to left side, can ignore. pageViewScrollToLeft :: a -> IO () -- How to scroll to right side, can ignore. pageViewScrollToRight :: a -> IO () -- How to scroll horizontal page, can ignore. pageViewScrollHorizontalPage:: Bool -> a -> IO () -- How to scroll horizontal step, can ignore. pageViewScrollHorizontalStep:: Bool -> a -> IO ()
Perfect library gtk-serialized-event to support all GTK+ event
Support input method
Search class interface
Convert haskell config to graphics make it easy to customize.
Integrate Google SafeBrowse.
Offline view support
SSL support (change code in library fastirc)
Support more command
Support private chat
Display current image index
Support orientation, need binding library libextractor first.
Draw CPU log
Support mail search
Support offline view
Build OrgMode for TODO manage.
Support different layout switch
Build rule to provide proxy interface for Manatee.
Basic operation: create, copy, delete.
History forward/backward support.
Binding library libchm first.
Binding library libspectre first.
Binding djvu first.
Use MVC design terminal emulator replace VTE widget, or patch to VTE to support MVC. :)