@@ -1,218 +1,95 @@-# Luakit
+# Skull Browser
-luakit is a fast, light and simple to use micro-browser framework
-extensible by Lua using the WebKit web content engine and the GTK+
-toolkit.
+A keyboard-driven web browser that treats the small web as a first-class
+citizen. Regular sites over `https://`, plus native `gopher://` support.
+Everything above the C core is Lua, and you can change all of it.
+
+
+
-### Don't Panic!
-You don't have to be a developer to use luakit on a daily basis. If you
-are familiar with quitebrowser, vim-browser, jumanji or extensions like
-Vimium or cVim etc, you will find luakit behaves similarly out of the box.
+## What it is
+Modal navigation in the vim tradition: `hjkl` to scroll, `f` to follow links by
+keyboard hint, `:` for commands. The rendering engine is WebKitGTK, the widget
+layer is GTK 3, and roughly sixty Lua modules sit on top providing tabs, modes,
+bindings, ad blocking, bookmarks, history, downloads and the internal
+`skull://` pages.
-## Requirements
+Version 0.01. Linux only. It has never been built on macOS, BSD or Windows, so
+it is not claimed to work there. On Windows it runs under WSL with WSLg, because
+that is Linux.
- * GTK+ 3
- * Lua 5.1 or LuaJIT 2
- * lfs (lua file system)
- * webkit2gtk
- * sqlite3
- * gstreamer (for video playback)
- * lua-socket (for gopher support)
+## Requirements
-## Installing
+ GTK 3
+ WebKitGTK 4.1
+ Lua 5.1 or LuaJIT
+ lfs (lua filesystem)
+ socket (lua socket, for gopher)
+ sqlite3
+ gstreamer (video playback)
-Luakit is available on most Linux Distributions and BSD system via their
-package managers. A few examples below:
- * Debian/Ubuntu: apt-get install luakit
- * Gentoo: emerge luakit
- * Guix: guix install luakit
- * Arch: pacman -S luakit
- * FreeBSD: pkg install luakit
- * OpenBSD: pkg\_add luakit
- * Void Linux: xbps-install luakit
+## Install
-Packaging status:
+Clone, pull in the dependencies, build:
-[](https://repology.org/project/luakit/versions)
+ git clone https://github.com/runawaydevil/skull-browser.git
+ cd skull-browser
+ sh build-utils/setup-deps.sh
+ make
+`setup-deps.sh` handles apt, dnf and pacman. It needs sudo to install and it
+verifies everything afterwards, so run it once and read what it prints. To
+check an existing system without installing anything:
-## Installing from source
+ sh build-utils/setup-deps.sh --check
-Make sure you system fulfills the requirements listed above, then
-install luakit with the following commands:
+Then install system-wide:
- $ git clone https://github.com/luakit/luakit.git
- $ cd luakit
- $ make
- $ sudo make install
+ sudo make install
-Uninstall with:
-
- $ sudo make uninstall
+Or into your home directory, no root needed:
-Note: If you are on BSD, you might need to use `gmake`.
+ make PREFIX=$HOME/.local XDGPREFIX=$HOME/.local/etc/xdg install
+Make sure `$HOME/.local/bin` is on your `PATH` if you go that route.
-## Use Luakit
-Just run:
+## Run
- $ luakit [URI..]
+ skull-browser
+ skull-browser gopher://gopher.floodgap.com
+ skull-browser -k # check config and exit
-Or to see the full list of luakit launch options run:
-
- $ luakit -h
-
-Luakit works with vim-style bindings. To find out more, type `:help`
-within luakit.
+Press `gA` or type `:about` for version information.
## Configuration
-Luakit configuration files are written in `lua`. This means you can
-program within the config files, which make the configuration options
-endless.
+User config lives in `~/.config/skull-browser/`. Copy the shipped `rc.lua` there
+and edit it:
-There are three ways to customize luakit.
+ mkdir -p ~/.config/skull-browser
+ cp /usr/local/etc/xdg/skull-browser/rc.lua ~/.config/skull-browser/
-**1. within luakit**
+Themes are a flat Lua table in `theme.lua` with a cascading naming scheme:
+`tab_selected_fg` falls back to `selected_fg`, then to `fg`. Change a handful
+of root keys and the whole interface follows.
-After starting luakit, type `:settings`. This page shows you webkit
-engine related settings.
-**2. userconf.lua**
+## Tests
-Create a file called `$HOME/.config/luakit/userconf.lua`. Then add
-your configuration there. Configuration in this file supersedes
-configuration set in `:settings`
+ make run-tests
-**3. copy rc.lua**
+Requires `luassert`. The suite covers the Lua modules and the C bindings.
-The most powerful customization is to copy `rc.lua` from
-`/etc/xdg/luakit/rc.lua` to `$HOME/.config/luakit/rc.lua`
-When this file is found, `/etc/xdg/luakit/rc.lua` is ignored.
+## License
-Be informed that when luakit is updated, you may need to adapt changes
-from `/etc/xdg/luakit/rc.lua` to your own copy.
-
-
-## Colors and fonts
-
-Copy the `/etc/xdg/luakit/theme.lua` to
-`$HOME/.config/luakit/theme.lua`. You can change fonts and colors there.
-
-
-## Development Information
-
-This section contains information about the compile and testing process.
-
-Luakit honors the PREFIX variable. The default is `/usr/local`.
-
- $ make PREFIX=/usr
- $ sudo make PREFIX=/usr install
-
-Notes:
- - You also have to set the PREFIX when uninstalling.
- - If you want to change PREFIX after a previous build, you need to `make clean` first.
-
-Luakit uses `luajit` by default, to use `lua` you can turn off luajit
-with:
-
- $ make USE_LUAJIT=0
-
-To build with local paths (interesting for package maintainer and
-contributers). You may wish to build luakit with:
-
- $ make DEVELOPMENT_PATHS=1
-
-This lets you start luakit from the build directory, using the config
-and libraries within the same.
-
-Take a look at `config.mk` for more options.
-
-If you made changes and want to know if luakit is still working properly,
-you can execute the test suite with:
-
- $ make test
-
-
-## Debugging Luakit
-
-**Enable debug output**
-
-Debug output can be turned on by starting luakit with the `--log` option.
-
- $ luakit --log=verbose # or: -v
- $ luakit --log=all=debug # or: --log=debug
- $ luakit --log=lua/adblock=debug # turn on debug on for the adblock module.
-
-Console output an also be seen within luakit using `:log` when the
-[log_chrome](https://luakit.github.io/docs/modules/log_chrome.html)
-module is loaded (default). Note that debug log level may lead to a race
-condition when the update of the log page leads to debug output, which
-causes an update of the :log page.
+GNU GPLv3. See `COPYING.GPLv3`.
-**Execute lua within Luakit**
-
-If you want to examine the lua state at runtime, you can do so by
-running lua script within luakit. This will print "Hello World!"
-on the console.
-
- :lua print("Hello World!");
-
-w:notify() can be used to show the output in the input/status bar. This
-example shows the configuration directory in the input/status bar.
-
- :lua w:notify(luakit.config_dir)
-
-Print the lua package search paths:
-
- :lua w:notify(package.path:gsub(";","\n"))
-
-To extend the lua debugging capabilities, you can copy "inspect.lua"
-from [here](https://github.com/kikito/inspect.lua) into the luakit
-configuration directory. Now you can inspect complex data types like
-tables:
-
- :lua local inspect = require "inspect"; w:notify(inspect(webview))
-
-
-## Tips and Fixes:
-
-**Video playback**
-
-If you're having issues with video playback, this is often related to
-buggy graphic drivers. It often helps to set LIBGL\_DRI3\_DISABLE before
-starting luakit:
-
- $ export LIBGL_DRI3_DISABLE=1
-
-**HiDPI Monitor Configuration**
-
-If you have a HiDPI monitor (> 1920x1080) and find that web pages are
-too small, you can change the `webview.zoom_level` on the settings page
-(skull://settings/) to 150 or 200 as per your taste.
-
-
-## Reporting Bugs
-
-Please note that most rendering related issues come from the used webkit
-engine and can not be fixed by luakit. If you think your issue is luakit
-related, please use the bug tracker at:
-
- https://github.com/luakit/luakit/issues
-
-Coming from a very old luakit version? Look at the
-[MIGRATION](MIGRATE.md) document.
-
-
-## IRC
-
-Join us in `#luakit` on the `irc.oftc.net` network.
-
+Based on luakit. All prior authorship is preserved in `AUTHORS`.
@@ -46,21 +46,21 @@ case "$FAMILY" in
debian)
PACKAGES="build-essential pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev
- libsqlite3-dev luajit libluajit-5.1-dev lua-filesystem lua-socket
+ libsqlite3-dev luajit libluajit-5.1-dev lua-filesystem lua-socket lua-luassert
libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good"
INSTALL="sudo apt-get install -y"
REFRESH="sudo apt-get update"
;;
fedora)
PACKAGES="gcc make pkgconf-pkg-config gtk3-devel webkit2gtk4.1-devel
- sqlite-devel luajit luajit-devel lua-filesystem lua-socket
+ sqlite-devel luajit luajit-devel lua-filesystem lua-socket lua-luassert
gstreamer1-devel gstreamer1-plugins-base-devel"
INSTALL="sudo dnf install -y"
REFRESH="sudo dnf makecache"
;;
arch)
PACKAGES="base-devel pkgconf gtk3 webkit2gtk-4.1 sqlite luajit
- lua51-filesystem lua51-socket gstreamer gst-plugins-base gst-plugins-good"
+ lua51-filesystem lua51-socket lua51-luassert gstreamer gst-plugins-base gst-plugins-good"
INSTALL="sudo pacman -S --needed --noconfirm"
REFRESH="sudo pacman -Sy"
;;
@@ -0,0 +1,118 @@+--- Pagina skull://about.
+--
+-- @module about_chrome
+-- @copyright 2026 Pablo Murad <pablomurad@pm.me>
+
+local chrome = require("chrome")
+local lousy = require("lousy")
+local modes = require("modes")
+local add_binds, add_cmds = modes.add_binds, modes.add_cmds
+
+local _M = {}
+
+_M.stylesheet = [===[
+ body {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 78vh;
+ margin: 0;
+ background: #0c0d10;
+ color: #e7e3d8;
+ font-family: monospace;
+ }
+ #about {
+ text-align: center;
+ line-height: 1.7;
+ }
+ #mark {
+ width: 96px;
+ height: 96px;
+ margin: 0 auto 26px;
+ image-rendering: pixelated;
+ }
+ #name {
+ font-size: 30px;
+ font-weight: 700;
+ letter-spacing: 3px;
+ margin: 0;
+ color: #3df07a;
+ }
+ #version {
+ font-size: 13px;
+ color: #6f7480;
+ margin: 6px 0 30px;
+ }
+ #author {
+ font-size: 15px;
+ margin: 0 0 30px;
+ }
+ #origin {
+ font-size: 12px;
+ color: #6f7480;
+ max-width: 46ex;
+ margin: 0 auto;
+ }
+]===]
+
+-- O cranio, embutido: a pagina precisa funcionar sem depender de um handler
+-- de recurso que hoje nao existe.
+local mark_svg = [==[
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
+<rect width="64" height="64" rx="14" fill="#050B07"/>
+<g fill="#3DF07A">
+<rect x="20" y="11" width="24" height="3"/><rect x="14" y="14" width="36" height="3"/>
+<rect x="11" y="17" width="42" height="3"/><rect x="8" y="20" width="48" height="3"/>
+<rect x="8" y="23" width="6" height="3"/><rect x="23" y="23" width="18" height="3"/>
+<rect x="50" y="23" width="6" height="3"/><rect x="8" y="26" width="6" height="3"/>
+<rect x="23" y="26" width="18" height="3"/><rect x="50" y="26" width="6" height="3"/>
+<rect x="8" y="29" width="48" height="3"/><rect x="8" y="32" width="21" height="3"/>
+<rect x="35" y="32" width="21" height="3"/><rect x="8" y="35" width="48" height="3"/>
+<rect x="11" y="38" width="42" height="3"/><rect x="14" y="41" width="36" height="3"/>
+<rect x="17" y="44" width="30" height="3"/><rect x="20" y="47" width="24" height="3"/>
+<rect x="20" y="50" width="3" height="3"/><rect x="26" y="50" width="3" height="3"/>
+<rect x="35" y="50" width="3" height="3"/><rect x="41" y="50" width="3" height="3"/>
+</g></svg>
+]==]
+
+local html_template = [==[
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Sobre</title>
+ <style>{stylesheet}</style>
+</head>
+<body>
+ <div id="about">
+ <div id="mark">{mark}</div>
+ <p id="name">SKULL BROWSER</p>
+ <p id="version">{version}</p>
+ <p id="author">{author}</p>
+ <p id="origin">{origin}</p>
+ </div>
+</body>
+</html>
+]==]
+
+chrome.add("about", function ()
+ local subs = {
+ stylesheet = _M.stylesheet,
+ mark = mark_svg,
+ version = lousy.util.escape(luakit.version),
+ author = "Pablo Murad",
+ origin = "Baseado no luakit. Distribuido sob a GNU GPLv3.",
+ }
+ return (string.gsub(html_template, "{(%w+)}", subs))
+end)
+
+add_binds("normal", {
+ { "^gA$", "Abrir a pagina sobre.", function (w) w:navigate("skull://about/") end },
+})
+
+add_cmds({
+ { ":about", "Abrir a pagina sobre.", function (w) w:navigate("skull://about/") end },
+})
+
+return _M
+
+-- vim: et:sw=4:ts=8:sts=4:tw=80