GNU Emacs: A configurable browser

Now you can use GNU Emacs as a full featured browser. It uses webkit2gtk for rendering. Here's a short video demonstrating the features.



Hit-a-hint

Developer tools


Features:
- Adblock
- Disabled tracking API (navigator.sendBeacon())
- Inline videos à la Youtube
- Hit-a-Hint
- Keyboard based navigation: left/right character for left/right scroll, prev/next line, prev/next page, beginning/end of buffer for top/end of page, +/-/z for zoom in/out/reset
- Multi-input modes: single key interactive mode, line input mode via minibuffer and textarea input mode via new buffer
- Password auto-fill and management via authinfo
- Configurable Home page and search URL
- Bookmarks
- Download unsupported mime types
- User script à la Tampermonkey / Greasemonkey
- User styles
- Developer tools / Web Inspector

Finally you can have a browser as you want.


Code:
https://gitlab.com/atamariya/emacs/-/blob/dev/src/xwidget.c

https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/xwidget.el
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/webkit/webkit-ace.el

https://gitlab.com/atamariya/emacs/-/blob/dev/etc/webkit/hints.js
https://gitlab.com/atamariya/emacs/-/blob/dev/etc/webkit/hints.css

 

Build

Right now, it's a custom fork from an old version of Emacs. There's a competing implementation available in Emacs master branch. Till this code gets merged in Emacs master, you can build it from dev branch at https://gitlab.com/atamariya/emacs .

git clone --depth 1 https://gitlab.com/atamariya/emacs.git
cd emacs
git checkout dev
./configure --with-xwidgets
make && sudo make install

 

Custom Theme

In terms of appearance, browser provides full control to webpage author. Your default theme will only work if the author doesn't override those definitions. However, you can force your theme by loading it via custom JS which always runs last. You can define your custom CSS in hints.css .


References

  1. Hit-a-hint https://github.com/akirakyle/emacs-webkit


Comments

Popular posts from this blog

GNU Emacs as a Comic Book Reader

Tinylisp and Multi-threaded Emacs

Data Visualization with GNU Emacs