Difference between revisions of "Manatee"
AndyStewart (talk | contribs) |
AndyStewart (talk | contribs) |
||
(95 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
efficient like Emacs. |
efficient like Emacs. |
||
− | Manatee use |
+ | Manatee use [http://www.flickr.com/photos/48809572@N02/5031811365/lightbox/ 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. |
minimize your losses when some unexpected exception throw in extension. |
||
+ | Manatee = Chrome (sandbox) + Emacs (behaviour) + GTK+ (render engine) + Haskell (concurrent) + Me (idea) |
||
− | You can find screenshots at : http://goo.gl/MkVw |
||
+ | Many people ask me "What's Manatee?", i think correct answer should be : |
||
− | == Installation == |
||
+ | Depend on you how to use it. :) |
||
− | Below is build step for Manatee: |
||
+ | == NOTE == |
||
− | 1) Install GHC compiler http://www.haskell.org/ghc/download_ghc_6_12_3.html: |
||
+ | 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 : |
||
− | Download ghc package for your system, then do below command : |
||
+ | http://www.youtube.com/watch?v=weS6zys3U8k or http://www.youtube.com/watch?v=A3DgKDVkyeM |
||
+ | In principle, Manatee just need Linux kernel and GTK+, don't need the help of "Window Manager" or "Desktop Environment". |
||
− | ./configure && sudo make install |
||
+ | 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. |
||
− | 2) Install C library: In Debian use below command: |
||
+ | 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. :) |
||
− | sudo aptitude install libgtksourceview2.0-dev libgconf2-dev libwebkit-dev libcurl4-openssl-dev libgtkimageview-dev libpoppler-glib-dev poppler-data libtagc0-dev -y |
||
+ | At last, Manatee is not Emacs, Manatee is not XMond, Manatee is not Gnome... it's a new software... |
||
− | 3) Install cabal: |
||
+ | == Video == |
||
− | If you're haskell newbie, use below command to install cabal (haskell expert ignore this): |
||
+ | HD version : |
||
− | sudo aptitude install cabal-install -y |
||
+ | http://www.youtube.com/watch?v=weS6zys3U8k |
||
− | 4) Install dependent Haskell library: |
||
+ | Above video include Owl City's music, if you can't watch it, try below video, without sound: |
||
− | First make sure HOME/.cabal/bin/ in your PATH |
||
+ | http://www.youtube.com/watch?v=A3DgKDVkyeM |
||
− | Generic way is add `PATH=$PATH:~/.cabal/bin` in your ~/.bashrc |
||
+ | Chinese people (this version is not clear, please fighting GFW access YouTube.com): |
||
− | Then do below command (NOTE: don't use root permission with cabal, otherwise Manatee can't work): |
||
+ | http://v.youku.com/v_show/id_XMjI2MDMzODI4.html |
||
− | cabal update && cabal install happy c2hs gtk2hs-buildtools glib gio pango cairo gtk |
||
+ | == Screenshots == |
||
− | 5) Install Manatee (same, don't use root permission): |
||
+ | http://goo.gl/MkVw |
||
− | 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 |
||
+ | == Hackage package == |
||
− | That's all, then type command manatee to play it! :) |
||
+ | http://hackage.haskell.org/package/manatee |
||
− | Manatee can work in Gnome or KDE |
||
+ | == IRC channel == |
||
− | Unfortunately, Manatee can't work in XMonad, please let me know if some XMonad hacker know how to fix it. :) |
||
+ | irc.freenode.net 6667 ##manatee |
||
− | == Quick start == |
||
+ | == Mailing-List == |
||
− | When you first run manatee, it will show a [http://www.flickr.com/photos/48809572@N02/5154125192/lightbox/ Global Search menu] |
||
− | In search menu, it will search different kind candidate for your input. |
||
+ | manatee-user@googlegroups.com |
||
− | Example, when you type http://www.google.com in it, it will show '''Browser''' candidate for you, then you hit RETURN or "Alt + m" will open link in browser. |
||
+ | manatee-develop@googlegroups.com |
||
− | If you type Haskell filepath, example, /path/Haskell.hs, manatee will call editor module to open /path/Haskell.hs |
||
+ | == Twitter == |
||
− | You can type pdf filepath to open in pdf viewer module, image filepath is same. |
||
+ | https://twitter.com/manateelazycat |
||
− | You also can type directory to open in file manager. |
||
+ | == Installation == |
||
− | Press F3 will start RSS/Atom reader |
||
+ | Below is build step for Manatee: |
||
− | Press F6 will login #haskell channel (Or Press F7 to login with you own nick) |
||
+ | 1) Install gold-linker to accelerate installation: |
||
− | == Focus Interactivebar == |
||
+ | I suggest use gold-linker instead ld to accelerate installation. |
||
− | Alt + f => Focus interactive bar |
||
+ | In Debian system, you just need do below command: |
||
− | Alt + F => Focus buffer |
||
+ | sudo aptitude install binutils-gold -y |
||
− | Alt + b => Toggle focus between interactive bar and current buffer |
||
+ | This step is optional, it's okay use ld link program, just much slow. :) |
||
− | Alt + g => Close interactive bar |
||
+ | 2) Install GHC compiler http://www.haskell.org/ghc/download_ghc_7_0_3: |
||
− | == Interactivebar keymap == |
||
+ | Download ghc package for your system, then do below command : |
||
− | Alt + j => Select next candidate |
||
+ | ./configure && sudo make install |
||
− | Alt + k => Select previous candidate |
||
+ | 3) Install C library: In Debian use below command: |
||
− | Alt + J => Select next search menu |
||
+ | 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 |
||
− | Alt + K => Select previous search menu |
||
+ | 4) Install cabal: |
||
− | Alt + N => Complete select candidate |
||
+ | Download http://hackage.haskell.org/packages/archive/cabal-install/0.10.2/cabal-install-0.10.2.tar.gz |
||
− | Tab => Complete candidate for input |
||
+ | Decompress cabal-install-0.10.2.tar.gz and do below command: |
||
− | Backspace => Delete char backward |
||
+ | cd ./cabal-install-0.10.2 && sudo chmod +x ./bootstrap.sh && ./bootstrap.sh |
||
− | Alt + , => Delete char backward |
||
+ | 5) Install dependent Haskell library: |
||
− | Alt + < => Delete word backward |
||
+ | First make sure HOME/.cabal/bin/ in your PATH |
||
− | Alt + d => Clean input |
||
+ | Generic way is add `PATH=$PATH:~/.cabal/bin` in your ~/.bashrc |
||
− | Alt + x => Cut input |
||
+ | Then do below command (NOTE: don't use root permission with cabal, otherwise Manatee can't work): |
||
− | Alt + c => Copy input |
||
+ | cabal update && cabal install alex happy c2hs && cabal install gtk2hs-buildtools glib gio pango cairo gtk |
||
− | Alt + v => Paste input |
||
+ | 6) Install Manatee: |
||
− | == Tab keymap == |
||
+ | Install all Manatee packages (same, don't use root permission): |
||
− | Alt + 7 => Select left tab |
||
+ | cabal install manatee-all |
||
− | Alt + 8 => Select right tab |
||
+ | If you don't want install all Manatee packages, you can install basic package like below: |
||
− | Alt + & => Select first tab |
||
+ | cabal install manatee-core manatee-welcome manatee |
||
− | Alt + * => Select last tab |
||
+ | Then choose extension package list in below to install: |
||
− | Alt + ' => Close current tab |
||
+ | manatee-browser |
||
− | Alt + " => Close all tabs except current one |
||
+ | manatee-editor |
||
+ | manatee-filemanager |
||
+ | manatee-imageviewer |
||
+ | manatee-ircclient |
||
+ | manatee-mplayer |
||
+ | manatee-pdfviewer |
||
+ | manatee-processmanager |
||
+ | manatee-reader |
||
+ | manatee-curl |
||
+ | manatee-terminal |
||
+ | Note if you don't install any extension package, nothing will show in manatee, so you at least to choose one extension to install. |
||
− | Alt + 9 => Select previous tab group |
||
+ | That's all, then type command manatee to play it! :) |
||
− | Alt + 0 => Select next tab group |
||
+ | I have test, Manatee can works well in Gnome, KDE, XMonad and XFCE |
||
− | Ctrl + 7 => Move current tab to left |
||
+ | == Quick start == |
||
− | 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 |
||
− | |||
− | == 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 |
||
− | |||
− | == 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 |
||
− | |||
− | == 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 |
||
− | |||
− | == 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 |
||
− | |||
− | == 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 |
||
+ | When you first use Manatee, will show all manatee extension in a welcome tab. |
||
− | / => rotate mirror |
||
+ | Just click to use it. |
||
+ | If you don't know keymap, just hit C-/ or C-? |
||
− | s => auto show |
||
+ | Enjoy! :) |
||
− | B => set as background (just work for gnome) |
||
− | == |
+ | == Report bug == |
+ | Manatee is distributed framework, it allowed you install extension don't need depend each other, |
||
− | Alt + m => send message |
||
+ | 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 |
||
+ | manatee-user@googlegroups.com . Thanks! :) |
||
+ | == Download source code == |
||
− | Ctrl + m => translate message and send |
||
+ | Download script from : |
||
− | Ctrl + n => switch mother-language and translate language |
||
+ | https://patch-tag.com/r/AndyStewart/manatee/snapshot/current/content/pretty/repos.sh |
||
− | Ctrl + N => send morse code |
||
+ | And do |
||
− | Alt + M => move to prompt position |
||
+ | 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 |
||
− | Alt + N => clean input |
||
+ | == Customize == |
||
− | Alt + a => select all |
||
+ | After change configure file, re-install current package will mix configure file to build your own version. |
||
− | Alt + d => delete lines |
||
+ | (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, |
||
− | Alt + D => delete selection |
||
+ | You can find default configure template in package (manatee-*/Config directory) |
||
− | Alt + , => delete char backward |
||
+ | == How to write Manatee extension == |
||
− | Alt + . => delete char forward |
||
+ | Please look [http://www.flickr.com/photos/48809572@N02/5031811365/lightbox/ Framework] before continue. |
||
− | Alt + < => delete word backward |
||
+ | Template package at http://hackage.haskell.org/package/manatee-template |
||
− | Alt + > => delete word forward |
||
+ | First, i explain Manatee package hierarchy: |
||
− | Alt + Ctrl + , => delete to line start |
||
+ | |||
+ | manatee-core contain DBus protocol detail and toolkit use in other manatee packages. |
||
+ | |||
+ | manatee-welcome is use for show welcome page for manatee extension. |
||
+ | |||
+ | 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: |
||
− | Alt + Ctrl + . => delete to line end |
||
+ | instance PageBuffer TemplateBuffer where |
||
− | Alt + j => forward line |
||
+ | -- Get buffer name from Template buffer. |
||
+ | pageBufferGetName = readTVarIO . templateBufferFilePath |
||
+ | -- Set buffer name. |
||
− | Alt + k => backward line |
||
+ | pageBufferSetName a = writeTVarIO (templateBufferFilePath a) |
||
+ | -- DBus client. |
||
− | Alt + l => forward char |
||
+ | pageBufferClient = templateBufferClient |
||
+ | -- How to create TemplateView from TemplateBuffer for multiple view design. |
||
− | Alt + h => backward char |
||
+ | pageBufferCreateView a pId = PageViewWrap <$> templateViewNew a pId |
||
+ | -- Page mode. |
||
− | Alt + L => forward word |
||
+ | pageBufferMode = templateBufferMode |
||
+ | -- Get package name to update user's configure. |
||
− | Alt + H => backward word |
||
+ | pageBufferPackageName _ = fmap takeFileName getDataDir |
||
+ | -- Save buffer state. |
||
− | Alt + Super + h => smart home |
||
+ | pageBufferWriteState = templateBufferWriteState |
||
+ | |||
+ | -- Restore buffer state. |
||
+ | pageBufferReadState = templateBufferReadState |
||
+ | instance PageView TemplateView where |
||
− | Alt + Super + l => smart end |
||
+ | -- Page buffer. |
||
+ | pageViewBuffer = PageBufferWrap . templateViewBuffer |
||
+ | |||
+ | -- GtkPlug id. |
||
+ | pageViewPlugId = templateViewPlugId |
||
+ | |||
+ | -- Page Frame. |
||
+ | pageViewFrame = templateViewFrame |
||
+ | |||
+ | -- Local keymap. |
||
+ | pageViewLocalKeymap _ = templateViewLocalKeymap |
||
+ | -- Command map. |
||
− | Ctrl + c => toggle select mark |
||
+ | pageViewLocalCommandMap _ = templateViewLocalCommandMap |
||
+ | -- How to focus when manatee focus current application. |
||
− | Ctrl + C => exchange select mark |
||
+ | pageViewFocus = widgetGrabFocus . templateViewView |
||
+ | -- Which widget to propagate event. |
||
− | Ctrl + o => open url in browser |
||
+ | pageViewPropagateWidget = castToWidget . templateViewView |
||
+ | |||
+ | -- Save view state. |
||
+ | pageViewSaveState view = templateViewSaveState view Nothing |
||
+ | -- Restore view state. |
||
− | Ctrl + j => translate message |
||
+ | pageViewRestoreState view = templateViewRestoreState view Nothing |
||
+ | -- Save view state to file. |
||
− | Ctrl + J => translate morse code |
||
+ | pageViewWriteState view path = templateViewSaveState view (Just path) |
||
+ | -- Restore view state from file. |
||
− | Ctrl + k => read IRC message (need install festival in your system) |
||
+ | pageViewReadState view path = templateViewRestoreState view (Just path) |
||
+ | -- How to handle cut action, can ignore. |
||
− | == Player keymap == |
||
+ | pageViewCut = templateViewCut |
||
− | + | -- How to handle copy action, can ignore. |
|
+ | pageViewCopy = templateViewCopy |
||
+ | -- How to handle paste action, can ignore. |
||
− | k => select previous sogn |
||
+ | pageViewPaste = templateViewPaste |
||
− | + | -- How to scroll top postion, can ignore. |
|
+ | pageViewScrollToTop = templateViewScrollToTop |
||
− | + | -- How to scroll bottom postion, can ignore. |
|
+ | pageViewScrollToBottom = templateViewScrollToBottom |
||
− | + | -- How to scroll vertical page, can ignore. |
|
+ | pageViewScrollVerticalPage = templateViewScrollVerticalPage |
||
− | + | -- How to scroll vertical step, can ignore. |
|
+ | pageViewScrollVerticalStep = templateViewScrollVerticalStep |
||
− | + | -- How to scroll to left side, can ignore. |
|
+ | pageViewScrollToLeft = templateViewScrollToLeft |
||
− | + | -- How to scroll to right side, can ignore. |
|
+ | pageViewScrollToRight = templateViewScrollToRight |
||
+ | -- How to scroll horizontal page, can ignore. |
||
− | z => stop |
||
+ | pageViewScrollHorizontalPage= templateViewScrollHorizontalPage |
||
+ | -- How to scroll horizontal step, can ignore. |
||
− | h => play forward |
||
+ | pageViewScrollHorizontalStep= templateViewScrollHorizontalStep |
||
+ | == Todo == |
||
− | l => play backward |
||
+ | '''Optimise Code''' |
||
− | , => volume decrease |
||
+ | '''Core''' |
||
− | . => volume increase |
||
+ | Perfect library [https://patch-tag.com/r/AndyStewart/gtk-serialized-event/home gtk-serialized-event] to support all GTK+ event |
||
− | n => play next |
||
+ | Support input method |
||
− | p => play previous |
||
+ | Search class interface |
||
− | N => play random |
||
+ | '''Customize System''' |
||
− | P => switch play mode |
||
+ | Convert haskell config to graphics make it easy to customize. |
||
− | 1 => sort by title |
||
+ | '''Browser''' |
||
− | 2 => sort by album |
||
+ | Javascript framework |
||
− | 3 => sort by artist |
||
+ | Save password |
||
− | 4 => sort by year |
||
+ | Auto fill |
||
− | 5 => sort by track |
||
+ | Cache support |
||
− | 6 => sort by bitrate |
||
+ | Integrate Google SafeBrowse. |
||
− | 7 => sort by duration |
||
+ | '''IDE features:''' |
||
− | == PDF viewer keymap == |
||
+ | Code completion |
||
− | j => scroll up |
||
+ | Code snippet |
||
− | k => scroll down |
||
+ | Fly check |
||
− | Space => scroll page up |
||
+ | Fly make |
||
− | b => scroll page down |
||
+ | Integrated compiler |
||
− | J => scroll to bottom |
||
+ | '''RSS/Atom reader''' |
||
− | K => scroll to up |
||
+ | Offline view support |
||
− | n => next page |
||
+ | '''IRC client''' |
||
− | p => previous page |
||
+ | SSL support (change code in library [http://hackage.haskell.org/package/fastirc fastirc]) |
||
− | N => last page |
||
+ | Support more command |
||
− | P => first page |
||
+ | Support private chat |
||
− | == Process manager keymap == |
||
+ | Support log |
||
− | j => scroll up |
||
+ | '''Image Viewer''' |
||
− | k => scroll down |
||
+ | Display current image index |
||
− | Space => scroll page up |
||
+ | Fullscreen display |
||
− | b => scroll page down |
||
+ | Support orientation, need binding library libextractor first. |
||
− | J => scroll to bottom |
||
+ | '''Pdf Viewer''' |
||
− | K => scroll to up |
||
+ | Support Zoom |
||
− | ; => kill process |
||
+ | '''Process Manager''' |
||
− | 1 => sort by name |
||
+ | Draw CPU log |
||
− | 2 => sort by processid |
||
+ | '''Mail-Client''' |
||
− | 3 => sort by user |
||
+ | Support mail search |
||
− | 4 => sort by state |
||
+ | Support offline view |
||
− | 5 => sort by memory |
||
+ | '''Org-Mode''' |
||
− | 6 => sort by cpu |
||
+ | Build [http://orgmode.org/ OrgMode] for TODO manage. |
||
− | 7 => sort by priority |
||
+ | '''Session Manager''' |
||
− | 8 => sort by threads |
||
+ | Support different layout switch |
||
− | 9 => sort by cmdline |
||
+ | '''Proxy interface''' |
||
− | == RSS/Atom reader == |
||
+ | Build rule to provide proxy interface for Manatee. |
||
− | n => next feed |
||
+ | '''File Manager''' |
||
− | p => previous feed |
||
+ | Basic operation: create, copy, delete. |
||
− | N => last feed |
||
+ | History forward/backward support. |
||
− | P => first feed |
||
+ | '''Multi-Language dictionary''' |
||
− | j => next news |
||
+ | '''CHM viewer''' |
||
− | k => previous news |
||
+ | Binding library libchm first. |
||
− | J => last news |
||
+ | '''PS viewer''' |
||
− | K => first news |
||
+ | Binding library libspectre first. |
||
− | , => scroll news up |
||
+ | '''DVI viewer''' |
||
− | . => scroll news down |
||
+ | Binding [http://djvu.sourceforge.net/ djvu] first. |
||
− | Space => scroll news page up |
||
+ | '''BT-Client''' |
||
− | b => scroll news page down |
||
+ | '''Twitter client''' |
||
− | m => open news in browser |
||
+ | '''Terminal emulator''' |
||
− | == How to write Manatee extension == |
||
+ | Use MVC design terminal emulator replace VTE widget, or patch to VTE to support MVC. :) |
||
− | Add soon |
Revision as of 04:30, 14 May 2011
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. :)
NOTE
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 :
http://www.youtube.com/watch?v=weS6zys3U8k or http://www.youtube.com/watch?v=A3DgKDVkyeM
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...
Video
HD version :
http://www.youtube.com/watch?v=weS6zys3U8k
Above video include Owl City's music, if you can't watch it, try below video, without sound:
http://www.youtube.com/watch?v=A3DgKDVkyeM
Chinese people (this version is not clear, please fighting GFW access YouTube.com):
http://v.youku.com/v_show/id_XMjI2MDMzODI4.html
Screenshots
http://goo.gl/MkVw
Hackage package
http://hackage.haskell.org/package/manatee
IRC channel
irc.freenode.net 6667 ##manatee
Mailing-List
manatee-user@googlegroups.com
manatee-develop@googlegroups.com
https://twitter.com/manateelazycat
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 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:
Download http://hackage.haskell.org/packages/archive/cabal-install/0.10.2/cabal-install-0.10.2.tar.gz
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:
Install all Manatee packages (same, don't use root permission):
cabal install manatee-all
If you don't want install all Manatee packages, you can install basic package like below:
cabal install manatee-core manatee-welcome manatee
Then choose extension package list in below to install:
manatee-browser manatee-editor manatee-filemanager manatee-imageviewer manatee-ircclient manatee-mplayer manatee-pdfviewer manatee-processmanager manatee-reader manatee-curl manatee-terminal
Note if you don't install any extension package, nothing will show in manatee, so you at least to choose one extension to install.
That's all, then type command manatee to play it! :)
I have test, Manatee can works well in Gnome, KDE, XMonad and XFCE
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-?
Enjoy! :)
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 manatee-user@googlegroups.com . Thanks! :)
Download source code
Download script from :
https://patch-tag.com/r/AndyStewart/manatee/snapshot/current/content/pretty/repos.sh
And do
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
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 (manatee-*/Config directory)
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-welcome is use for show welcome page for manatee extension. 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:
instance PageBuffer TemplateBuffer where
-- Get buffer name from Template buffer. pageBufferGetName = readTVarIO . templateBufferFilePath
-- Set buffer name. pageBufferSetName a = writeTVarIO (templateBufferFilePath a)
-- DBus client. pageBufferClient = templateBufferClient
-- How to create TemplateView from TemplateBuffer for multiple view design. pageBufferCreateView a pId = PageViewWrap <$> templateViewNew a pId
-- Page mode. pageBufferMode = templateBufferMode
-- Get package name to update user's configure. pageBufferPackageName _ = fmap takeFileName getDataDir
-- Save buffer state. pageBufferWriteState = templateBufferWriteState -- Restore buffer state. pageBufferReadState = templateBufferReadState
instance PageView TemplateView where
-- Page buffer. pageViewBuffer = PageBufferWrap . templateViewBuffer -- GtkPlug id. pageViewPlugId = templateViewPlugId -- Page Frame. pageViewFrame = templateViewFrame -- Local keymap. pageViewLocalKeymap _ = templateViewLocalKeymap
-- Command map. pageViewLocalCommandMap _ = templateViewLocalCommandMap
-- How to focus when manatee focus current application. pageViewFocus = widgetGrabFocus . templateViewView
-- Which widget to propagate event. pageViewPropagateWidget = castToWidget . templateViewView -- Save view state. pageViewSaveState view = templateViewSaveState view Nothing
-- Restore view state. pageViewRestoreState view = templateViewRestoreState view Nothing
-- Save view state to file. pageViewWriteState view path = templateViewSaveState view (Just path)
-- Restore view state from file. pageViewReadState view path = templateViewRestoreState view (Just path)
-- How to handle cut action, can ignore. pageViewCut = templateViewCut
-- How to handle copy action, can ignore. pageViewCopy = templateViewCopy
-- How to handle paste action, can ignore. pageViewPaste = templateViewPaste
-- How to scroll top postion, can ignore. pageViewScrollToTop = templateViewScrollToTop
-- How to scroll bottom postion, can ignore. pageViewScrollToBottom = templateViewScrollToBottom
-- How to scroll vertical page, can ignore. pageViewScrollVerticalPage = templateViewScrollVerticalPage
-- How to scroll vertical step, can ignore. pageViewScrollVerticalStep = templateViewScrollVerticalStep
-- How to scroll to left side, can ignore. pageViewScrollToLeft = templateViewScrollToLeft
-- How to scroll to right side, can ignore. pageViewScrollToRight = templateViewScrollToRight
-- How to scroll horizontal page, can ignore. pageViewScrollHorizontalPage= templateViewScrollHorizontalPage
-- How to scroll horizontal step, can ignore. pageViewScrollHorizontalStep= templateViewScrollHorizontalStep
Todo
Optimise Code
Core
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.
Browser
Javascript framework
Save password
Auto fill
Cache support
Integrate Google SafeBrowse.
IDE features:
Code completion
Code snippet
Fly check
Fly make
Integrated 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
Mail-Client
Support mail search
Support offline view
Org-Mode
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.
BT-Client
Twitter client
Terminal emulator
Use MVC design terminal emulator replace VTE widget, or patch to VTE to support MVC. :)