You are not logged in.
Hello there,
I know there are already tons of minimalistic web browsers, but I find that most are too complex for my needs (and thus harder to customize), and apart from browsers that you recompile everytime, none, as far as I know, let you access WebKit's C API directly.
So, here's mine. I initially made it for myself but sharing it wouldn't harm anyone. The C program in itself is less than 300 lines of codes; basically, all it does is create the web view, load the plugins and register the commands. With a few plugins you'll be able to have a configuration file and set keyboard bindings (needless to say there are no default keys).
If you want a list of features anyway, here's a short list of the packaged plugins:
bind: Vi-like keyboard bindings
exec: scripting capability (lets your write configuration files)
address-bar, yay
insert: important if you want to be able to fill forms
download
many more at http://git.mg0.fr/luminescence/tree/plugins
AUR: https://aur.archlinux.org/packages.php?ID=57930
Built package: http://mg0.fr/arch/x86_64/luminescence- … pkg.tar.xz
For more information (you'll need at least the README): http://mg0.fr/luminescence/
Cheers,
Fred
Offline
Offline
Looks awesome, but I just don't get it working. I installed all aviable plugins and copied the example config from the readme (so the config snippets file looks like this :
user-agent "Mozilla/5.0 Luminescence"
scripts on
uri https://archlinux.org
bind i insert-mode
bind u uri-edit
bind r reload
bind j scripts off
bind J scripts on
bind / find
but no keybindings work.
Last edited by Neula (2012-08-14 21:05:23)
Offline
Seems to work well here so far, good job fmang.
ᶘ ᵒᴥᵒᶅ
Offline
Got it working too.
Very awesome browser
EDIT: I found the cause for my Problem: keys don't work when having the numpad enabled.
Last edited by Neula (2012-08-14 21:52:37)
Offline
I really like the concept behind this browser, but after taking a quick look, I think that some plugins are kind of taking it too far. Sure, modularity is good, but I don't see why a separate shared library has to be loaded (which AFAIK takes some time) just so one can write something to stdout. A "core" plugin containing simple things like echo or quit would be great.
Also, I noticed some small details I don't quite like when browsing through the code. Maybe I'll fork it and send a pull request tomorrow if I have some spare time.
(I must admit that I didn't actually try it out yet.)
Offline
Fun! Any chance of tabbed browsing, or at least Xembed-awareness (for use with suckless' tabbed)?
Or keyboard-based link following?
Also, I'm having trouble figuring out how keybindings for scrolling work. I have 'bind c scroll' in my config, but hitting c doesn't seem to scroll. I'm probably missing something super obvious, cuz that's what I do. It's sort of my gimmick. :-)
Offline
Also, I'm having trouble figuring out how keybindings for scrolling work. I have 'bind c scroll' in my config, but hitting c doesn't seem to scroll. I'm probably missing something super obvious, cuz that's what I do. It's sort of my gimmick. :-)
It's not documented anywhere, but the scroll command takes a second argument specifying the direction ("up", "down", "left" or "right"). I had to figure it out by reading the plugin code.
Offline
Thanks for the feedback.
Have your answers:
Is webgl enabled btw?
Luminescence uses WebKitGTK+ which, according to this, supports WebGL since 1.8. I cannot test though (poor chipset).
Any chance of tabbed browsing, or at least Xembed-awareness (for use with suckless' tabbed)?
No tabbed browsing planned (this would be troublesome). As for XEmbed, a plugin should do the trick, if it's not already enabled by Gtk. I've never used that, I'll try to give it a look.
Or keyboard-based link following?
No plugin for that yet. This would require a bit of work but with some JS one should be able to figure that out.
guelfi's questions are answered here: https://github.com/fmang/luminescence/issues/1
Offline
Hello, I am trying to get this going on OpenBSD. Here is a diff to get it compile:
diff --git a/Makefile b/Makefile
index c92f0c7..c71c049 100644
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,13 @@ CFLAGS=-g -Wall
all: luminescence
luminescence: luminescence.c luminescence.h
- gcc -o luminescence luminescence.c $(CFLAGS) -ldl `pkg-config --cflags --libs gtk+-3.0 webkitgtk-3.0 gthread-2.0`
+ gcc -o luminescence luminescence.c $(CFLAGS) `pkg-config --cflags --libs gtk+-3.0 webkitgtk-3.0 gthread-2.0`
clean:
rm -f luminescence
install: luminescence
mkdir -p $(DESTDIR)/{bin,include,src/luminescence/plugins}
- install -m 755 luminescence luminescence-install -t $(DESTDIR)/bin
- install -m 644 luminescence.h -t $(DESTDIR)/include
- install -m 644 plugins/*.c -t $(DESTDIR)/src/luminescence/plugins
+ install -m 755 luminescence luminescence-install $(DESTDIR)/bin
+ install -m 644 luminescence.h $(DESTDIR)/include
+ install -m 644 plugins/*.c $(DESTDIR)/src/luminescence/plugins
diff --git a/luminescence-install b/luminescence-install
index 2a8e7f2..2bf934c 100755
--- a/luminescence-install
+++ b/luminescence-install
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
mkdir -p ~/.luminescence/plugins
for f in "$@" ; do
echo "installing $(basename "$f" .c)..."
After that, with empty config file it manages to start. If you pass --help this is what happens:
$ luminescence --help
Luminescence version 1.2
Usage: luminescence --COMMAND ARG1 ARG2 ...
Segmentation fault (core dumped)
If you start using any sort of configuration/plugins it doesn't even manage to start, it just core dumps. Plugins are sucessfully built in ~/.luminescence/plugins.
Any ideas? Is there something Linux-specific in the code? Thanks
Offline
Concerning XEmbed, here's what I got so far:
diff --git a/luminescence.c b/luminescence.c
index 8cab0e8..54eaa42 100644
--- a/luminescence.c
+++ b/luminescence.c
@@ -1,4 +1,5 @@
#include "luminescence.h"
+#include <gtk/gtkx.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
@@ -240,7 +241,8 @@ int main(int argc, char **argv){
gtk_init(&argc, &argv);
// Window
- lumi.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ const char *xid = getenv("XID");
+ lumi.window = xid ? gtk_plug_new(atoi(xid)) : gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_has_resize_grip(GTK_WINDOW(lumi.window), FALSE);
g_signal_connect(lumi.window, "delete-event", G_CALLBACK(gtk_main_quit), NULL);
To make it work with suckless's tabbed, you can make a little wrapper:
#!/bin/sh
XID="$1" exec luminescence
But for some reason, it's awfully slow, so I won't merge that now.
As for the OpenBSD issue, my guess is that it has something to do with OpenBSD's dynamic loader. Maybe some flag is missing when building the plugins, or perhaps one of the functions behaves slighlty differently. Maybe you could try to pinpoint the line that causes the crash; or just send me a mail.
Last edited by fmang (2014-10-27 06:43:23)
Offline
Looks awesome, but I just don't get it working. I installed all aviable plugins and copied the example config from the readme (so the config snippets file looks like this :
user-agent "Mozilla/5.0 Luminescence" scripts on uri https://archlinux.org bind i insert-mode bind u uri-edit bind r reload bind j scripts off bind J scripts on bind / find
but no keybindings work.
Same problem here, no keybindings work and specifying an uri in the config doesn't do anything. All I get is a blank white area.
Looks promising if I could get it to work!
bladdo / mil / Miles
userbound.com - blog and projects
Offline
Is your numpad enabled? Keybinds don't work when it is.
Offline
Same problem here, no keybindings work and specifying an uri in the config doesn't do anything. All I get is a blank white area.
Looks like the plugins aren't loaded. If you don't even see a (blank) gray status bar, check if they are indeed installed and loaded:
ls ~/.luminescence/plugins
luminescence --help
If not, this command installs all the packaged plugins:
luminesence-install /usr/src/luminescence/plugins/*.c
Offline
I'm new on here and I know that this thread is old but I got a burning question that needs to be answered - I love your browser but I'm having real trouble watching any youtube videos or anything like that. Does luminescence even work with flash and javascript or is there any way to make it work? I don't care much for javascript but it's no good if flash doesn't work. Any help, suggestions welcome - cheers!
You can fix stupid. With brain surgery.
Offline
I love your browser but I'm having real trouble watching any youtube videos or anything like that. Does luminescence even work with flash and javascript or is there any way to make it work?
See http://git.mg0.fr/luminescence-quvi/. Clone it from the link at the bottom and check the README.
I haven't touched that plugin for a while, so it probably won't work with the newest libquvi. Try building with libquvi 0.4.
The commands are `video-get` to download the video, `video-leave` to cancel or close, and `video-play` to start mplayer. Feel free to tweak the code.
Offline