You are not logged in.

#601 2011-09-19 06:44:56

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: luakit browser framework (almost with jQuery!)

Okay, right I thought I had ttf-ms-fonts installed but I didn't. Funny thing it worked well in chromium though. Does it carry it's own fonts around or what?

I have some more questions at the moment:
1) what code should I look to modify so that shift+Enter works in insert mode? I don't even need a c&p snippet, just a hint.
2) follow doesn't seem to work well on all page elements it should, for example input box here and in "Post reply" is hilighted but isn't given a hint so I cannot follow into it; also gmail and google+ aren't really usable with hinting, though that's probably fault on google's part since facebook works really well here.
3) what code should I look to modify if I wanted to change address hints to work in sort-of keyword mode like in chromium? Right now if I type "arch luakit<Tab>" the completion is done on the last word only.
4) where should I tinker if I would like to change :bookmark behaviour a bit? I would like to modify it so that ":bookmark tag or tags" bookmarks current page under such tags and ":bookmark herp derp<Tab>" runs completion on currently opened tabs.
5) is there any way to have luakit ignore touchpad input then in insert mode?
6) how hard would be to add to write a slightly different bookmarking model? I mean something like adding bookmark title, showing if page is already bookmarked and maybe orthogonal directory structure? Is this all modifiable from lua, or some part of it is baked in and would require C side modification?
7) how exactly - if at all - do bookmakrs interact with page completion; would it be easy to signify which completions are bookmarked and which are history only and maybe sort by it or even give some reification to certain pages (ie. have google.com show always at the top)?

In general it would be nice to see a sort of hacking guide, what functionality goes where, maybe a luadoc documentation of the scripts, so it would be more readily explorable than comments in files.

EDIT:
5) sort of solved, shift+B gives command :bookmark current-page-url

EDIT2:
Now that I think of it you can disregard most if not all of the questions, I think delving into the code myself would be both more instructive and less intrusive to you here.

Last edited by jaen (2011-09-19 11:25:02)

Offline

#602 2011-09-19 13:25:42

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: luakit browser framework (almost with jQuery!)

They seem to work both. Thanks again xConStruct, this is really nice stuff, now it's just great!

Offline

#603 2011-09-19 15:57:14

mason.larobina
Member
From: Australia
Registered: 2009-07-02
Posts: 200
Website

Re: luakit browser framework (almost with jQuery!)

xConStruct wrote:

Maybe single- / double-quoting helps? Just a guess, can't test it at the moment smile

luakit.spawn("mplayer '" .. destination .. "'")
luakit.spawn('mplayer "' .. destination .. '"')

Might be better using the %q string format here (it quotes and escapes the value). Example:

luakit.spawn(string.format("mplayer %q", destination))

Offline

#604 2011-09-19 17:39:32

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: luakit browser framework (almost with jQuery!)

Nice, thanks Mason.

There's always a question left: What if I want to define the opening application by the file extension, how does it then have to look like?

Thanks guys!

Offline

#605 2011-09-19 18:27:28

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: luakit browser framework (almost with jQuery!)

You could just regex destination I guess.

Basing on the lua docs this should work:

downloads.add_signal("open-file", function(destination, mime_type, w)
    if destination.find(".pdf$") then
        luakit.spawn("epdfview " .. destination)
        return true
    end
end)

Last edited by jaen (2011-09-19 18:37:32)

Offline

#606 2011-09-19 22:33:43

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: luakit browser framework (almost with jQuery!)

Sorry to say that, but it doesn't work like this. Here's the output I get on the terminal

% luakit
/usr/share/themes/MurrinaLoveGray/gtk-2.0/gtkrc:50: Murrine configuration option "scrollbar_color" is no longer supported and will be ignored.

** (luakit:17005): WARNING **: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory

W: luakit: luaH_dofunction:104: error while running function
stack traceback:
	/home/army/.config/luakit/rc.lua:139: in function 'sigfunc'
	/usr/share/luakit/lib/lousy/signal.lua:69: in function 'emit_signal'
	/usr/share/luakit/lib/downloads.lua:188: in function </usr/share/luakit/lib/downloads.lua:184>
error: /home/army/.config/luakit/rc.lua:139: bad argument #2 to 'find' (string expected, got no value)

Any ideas?

Offline

#607 2011-09-20 00:03:13

sinplomo
Member
Registered: 2011-09-19
Posts: 4

Re: luakit browser framework (almost with jQuery!)

Hi

I have some troubles with luakit ...

-it often crashes, segfault, I don't know why, maybe because of flash ...
-is there anyway for some kind of session autosave to recover session if  luakit crashes?
-how to configure adblock extra?
-when I download something (like a pdf) i am unable to open it from luakit, how to make the linux command "mimeopen" open downloaded files?

-I updated luakit from git, and it seems that it doenst crash so often, but i dont know why now when i open a new tab, it doesnt open it after the current one, but its placed first...

Thanks for making this amazing piece of software!

Last edited by sinplomo (2011-09-20 00:04:43)

Offline

#608 2011-09-20 04:57:47

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: luakit browser framework (almost with jQuery!)

sinplomo wrote:

-when I download something (like a pdf) i am unable to open it from luakit, how to make the linux command "mimeopen" open downloaded files?

Just look a few posts before yours, it's discussed and explained there.

Offline

#609 2011-09-20 07:03:47

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: luakit browser framework (almost with jQuery!)

Whoops, sorry, I misread the docs (http://lua-users.org/wiki/StringLibraryTutorial) and forgot lua distinguishes calls that pass self reference with ":" instead of ".".

There are two fixes then:
1) you could just change the dot into a colon before find,
2) you could also call it like string.find(destination, ".pdf$"), or even better yet string.find(destination, ".pdf", -4) (you can do the same serach-limit thing with the colon call above, turning it into destination:find(".pdf", -4)).

EDIT:
I've been having intermittent luakit crashes, and upon running it from gdb I've acquired following stack race.

#0  0x00007ffff75970ea in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#1  0x00007ffff7594baf in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#2  0x00007ffff7658fa2 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#3  0x00007ffff7658647 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#4  0x00007ffff7641bb8 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#5  0x00007ffff7641e7b in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#6  0x00007ffff7643868 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#7  0x00007ffff6a44cc5 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#8  0x00007ffff6f003f2 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#9  0x00007ffff692e2c2 in ?? () from /usr/lib/libwebkitgtk-1.0.so.0
#10 0x00007ffff31f7b9b in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007ffff31f629d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0x00007ffff31f6a78 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0x00007ffff31f70ba in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#14 0x00007ffff564a687 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x000000000040c03c in main ()

I know it's not really informative, so I'm trying to build webkit with debug symbols, but that's a big beast and it's gonna take a while.

Last edited by jaen (2011-09-20 10:31:18)

Offline

#610 2011-09-20 12:19:52

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: luakit browser framework (almost with jQuery!)

Perfect, thanks jaen!

Offline

#611 2011-09-20 16:49:40

sinplomo
Member
Registered: 2011-09-19
Posts: 4

Re: luakit browser framework (almost with jQuery!)

sinplomo wrote:

-when I download something (like a pdf) i am unable to open it from luakit, how to make the linux command "mimeopen" open downloaded files?

solved this one wink thanks

sinplomo wrote:

-is there anyway for some kind of session autosave to recover session if  luakit crashes?
-how to configure adblock extra?

I updated luakit from git, and it seems that it doenst crash so often, but i dont know why now when i open a new tab, it doesnt open it after the current one, but its placed first...

Seems it only happens when I open a tab with middle click or Control

Offline

#612 2011-09-21 13:45:47

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: luakit browser framework (almost with jQuery!)

@sinplomo
>I updated luakit from git, and it seems that it doenst crash so often, but i dont know why now when i open a new tab, it doesnt open it after the current one, but its placed first...
you just need to merge your ~/.config/luakit with /etc/xdg/luakit

Last edited by cf8 (2011-09-21 13:46:24)

Offline

#613 2011-09-24 10:06:05

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: luakit browser framework (almost with jQuery!)

With boingboing.net's move to a new design, they introduced shortcuts for moving between articles, 'j' and 'k'. That's not the only site i saw in the last time that introduced shortcuts that interfered with luakit's navigation (although they sometimes just don't work e.g navigation between search results on google with the arrow keys, but i can live with it that way).

So now, luakit users have some problems and it seems to me, that it will get worse. Any ideas how to solve this? Pass-through mode wasn't any help (and even if it did, it would be a terrible work-around).

rich_o

Offline

#614 2011-09-24 17:10:09

Tzbob
Member
From: Belgium
Registered: 2011-04-12
Posts: 61

Re: luakit browser framework (almost with jQuery!)

rich_o wrote:

With boingboing.net's move to a new design, they introduced shortcuts for moving between articles, 'j' and 'k'. That's not the only site i saw in the last time that introduced shortcuts that interfered with luakit's navigation (although they sometimes just don't work e.g navigation between search results on google with the arrow keys, but i can live with it that way).

So now, luakit users have some problems and it seems to me, that it will get worse. Any ideas how to solve this? Pass-through mode wasn't any help (and even if it did, it would be a terrible work-around).

rich_o

I'm not sure why pass-through mode is a terrible work-around? As far as I know this is exactly why it's there in the first place. I've been using it on Google+ for ages without any problems. I also didn't notice any problems on boingboing.net, make sure you give the document focus once you're in pass-through, clicking inside the document gives it focus.

Offline

#615 2011-09-25 09:58:01

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: luakit browser framework (almost with jQuery!)

@tzbob:
i failed to scroll normally on boingboing using 'j' and 'k', even after giving the document focus in pass-through mode. and even if it would work here, the need for this procedure every time i'm using that site (and i think this is a trend, that other sites will follow) is what i would call a "terrible work-around". i'd prefer an option to ignore site introduced short cuts that are already taken by luakit. or to remap them. but i haven't really looked into it, so i have no real clue if/how that would work. 

rich_o

because i had to smile: you use pass-through on google+ "for ages"? like three months or so?

Offline

#616 2011-09-25 15:05:42

xConStruct
Member
From: Germany
Registered: 2010-12-29
Posts: 20
Website

Re: luakit browser framework (almost with jQuery!)

@rich_o: I played around a bit with boingboing.net, and it seems there is some bug in luakit. The keys should only be passed to the website if you are in insert/passthrough mode, but on boingboing.net it behaves differently: On load, normal luakit navigation works as expected, but as soon as you click the website, boingboing's article-navigation takes over although we're still in normal mode. You can't return to luakit navigation with [Esc] or by switching into insert mode and going back with [Esc] - the only way currently is to press [o] or selecting text on the status bar, thus shifting focus away from the website.

For clarification: As far as I know, luakit binds should have topmost priority in every case (so that e.g. [Esc] works in every mode) - passthrough/insert mode disable most of luakit binds (except [Esc] and a few others) so that you can pass keys to the website. Boingboing.net taking precedence over luakit j/k in normal mode seems to be bug.
Expected behaviour:
Normal mode: luakit navigation
Insert/passthrough: boingboing.net navigation

I had no problem on other keyboard navigation websites I encountered, for example j/k navigation in Google Reader/Mail: The website binds only work in passthrough/insert mode. (Except that luakit navigation doesn't work at all there, but that seems to be another issue with frames).

I don't really know how luakit processes keybinds yet, so maybe some main developer can resolve this issue. Still, I may try to come up with something if I find the time.

Offline

#617 2011-09-25 15:16:01

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: luakit browser framework (almost with jQuery!)

@xConStruct:
thank you for your clarification. after checking some other sites like ffffound.com i realized that you are indeed right and boingboing's behavior is the strange one. that's really good news for me.

Offline

#618 2011-09-26 11:13:40

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: luakit browser framework (almost with jQuery!)

Hi,

first of all, I'm really enjoying using luakit on both my netbook (perfect for small screens) and, more recently, my desktop. Not a problem whatsoever until these last days when I noticed something very strange: browsing galleries on imagebam.com or imageshack after a while kills my connection. For kill I mean I can't navigate at all, nor use any other IP protocol (imap, pop3 etc.), ping towards the router says "Destination Host Unreachable" and traceroute doesn't even reach the router. But my sister connected at the same time to the same router can navigate without issues. Rebooting the router doesn't resolve the problem. Rebooting the pc does. I'm using Arch64, if it may be important.

I'm posting this in the luakit thread because visiting the very same galleries with firefox doesn't block the connection. What is more strange is that it's just imagebam.com and imageshack, photobucket or imagevenue don't give this strange "block" despite being similar sites. I've no problem navigating other sites, even after hours. I've already checked that route table is in order, ethernet card is up and has an ip assigned and that closing and reopening luakit doesn't restart the connection.

Any idea what this could be? A bug in luakit or somewhere else (and where)? If the latter, sorry to have posted it here.


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

#619 2011-09-26 11:16:40

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: luakit browser framework (almost with jQuery!)

Have you tried another webkit-based microbrowser such as dwb, jumanji, uzbl etc…?

Last edited by jakob (2011-09-26 11:17:02)

Offline

#620 2011-09-26 14:04:21

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: luakit browser framework (almost with jQuery!)

Tried with dwb and chromium: same issue.
I'm suspecting an overheating of the router with consequent freeze of it but I've been testing downloading torrents for 1 hour and it's been very stable and indeed the router is quite colder at the touch. As long as I don't use a webkit-based browser I have no issue it seems. I'm baffled.


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

#621 2011-09-26 16:33:17

TheImmortalPhoenix
Member
From: 127.0.0.1
Registered: 2011-08-13
Posts: 436

Re: luakit browser framework (almost with jQuery!)

I have a problem opening gmail and google+, i have the response "browser not supported"...is there a way to fix it?

Offline

#622 2011-09-26 16:35:54

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: luakit browser framework (almost with jQuery!)

TheImmortalPhoenix wrote:

I have a problem opening gmail and google+, i have the response "browser not supported"...is there a way to fix it?

you have two options:
1) Call Larry Page / Sergei Brin and tell them to stop being silly
2) Change your user agent so that Google thinks you're using Firefox


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#623 2011-09-26 17:37:57

TheImmortalPhoenix
Member
From: 127.0.0.1
Registered: 2011-08-13
Posts: 436

Re: luakit browser framework (almost with jQuery!)

Dieter@be wrote:
TheImmortalPhoenix wrote:

I have a problem opening gmail and google+, i have the response "browser not supported"...is there a way to fix it?

you have two options:
1) Call Larry Page / Sergei Brin and tell them to stop being silly
2) Change your user agent so that Google thinks you're using Firefox

A day i'll call them, but now how can i change user agent?

Offline

#624 2011-09-26 17:49:59

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: luakit browser framework (almost with jQuery!)

TheImmortalPhoenix wrote:

now how can i change user agent?

if you need to ask that, you are not luakit material.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#625 2011-09-27 15:11:47

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: luakit browser framework (almost with jQuery!)

TheImmortalPhoenix wrote:
Dieter@be wrote:
TheImmortalPhoenix wrote:

I have a problem opening gmail and google+, i have the response "browser not supported"...is there a way to fix it?

you have two options:
1) Call Larry Page / Sergei Brin and tell them to stop being silly
2) Change your user agent so that Google thinks you're using Firefox

A day i'll call them, but now how can i change user agent?

globals.useragent = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chromium/14.0.825.0"

Offline

Board footer

Powered by FluxBB