Lightweight web browser for SliTaz
Toile is the light web browser of SliTaz: one small GTK 3 program with
tabs, bookmarks, history with completion in the address bar, downloads,
find in page, zoom, screenshots and private windows. Its settings live in
a few plain text files and in internal toile:// pages.
"Toile" is French for web and canvas; the logo is the SliTaz spider.
In SliTaz 5.1, Toile runs on Soie, a young and lightweight web engine made for SliTaz. It ships in the core ISO images (the core, core-x86_64 and core-retro flavors) on i486 and x86_64. Soie does not render every site yet: some pages may look wrong or lack features; each Soie release closes the gap. Toile can also be built on WebKitGTK 4.1 for other systems, see WebKitGTK build.
Toile takes its colors from the GTK theme, dark or light. The
toile:// pages are light by default and turn dark when the
GTK theme prefers a dark variant.
- Package and files
- Starting Toile
- The window
- Address bar and search
- Keyboard shortcuts
- Context menu
- Bookmarks and history
- Downloads and screenshots
- Private windows
- Internal pages
- Configuration: toilerc
- Files
- WebKitGTK build
- About
Package and files
Toile is already installed on the core ISO images. On another flavor,
install the toile package; it pulls in gtk+3
and soie-gtk:
# spk-add toile
| File | Role |
|---|---|
/usr/bin/toile | The browser |
/usr/share/toile/style.css | Layout of the window (sizes, fonts, accent color) |
/usr/share/toile/homepage.html | The start
page, toile://home, plus translated copies
homepage.<lang>.html |
/usr/share/applications/toile.desktop | Menu entry; declares Toile as a web browser for http, https and HTML files |
/usr/share/icons/hicolor/scalable/apps/toile.svg |
Icon |
/usr/share/locale/*/LC_MESSAGES/toile.mo |
Message translations |
Starting Toile
toile [option] [URL]
toile | Open a window on the home page. |
toile URL | Open URL in the first tab. |
-h, --help | Show the help and exit. |
-V, --version | Show the version and exit. |
The options work without a display. Any other argument starting with
- is refused with an error. The URL is read like a line
typed in the address bar (see below): a path
starting with / opens a local file, a bare host name gets
https://, and words are sent to the search engine.
$ toile slitaz.org $ toile toile://about $ toile /usr/share/doc/index.html
Each new window reads the settings again. Quitting the last window ends the program.
The window
The title bar holds everything, centered in one group:
| Button | Action |
|---|---|
| ← Back, → Forward | Page history of the current tab (Ctrl+Left, Ctrl+Right) |
| ↻ Reload | Reload the page (F5) |
| Address bar | URL or search (Ctrl+L) |
| ★ Bookmarks | Bookmarks popover (Ctrl+B) |
| ◌ Private window | Open a private window (Ctrl+Shift+N) |
| ☰ Menu | Settings (toile://admin), About
(toile://about), Quit (Ctrl+Q) |
The buttons use the icon theme's symbolic icons, or a Unicode glyph when the theme lacks one. The minimize, maximize and close buttons are always on the right.
Below, the tab strip: each tab shows the page title and a × close button (visible on the active tab and on hover); tabs can be dragged to reorder them; the + button at the end opens a new tab on the home page. Closing the last tab closes the window. The downloads panel appears at the bottom when a download starts, and the find bar at the bottom of the tab when you search in the page.
Address bar and search
The address bar shows the page address without https://,
http:// or file://; when you click in it, it
shows the full address to copy or edit. It is empty on the home page.
What you type is read in this order:
- a path starting with
/: opened asfile://; - a line starting with
http://,https://,file://,toile://orabout:: opened as is; - a line without spaces that contains
://, starts withlocalhostor holds a dot (likeslitaz.org): opened withhttps://before it; - anything else: a search. The text is URL-encoded and appended to
the search URL, by default
https://html.duckduckgo.com/html/?q=(the HTML version of DuckDuckGo, which Soie can show).
From the second character typed, a list proposes up to 8 pages of the history whose address or title contains the text.
Keyboard shortcuts
The full list is also on the home page, toile://home.
| Keys | Action |
|---|---|
| Ctrl+T | New tab on the home page |
| Ctrl+W | Close the tab (the last one closes the window) |
| Ctrl+Tab / Ctrl+Shift+Tab | Next / previous tab |
| Ctrl+L | Focus the address bar, text selected |
| Ctrl+R, F5 | Reload |
| Ctrl+Left / Ctrl+Right | Back / forward; in a text field they move by word instead |
| Ctrl+D | Bookmark the page (not in a private window) |
| Ctrl+B | Bookmarks popover |
| Ctrl+H | History popover |
| Ctrl+J | Show or hide the downloads panel |
| Ctrl+F | Show or hide the find bar |
| Ctrl+G / Ctrl+Shift+G | Next / previous match |
| Escape | Close the find bar |
| Ctrl+= or Ctrl++ / Ctrl+- | Zoom in / out by 10%, from 50% to 300% |
| Ctrl+wheel | Zoom in / out |
| Ctrl+0 | Zoom back to 100% |
| Ctrl+Shift+S | Screenshot of the visible page |
| Ctrl+Shift+N | New private window |
| F11 | Fullscreen on or off |
| Ctrl+Q | Quit: closes every Toile window |
The find bar searches as you type, ignores case and wraps around; it shows "N of M" or "No matches". Its ↑ and ↓ buttons go to the previous and next match.
Context menu
A right click shows the Soie menu (Back, Forward, Reload, Copy Link Address, Copy Image Address, Paste) with Toile's items:
- on a link, Open in New Tab and Open in New Window at the top (from a private window, the new window is private too);
- Bookmark This Page and Save Screenshot at the end.
Links with target=_blank, a middle click or a Ctrl+click on
a link also open a new tab.
Bookmarks and history
Ctrl+D, or Bookmark This Page in the context menu, adds the current page
with its title; a page already bookmarked is not added twice. The ★
button or Ctrl+B opens the bookmarks popover: click a row to open it in
the current tab, click its × to remove it. toile://bookmarks
lists them all.
Every page loaded in a normal window goes to the history, except
about: and toile:// pages. The history keeps the
last 1000 pages. Ctrl+H shows the last 50 in a popover;
toile://history shows the last 200 and has a Clean
History link that empties it.
Downloads and screenshots
Downloads start without a question and are saved in
~/Downloads (or the XDG download directory,
$XDG_DOWNLOAD_DIR), under a free and safe file name chosen
by Soie. The downloads panel opens at the bottom of the window: one row
per file with its name, a progress bar, the size received and a × button
to cancel. It hides itself 3 seconds after a download ends; Ctrl+J shows
or hides it. toile://downloads lists the downloads in
progress.
A screenshot (Ctrl+Shift+S or Save Screenshot) saves the visible part of
the page as toile-YYYYMMDD-HHMMSS.png in the XDG pictures
directory, or else the download directory, or else your home. A second
shot in the same second gets -2, -3... A small
popover under the address bar tells where the file went.
Private windows
Ctrl+Shift+N or the ◌ button opens a private window, titled "Private - Toile", with its bar and tab strip tinted orange. In a private window:
- pages are not written to the history;
- Ctrl+D and Bookmark This Page do nothing;
- cookies are kept in memory only, shared by the private windows, and lost when Toile quits.
Internal pages
The toile:// pages are built in. Pages of other sites cannot
load them or link to them; type them in the address bar or follow the
links of other toile:// pages.
| Page | Content |
|---|---|
toile://home | Start page and new tabs:
features, shortcuts, the configuration keys and a note on Soie. It
is shown in your language when a translation exists
(homepage.<lang>.html), else in English. |
toile://about | Version, engine, licence, sources, Soie limitations, list of the internal pages |
toile://admin | Settings, see below |
toile://bookmarks | All bookmarks |
toile://history | The last 200 pages and Clean History |
toile://downloads | Downloads in progress |
toile://admin (☰ menu, Settings) sets:
- Home URL: the start page of windows and new tabs;
- Search engine URL: the search text is appended to its end;
- Cookie policy: Accept all, Same-origin only (default: no third-party cookies) or Refuse all;
- Clear all cookies: of the normal windows, or of the private ones when used from a private window.
Both URLs must start with http://, https://,
toile:// or about:, otherwise they are ignored.
Save settings applies them at once and writes
toilerc.
Configuration: toilerc
Toile reads ~/.config/toile/toilerc when a window opens. The
file is optional: one key = value per line, lines starting
with # are ignored, an unknown key gives a warning on the
terminal.
| Key | Default | Meaning |
|---|---|---|
home_url | toile://home |
Start page |
search_url |
https://html.duckduckgo.com/html/?q= |
Search engine; the query is appended |
cookie_policy | same-origin |
all, same-origin or
none |
win_width, win_height |
1024, 768 | Window size |
win_maximized | 0 | 1 opens the window maximized |
hw_accel | on-demand |
WebKitGTK build only: on-demand,
never or always. No effect with Soie,
which paints in software. |
# ~/.config/toile/toilerc home_url = https://www.slitaz.org/en/ win_width = 1280 win_height = 800
Toile writes this file itself when a window closes (to remember its size
and maximized state; the normal size is kept, not the maximized or
fullscreen one) and when settings are saved in
toile://admin. It then rewrites the whole file:
win_width and win_height always, the other keys
only when they differ from the defaults. Your comments are not kept. An
old theme key is ignored, and an old
home_url = https://www.slitaz.org is read as
toile://home.
Files
Toile creates ~/.config/toile readable by you only, and its
files with mode 600.
| File | Content |
|---|---|
~/.config/toile/toilerc | Settings, see above |
~/.config/toile/bookmarks | One bookmark per
line: URL<tab>Title |
~/.config/toile/history | One page per line:
TIMESTAMP<tab>URL<tab>Title, oldest first;
cut back to 1000 lines at startup |
~/Downloads/ | Downloaded files |
The bookmarks and history files are plain text: you can edit them with Toile closed, or delete them to start afresh.
WebKitGTK build
On other systems, Toile can be built on WebKitGTK 4.1 instead of Soie
(this is the default of its sources). toile://about tells
which engine a build uses. Usage is the same, with these differences:
- The default search URL is
https://duckduckgo.com/?q=. - Downloads go to the XDG download directory (else your home); a name
already taken gets
(1),(2)... before its extension. Files the engine cannot show are downloaded. - The
hw_accelkey is honoured;neveravoids stalls on machines without a GPU. - Cookies are kept in
~/.local/share/toile/cookies.sqliteand the web cache in~/.cache/toile. Private windows use no disk cache. - A domain blocklist is added:
~/.config/toile/blocklist, one domain per line,#comments, at most 5000 entries. A domain blocks its subdomains too. On first run it is filled with a short list of advertising and analytics domains (google-analytics.com, doubleclick.net...). Thetoile://blocklistpage adds and removes domains; changes apply at once.
With Soie, content blocking is done by Soie itself; Toile has no blocklist page.
About
Toile is free software under the GNU GPL version 3 or later. Sources: hg.slitaz.org/toile. The Soie engine: soie.slitaz.org.