You are not logged in.

#476 2011-08-10 12:39:16

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

Re: luakit browser framework (almost with jQuery!)

Ok you are right. I thought that everything related to dbus is fixed by starting the dbus daemon. I didn't use your code now, but I start i3 with

exec dbus-launch i3

and now it's fine. It's the first time I actually had a problem related to dbus, so I really lack experience in that wink

Thanks for pointing that out.

Offline

#477 2011-08-12 03:31:32

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

Re: luakit browser framework (almost with jQuery!)

hey, just started using luakit, and i wanted to say thanks to mason for developing such a useful browser!


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#478 2011-08-13 01:58:31

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

The other day I downloaded a fairly large file and I realize that the lack of information regarding the download is really bothersome. Is there any script that will give some indication as to speed and progress of download? Even a download script that opens a console with wget would be better than blindly waiting for the download to complete. I thought at the very least I could check if the *.part file has been moved to the actual file name so I know the download is complete but no, there was no *.part file and I had to check the actual size of the download file to see progress. In the end I had to cancel the download, but don't know how to do that. Finally had to quit luakit and say yes to the warning about the download.

Offline

#479 2011-08-13 02:05:44

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: luakit browser framework (almost with jQuery!)

stryder wrote:

The other day I downloaded a fairly large file and I realize that the lack of information regarding the download is really bothersome. Is there any script that will give some indication as to speed and progress of download? Even a download script that opens a console with wget would be better than blindly waiting for the download to complete. I thought at the very least I could check if the *.part file has been moved to the actual file name so I know the download is complete but no, there was no *.part file and I had to check the actual size of the download file to see progress. In the end I had to cancel the download, but don't know how to do that. Finally had to quit luakit and say yes to the warning about the download.

Open a tab with luakit://downloads which is a the chrome download page. This gives some indication of progress as well as restart/cancel facilities.

Offline

#480 2011-08-13 02:11:31

r6
Member
From: Melbourne
Registered: 2008-07-02
Posts: 156

Re: luakit browser framework (almost with jQuery!)

You can also type :downloads

Offline

#481 2011-08-13 02:59:19

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

Thanks guys... so glad that it is all already there. smile I just created a quickmark for luakit://downloads. Really wish there is 1 place to go to for such documentation. Going through 20 pages of posts looking for info is such a pain. (and hopefully someone can tell me that it is all somewhere already too ... )

Offline

#482 2011-08-13 05:44:57

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

Re: luakit browser framework (almost with jQuery!)

Hey Guys,

Just letting you know I did a talk about luakit for my local Linux User Group and the video is now up online if you would like to watch it. The whole event was fairly informal (didn't even have a projector) and the audio dies for a few minutes early in (still checking if that's something that can be fixed) but otherwise it came out well.

You can download it from here:

2011-08-09-Luakit-Mason.mp4 (98MB, 1hr 7mins)

And the slides/examples are online at:

https://github.com/mason-larobina/luaki … aster/plug

Enjoy!, now back to hacking on luakit.

Edit: And this was my first bit of public speaking so go easy wink

Last edited by mason.larobina (2011-08-13 05:47:55)

Offline

#483 2011-08-13 10:12:21

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

Re: luakit browser framework (almost with jQuery!)

r6 wrote:

You can also type :downloads

Or even gd or gD

Offline

#484 2011-08-13 13:42:34

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

Re: luakit browser framework (almost with jQuery!)

After the latest update of glib-networking, luakit crashes, as soon as I want to open a webpage, with

% luakit

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

luakit: symbol lookup error: /usr/lib/gio/modules/libgiognutls.so: undefined symbol: gnutls_certificate_verify_peers

The update was a small one

# tail -n 100 /var/log/pacman.log|grep glib
[2011-08-13 15:15] upgraded glib-networking (2.28.7-1 -> 2.28.7-3)

Should I post a bugreport?
edit: Why didn't I look into the bugtracker first?? https://bugs.archlinux.org/task/25550 I think it'll be solved real soon.

Last edited by Army (2011-08-13 13:45:23)

Offline

#485 2011-08-16 06:14:58

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

The first time I went to wiki.archlinux.org I had a slow connection and the page loaded without css. Now every time I go to the wiki I have pages without css. This is the only place I have this problem. The forum, etc. loads fine. I deleted history.db hoping this will cause luakit to load fresh pages but the problem persists.

Googlemail only loads in html (gets stuck loading otherwise) and yahoomail won't even let me near it. Even the link to the older yahoomail program won't work.

I am using archlinuxppc on ibook G4. Firefox has no such problems.

These are minor problems - one main reason why I decided to install archlinuxppc was because I want to use luakit on the ibook. But if someone has an idea what I can do please let me know. (libwebkit is 1.2.7-1 only BTW, and luakit is 20110815-1)

Offline

#486 2011-08-16 11:10:00

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

Re: luakit browser framework (almost with jQuery!)

Opening the site wiki.archlinux.org also loads data from cloudfront.net. Is it possible that this data is blocked in luakit? E.g. do you use privoxy with luakit but not with firefox?

Offline

#487 2011-08-16 13:27:14

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

No, no proxy used. And I don't have the problem on other machines.

Offline

#488 2011-08-16 16:31:52

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

Re: luakit browser framework (almost with jQuery!)

The next thing I'd try is to run a default luakit (default = with no custom ~/.config/luakit directory, maybe even cleaned ~/.local/share/luakit) and try it again. If it then still doesn't work ... no idea.

Offline

#489 2011-08-16 17:40:06

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: luakit browser framework (almost with jQuery!)

stryder wrote:

Now every time I go to the wiki I have pages without css.

Have you tried viewing the source of the wiki page and clicking on the stylesheet URLs to see if you get an error that may help us troubleshoot more poignantly?

Also, I assume no errors are reported when launched from a terminal?

Offline

#490 2011-08-17 02:31:12

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

@Army - yeah, I'm just as baffled. I think it is due to the old libwebkit that I am using under ppc. Have tried fresh luakit in .config and .local/share and even fresh webkit in .local/share. Same results. But as I said, it is only the wiki and I can still read it so not a big deal.

@joshdmiller - I compared the sources for archlinux forum and wiki and the main difference in the head section is that there is a javascript script inserted between the 3 css lines. There is no other reason why I cannot download the stylesheet URLs - they are the same relative links in both. And no, no errors from terminal. I am suspecting some deficiencies - as I said, cannot load gmail except in the html mode, google reader too. Perhaps in the javascript implementation in this much older libwebkit that is available for ppc. No issues in firefox.

Otherwise, luakit is very usable. smile

Offline

#491 2011-08-17 05:33:36

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: luakit browser framework (almost with jQuery!)

stryder wrote:

(libwebkit is 1.2.7-1 only BTW, and luakit is 20110815-1)

Are you able to compile libwebkit-git from the AUR on your platform to see if the age of libwebkit is indeed the problem?

Offline

#492 2011-08-17 06:09:32

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: luakit browser framework (almost with jQuery!)

joshdmiller wrote:
stryder wrote:

(libwebkit is 1.2.7-1 only BTW, and luakit is 20110815-1)

Are you able to compile libwebkit-git from the AUR on your platform to see if the age of libwebkit is indeed the problem?

Probably... but this is a slow machine and I fear the time it will take to do this, just to find out if it causes this problem. Compiling geany for example took some time and it is a much smaller program. Perhaps one of these days when I feel the need... wink For now it is just a puzzle, especially since I can still view all the contents of wiki, just not in a nice format.

Offline

#493 2011-08-17 13:23:50

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

Re: luakit browser framework (almost with jQuery!)

I'd like to make the fullscreen mode more fullscreen. The way it goes fullscreen now is also achievable with the window manager. What I'd like is both bars (tab and menu(?)) to disappear when luakit goes fullscreen by hitting F11. How can this be done?

Offline

#494 2011-08-17 16:47:29

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

Re: luakit browser framework (almost with jQuery!)

You could try this one:

In config/binds.lua overwrite your fullscreen-binding (around line 157):

    -- Fullscreen
    key({},          "F11",         function (w)
                                        w.fullscreen = not w.fullscreen
                                        if w.fullscreen then
                                            w.win:fullscreen()
                                            w.sbar.ebox:hide()
                                            w.tablist.widget:hide()
                                        else
                                            w.win:unfullscreen()
                                            w.sbar.ebox:show()
                                            w.tablist.widget:show()
                                        end
                                    end),

Then you still need to prevent the tablist from showing again after an update, so place this somewhere in your config (for example, in config/rc.lua at the bottom):
EDIT: Make sure it is loaded before the session handling code in rc.lua around line 137.

window.init_funcs.hide_tablist_fullscreen = function (w)
    w.tablist:add_signal("updated", function ()
        if w.fullscreen then w.tablist.widget:hide() end
    end)
end

Last edited by xConStruct (2011-08-17 17:53:31)

Offline

#495 2011-08-17 17:33:00

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

Re: luakit browser framework (almost with jQuery!)

Ok, I did it as you explained. It works, but as soon as a webpage is being updated (either automatically, r or R, tab change), the tablist shows up again. I guess that's what you wanted to avoid with the entry for the rc.lua, right? So that doesn't work. Does this work for you?

Last edited by Army (2011-08-17 17:36:20)

Offline

#496 2011-08-17 17:48:21

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

Re: luakit browser framework (almost with jQuery!)

Oh, I tested it in config/binds.lua and thought the placement wouldn't matter. If you place it in rc.lua, you have to put it above the session-handling code around line 137, otherwise the main window is initialized before we add our custom function to the init-list.

Offline

#497 2011-08-17 18:45:30

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

Re: luakit browser framework (almost with jQuery!)

Nice, thanks a lot!! I think this is something for the wiki, I'll take a few minutes and write an article.
edit: Doesn't work right now. Mason, is there something wrong with the login on luakit.org?

Last edited by Army (2011-08-17 18:52:41)

Offline

#498 2011-08-18 06:58:27

djjcast
Member
Registered: 2010-07-31
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Hey all, I came across a couple of configuration options that weren't completely obvious to implement/set so I thought I should document them here...

1. Keybinding (,z in normal mode) to toggle the size of an image:

-- binds.lua

-- global variable
local toggle_image_size_js = [=[
// Toggles the size of an image by sending it a mouse click event.
if(document.images.length == 1) {
    var img = document.getElementsByTagName('img')[0];
    var mouseEvent = document.createEvent("MouseEvent");
    mouseEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
    img.dispatchEvent(mouseEvent);
}
]=]

-- add_binds("normal", {...}) keybinding
buf(",z", function (w) w:eval_js(toggle_image_size_js, "toggle_image_size_js") end),

2. Hints theming:

-- theme.lua

-- insert before "return theme" line
theme.follow = {}
theme.follow.focus_bg = "#000000"
theme.follow.normal_bg = "#ffffff"
theme.follow.opacity = "0.2"
theme.follow.tick_fg = "#000000"
theme.follow.tick_bg = "#ffffff"
theme.follow.tick_opacity = "0.8"
theme.follow.tick_font = "bold 16px monospace"

Last edited by djjcast (2011-08-20 03:25:30)

Offline

#499 2011-08-18 07:30:44

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

Re: luakit browser framework (almost with jQuery!)

Great stuff!!!

Last edited by Army (2011-08-18 07:36:08)

Offline

#500 2011-08-18 08:45:26

djjcast
Member
Registered: 2010-07-31
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Thanks, here's the complete list of configuration variables you can use to theme hints:

-- lib/follow/init.lua, line 449 (Git repository)

local default_theme = {
    focus_bg      = "#00ff00";
    normal_bg     = "#ffff99";
    opacity       = 0.3;
    border        = "1px dotted #000000";
    frame_border  = "2px solid #880000";
    tick_frame_bg = "#880000";
    tick_fg       = "#ffffff";
    tick_bg       = "#000088";
    tick_border   = "2px dashed #000000";
    tick_opacity  = 0.4;
    tick_font     = "11px monospace bold";
    vert_offset   = 0;
    horiz_offset  = -10;
}

Offline

Board footer

Powered by FluxBB