Toile — Lightweight Web Browser for SliTaz GNU/Linux
=====================================================

Toile replaces TazWeb starting with SliTaz 6.0. It is built on GTK 3
and WebKitGTK 4.1, written in C99, and follows the suckless philosophy:
minimal, single binary, compile-time configuration.

A legacy build also targets SliTaz 5.1 (WebKitGTK 2.4.x, API
webkit2gtk-3.0, GTK 3.14) — see LEGACY BUILD below.

"Toile" is French for "web" / "canvas".


BUILD DEPENDENCIES
------------------

  libgtk-3-dev
  libwebkit2gtk-4.1-dev

On Debian/Ubuntu/SliTaz:

  sudo apt-get install libgtk-3-dev libwebkit2gtk-4.1-dev

On SliTaz (tazpkg):

  tazpkg get-install gtk3-dev
  tazpkg get-install webkit2gtk-dev


BUILD
-----

  make          # builds ./toile
  make run      # builds and launches with default home URL
  make install  # installs to /usr/local/bin/toile
  make clean    # removes build artifacts

Change install prefix:

  make install PREFIX=/usr


LEGACY BUILD (SliTaz 5.1)
-------------------------

The WebKit API level is auto-detected: if webkit2gtk-4.1 is absent,
config.mk falls back to webkit2gtk-3.0 (WebKitGTK 2.4.x as packaged
for SliTaz 5.1 x86_64). Force it explicitly with:

  make WEBKIT_API=3.0

The legacy build additionally produces libtoileadblock.so, a WebKit
web extension installed to PREFIX/lib/toile that performs the adblock
subresource filtering (WebKit 2.4 has no content filter API).

Legacy functional differences:

  - Private windows run as a separate `toile --private` process
    (memory-only cookies, throw-away disk cache), since WebKit 2.4
    cannot create a second in-process context.
  - The hw_accel toilerc setting is ignored (no such API in 2.4).
  - The engine has no video/WebGL/WebAudio (disabled in the SliTaz
    webkit2gtk package).


CONFIGURATION
-------------

Copy config.def.h to config.h and edit before building to change
compile-time defaults (home URL, window size):

  cp config.def.h config.h
  $EDITOR config.h
  make

Runtime configuration is read from ~/.config/toile/toilerc.
Create the file if it does not exist. Example:

  # ~/.config/toile/toilerc
  home_url = https://duckduckgo.com
  win_width = 1280
  win_height = 800

Lines starting with # are ignored.


KEYBOARD SHORTCUTS
------------------

  Ctrl+T            New tab
  Ctrl+W            Close current tab
  Ctrl+Tab          Next tab
  Ctrl+Shift+Tab    Previous tab
  Ctrl+L            Focus URL bar
  Ctrl+R / F5       Reload
  Ctrl+Left         Back
  Ctrl+Right        Forward
  Ctrl+D            Bookmark current page
  Ctrl+B            Show bookmarks
  Ctrl+H            Show history
  Ctrl+J            Toggle downloads panel
  Ctrl+F            Find in page
  Ctrl+G            Find next
  Ctrl+Shift+G      Find previous
  Escape            Close find bar
  Ctrl+=            Zoom in
  Ctrl+-            Zoom out
  Ctrl+0            Reset zoom
  Ctrl+Shift+D      Toggle dark/light theme


USAGE
-----

  toile                    # opens home URL
  toile https://slitaz.org # opens given URL
  toile --private [url]    # opens a private window


LICENSE
-------

GPL-3.0-or-later — see LICENSE file.
