You are not logged in.

#276 2011-04-03 09:00:28

Josko
Member
Registered: 2011-02-24
Posts: 9

Re: luakit browser framework (almost with jQuery!)

Hello,

just've installed luakit-git from the AUR and I want to say thanks for this awesome program. Writing my first post from it smile I hope you'll continue to develop it for a long time.

Cheers.

Offline

#277 2011-04-03 16:59:30

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

Re: luakit browser framework (almost with jQuery!)

New luakit release 2011.04.04

Check out the changelog here:

  http://luakit.org/news/5

Or browse the luakit-2011.04.04 source code here:

  https://github.com/mason-larobina/luaki … 2011.04.04

Or download the luakit-2011.04.04 source tarball from here:

  https://github.com/mason-larobina/luaki … 2011.04.04

Enjoy guys.

Offline

#278 2011-04-04 19:04:54

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: luakit browser framework (almost with jQuery!)

Awesome! Thank you so very much smile

Finally history support.

edit: In globals.lua: The different settings of domain_props should be documented by http://webkitgtk.org/reference/webkitgt … tings.html. This URL no longer exists and there doesn't seem to be anything that matches the functionality of WebKitWebSettings in the reference manual. That is strange.

Last edited by essence-of-foo (2011-04-05 06:41:18)

Offline

#279 2011-04-05 19:30:05

mattfitz
Member
Registered: 2008-10-27
Posts: 27

Re: luakit browser framework (almost with jQuery!)

Edit: Now running a fresh install of Arch, and no longer experiencing this issue.

Firstly, I have to say that luakit has become my favourite browser by far.

However, I am experiencing some extremely long load times on a fair number of websites. http://english.aljazeera.net/  for example takes a good 15-20 seconds to load, while midori or uzbl are mostly rendered instantaneously, and totally finished in 5 second tops. Does anybody else have this issue?

Last edited by mattfitz (2011-04-07 03:05:35)

Offline

#280 2011-04-05 19:57:28

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

Re: luakit browser framework (almost with jQuery!)

Right now I'm back to firefox with pentadactyl, because luakit's memory usage is completely fucked up. I think it's caused by webkit, of course. Does anybody else have that problem? The problem is, that when I load a page and close it again, the memory usage stays the same. So while I'm browsing, luakit gets fatter constantly. After loading about 3 or 4 average websites, luakit uses more ram than firefox. So in this case firefox is better for me. I only have 512mb of ram, so this is a big matter. I also tried the newer version of webkit from [gnome-unstable], same issue.

Offline

#281 2011-04-06 06:46:16

Ipozya
Member
Registered: 2011-01-20
Posts: 52

Re: luakit browser framework (almost with jQuery!)

How can I change the browser style?  I have tried the following: I downloaded nightshift.css, created folder "styles" in ~/.config/luakit, placed the .css there, and then changed globals.lua to read

["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/nightshift.css",

What is the correct method? I am probably placing the file in the wrong place, instead of the designated luakit.data_dir, but I am not sure where this is referring to.  Thank you very much.

Edit: Army - I am not able to replicate this.  I opened up luakit with homepage and checked ram usage.  I then opened up ~10 tabs, including several flash-heavy ones, and then watched top as I closed tabs one by one.  It decreased each time; in the end with only homepage up again, ram-usage was a little bit higher than initially but not by much (and far less than with the 10 pages open).

Last edited by Ipozya (2011-04-06 06:59:26)

Offline

#282 2011-04-06 11:42:43

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

Re: luakit browser framework (almost with jQuery!)

Ipozya wrote:

How can I change the browser style?  I have tried the following: I downloaded nightshift.css, created folder "styles" in ~/.config/luakit, placed the .css there, and then changed globals.lua to read

["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/nightshift.css",

What is the correct method? I am probably placing the file in the wrong place, instead of the designated luakit.data_dir, but I am not sure where this is referring to.  Thank you very much.

An easy way to find where luakit.data_dir points to is to launch luakit from a terminal and run `:lua print(luakit.data_dir)`.

Your problem is that luakit.data_dir points to $XDG_DATA_DIR/luakit/ (defaults to ~/.local/share/luakit) and luakit.config_dir points to $XDG_CONFIG_HOME/luakit (defaults to ~/.config/luakit) so you've accidentally placed your styles folder in the wrong directory.

Offline

#283 2011-04-07 02:39:10

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: luakit browser framework (almost with jQuery!)

Army wrote:

Right now I'm back to firefox with pentadactyl, because luakit's memory usage is completely fucked up. I think it's caused by webkit, of course. Does anybody else have that problem? The problem is, that when I load a page and close it again, the memory usage stays the same. So while I'm browsing, luakit gets fatter constantly. After loading about 3 or 4 average websites, luakit uses more ram than firefox. So in this case firefox is better for me. I only have 512mb of ram, so this is a big matter. I also tried the newer version of webkit from [gnome-unstable], same issue.

For me, it's the exact opposite. Luakit stays slim while I have to run sqlite3 ~/.mozilla/firefox/*places.sqlite VACCUM every once in a while.

Offline

#284 2011-04-07 06:02:23

kli
Member
Registered: 2011-04-03
Posts: 7

Re: luakit browser framework (almost with jQuery!)

mason.larobina wrote:
Ipozya wrote:

How can I change the browser style?  I have tried the following: I downloaded nightshift.css, created folder "styles" in ~/.config/luakit, placed the .css there, and then changed globals.lua to read

["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/nightshift.css",

What is the correct method? I am probably placing the file in the wrong place, instead of the designated luakit.data_dir, but I am not sure where this is referring to.  Thank you very much.

An easy way to find where luakit.data_dir points to is to launch luakit from a terminal and run `:lua print(luakit.data_dir)`.

Your problem is that luakit.data_dir points to $XDG_DATA_DIR/luakit/ (defaults to ~/.local/share/luakit) and luakit.config_dir points to $XDG_CONFIG_HOME/luakit (defaults to ~/.config/luakit) so you've accidentally placed your styles folder in the wrong directory.

@mason 

Sorry but user stylesheets does not work. I placed mystyle.css in the correct path, but no effect. The style works well in Midori.
I have the lateset Luakit from the Debian experimental repo.

Offline

#285 2011-04-09 13:49:59

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

Re: luakit browser framework (almost with jQuery!)

Army wrote:

Right now I'm back to firefox with pentadactyl, because luakit's memory usage is completely fucked up. I think it's caused by webkit, of course. Does anybody else have that problem? The problem is, that when I load a page and close it again, the memory usage stays the same. So while I'm browsing, luakit gets fatter constantly. After loading about 3 or 4 average websites, luakit uses more ram than firefox. So in this case firefox is better for me. I only have 512mb of ram, so this is a big matter. I also tried the newer version of webkit from [gnome-unstable], same issue.

We get inherit (like other webkit-gtk browsers) all the memory and performance issues from webkit-gtk, gtk and libsoup so sadly most of these problems are out of our immediate hands.

But I know Lua is doing the right thing. After opening 24 tabs (8 from gmail, 8 github and 8 reddit) I wanted to find the total memory used by Lua so I ran a few sweeps of the garbage collector (to get a true reading) with the following command:

:lua collectgarbage("collect")

Then used this command to print the total memory used by Lua:

:lua w:set_prompt(string.format("Lua mem total: %.2f KB", collectgarbage("count")))

And I see that I'm only using ~600KB (and as high as 3MB before manually collecting any garbage).

After opening a new luakit instance and opening 100 github uris and a few more collects I see a total lua usage of 920KB.

I've only just started doing this now so I don't have any idea what the lua usage is like over hours/days of usage.

Also have a read of http://virtualthreads.blogspot.com/2006 … linux.html this explains how meaningless the VIRT, RES & SHR fields are in top/htop to find a programs true memory usage.

I've also added cookie whitelisting/blacklisting support. Have a look at the commit for more instructions:

https://github.com/mason-larobina/luaki … abbaff573e

Or check out the branch:

https://github.com/mason-larobina/luaki … -filtering

It still needs more (any) testing before I do anything with it. I still don't know if there is enough justification for the added complexity (albeit small) of filtering cookies by path and name (as well as domain).

It is very useful for blocking google analytics cookies with the pattern `n__utm*` from all domains/paths.

Last edited by mason.larobina (2011-04-09 13:52:14)

Offline

#286 2011-04-09 14:10:13

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

Re: luakit browser framework (almost with jQuery!)

r6 wrote:

Mason, sometimes links are opening in a new window instead of a new tab. eg. if I click a link on Reddit (with the mouse or F), it seems to randomly open either a new tab or a new window. "Open Link in New Window" from the context menu seems to always open in a tab, though.

Sounds like you should play with the "new-window-decision" signal (look at where it is used in webview.lua).

To always open new windows in tabs add the following to your rc.lua (anywhere after the `require "webview"` line):

webview.init_funcs.window_decision = function (view, w)
    view:add_signal("new-window-decision", function (v, uri, reason)
        w:new_tab(uri)
        return true
    end)
end

Offline

#287 2011-04-09 14:13:10

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

Re: luakit browser framework (almost with jQuery!)

kli wrote:
mason.larobina wrote:
Ipozya wrote:

How can I change the browser style?  I have tried the following: I downloaded nightshift.css, created folder "styles" in ~/.config/luakit, placed the .css there, and then changed globals.lua to read

["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/nightshift.css",

What is the correct method? I am probably placing the file in the wrong place, instead of the designated luakit.data_dir, but I am not sure where this is referring to.  Thank you very much.

An easy way to find where luakit.data_dir points to is to launch luakit from a terminal and run `:lua print(luakit.data_dir)`.

Your problem is that luakit.data_dir points to $XDG_DATA_DIR/luakit/ (defaults to ~/.local/share/luakit) and luakit.config_dir points to $XDG_CONFIG_HOME/luakit (defaults to ~/.config/luakit) so you've accidentally placed your styles folder in the wrong directory.

@mason 

Sorry but user stylesheets does not work. I placed mystyle.css in the correct path, but no effect. The style works well in Midori.
I have the lateset Luakit from the Debian experimental repo.

Just checking: have you un-commented the domain properties table?

Offline

#288 2011-04-09 14:33:19

kli
Member
Registered: 2011-04-03
Posts: 7

Re: luakit browser framework (almost with jQuery!)

Just for making sure , globals.lua looks like this:

-- See http://webkitgtk.org/reference/webkitgt … tings.html
domain_props = { [[
    ["all"] = {
        ["enable-scripts"]          = true,
        ["enable-plugins"]          = true,
        ["enable-private-browsing"] = false,
        ["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/gen.css",

etc..

The stylesheet is located in /usr/share/luakit/lib/styles.
What have I did wrong ? Thank you for your help.

Offline

#289 2011-04-09 14:38:21

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

Re: luakit browser framework (almost with jQuery!)

kli wrote:

Just for making sure , globals.lua looks like this:

-- See http://webkitgtk.org/reference/webkitgt … tings.html
domain_props = { [[
    ["all"] = {
        ["enable-scripts"]          = true,
        ["enable-plugins"]          = true,
        ["enable-private-browsing"] = false,
        ["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/gen.css",

etc..

The stylesheet is located in /usr/share/luakit/lib/styles.
What have I did wrong ? Thank you for your help.

In Lua --[[ and ]] are used for multi-line comments and [[, ]] are used for multi-line strings. You've un-commented the domain props but left them in a large string. Remove the [[, ]]'s smile

Offline

#290 2011-04-09 17:33:44

kli
Member
Registered: 2011-04-03
Posts: 7

Re: luakit browser framework (almost with jQuery!)

@mason

Uncommented , as you suggested, but user.css does not work. The code must be correct, stolen from a Safari forum.
User.js works flawlessly, so I use them.

One more question, please.
The method to install Opera-style quick-dial worked fine in the previous versions.  In the latest version of Luakit something must have been changed, as I red in the changelog. Could you please update the howto ?

Thank you for your work, I simply love Luakit. Great browser :-)

Offline

#291 2011-04-09 22:28:38

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

Re: luakit browser framework (almost with jQuery!)

kli wrote:

@mason

Uncommented , as you suggested, but user.css does not work. The code must be correct, stolen from a Safari forum.
User.js works flawlessly, so I use them.

Very weird, can you open luakit in a terminal and run `:lua print(luakit.data_dir)` to see that it points to the correct location (should be ~/.local/share/luakit).

kli wrote:

One more question, please.
The method to install Opera-style quick-dial worked fine in the previous versions.  In the latest version of Luakit something must have been changed, as I red in the changelog. Could you please update the howto ?

Thank you for your work, I simply love Luakit. Great browser :-)

I've updated the script at http://luakit.org/projects/luakit/wiki/ … ike_chrome but I don't have the required tools installed to test it. Can you try it out for me?

Last edited by mason.larobina (2011-04-09 22:29:24)

Offline

#292 2011-04-10 04:41:49

moneylcj
Member
Registered: 2011-04-07
Posts: 14

Re: luakit browser framework (almost with jQuery!)

1. "Alternative Characters for Following Hints" on luakit.org can't work now.
     luakit version 2011.04.04-1
    is there a new solution?

2. if i can set ”ssh -D 7070 -Nf example.org“ as proxy, if can, how do it.

Offline

#293 2011-04-10 10:23:47

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

Re: luakit browser framework (almost with jQuery!)

moneylcj wrote:

1. "Alternative Characters for Following Hints" on luakit.org can't work now.
     luakit version 2011.04.04-1
    is there a new solution?

Are you talking about using characters as numbers on the follow labels? (Are you aware that the following script already supports partial link name matching?)

moneylcj wrote:

2. if i can set ”ssh -D 7070 -Nf example.org“ as proxy, if can, how do it.

I believe that creates a SOCKS4/5 proxy which is currently unsupported by libsoup as a proxy protocol. Privoxy may allow you to redirect all traffic through a SOCKS proxy.

Offline

#294 2011-04-10 12:37:34

moneylcj
Member
Registered: 2011-04-07
Posts: 14

Re: luakit browser framework (almost with jQuery!)

mason.larobina wrote:

Are you talking about using characters as numbers on the follow labels? (Are you aware that the following script already supports partial link name matching?)

thank you for replying

yes, using characters instead numbers as the follow labels is what i mean. i am chinese, partial link name matching has no function for chinese web page.

Offline

#295 2011-04-10 15:40:08

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: luakit browser framework (almost with jQuery!)

Is it possible to set luakit to save the current session every time instead of only by ZZ, even if it's closed by the window manager?

Offline

#296 2011-04-10 16:03:36

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

Re: luakit browser framework (almost with jQuery!)

moneylcj wrote:
mason.larobina wrote:

Are you talking about using characters as numbers on the follow labels? (Are you aware that the following script already supports partial link name matching?)

thank you for replying

yes, using characters instead numbers as the follow labels is what i mean. i am chinese, partial link name matching has no function for chinese web page.

Thats a valid enough usecase to have a character label function included in the default following script, I'll chase up karottenreibe to help us write one.

bratmaxe wrote:

Is it possible to set luakit to save the current session every time instead of only by ZZ, even if it's closed by the window manager?

Yeah place a session.save() at the top of the window.methods.close_win function. You can do this easily with the following in your rc.lua:

local close_win = window.methods.close_win
window.methods.close_win = function (w, ...)
    session.save{w}
    close_win(w, ...)
end

This replaces the old close_win function with a wrapper which calls session.close() before the window close. If you want to save the session for all open windows have a look at how the window restart method does it.

Last edited by mason.larobina (2011-04-10 16:05:41)

Offline

#297 2011-04-11 11:52:02

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

Re: luakit browser framework (almost with jQuery!)

mason.larobina wrote:

I wanted to find the total memory used by Lua so I ran a few sweeps of the garbage collector (to get a true reading) with the following command:

:lua collectgarbage("collect")

maybe luakit should do this automatically, periodically?


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

Offline

#298 2011-04-11 12:42:28

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

Re: luakit browser framework (almost with jQuery!)

Dieter@be wrote:
mason.larobina wrote:

I wanted to find the total memory used by Lua so I ran a few sweeps of the garbage collector (to get a true reading) with the following command:

:lua collectgarbage("collect")

maybe luakit should do this automatically, periodically?

Lua does this preiodically at some reasonable rate, I was only doing it out of interest (we are only talking about a few MB here).

Have a read of http://www.lua.org/manual/5.1/manual.html#2.10

Also stay tuned, I just found a serious memleak in the cookie loading code, I'll push commit which fixes it soon (I'm just checking for others now) then a release revision to replace 2011.04.04.

Offline

#299 2011-04-12 17:12:06

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: luakit browser framework (almost with jQuery!)

Thank you very much for your reply mason.larobina, works perfectly.

Just one more general question (not only affecting luakit). I had to realize that some SSL protected sites like the archwiki and github fail to load the page design, so only the text is displayed. This seems to affect all webkit browsers except chromium. I found some threads here in the forum pointing out that this has to do with some "rc4" encryption, which is probably stated as unsecure by webkit. Is there any workaround availible yet to load those content anyway?

Last edited by bratmaxe (2011-04-12 17:33:36)

Offline

#300 2011-04-12 17:30:31

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

Re: luakit browser framework (almost with jQuery!)

I have a problem: sometimes the graphical menu (the menu come with right-click) make luakit chrash and block the wm (I use Awesome)

The only way is to kill luakit from tty

Offline

Board footer

Powered by FluxBB