You are not logged in.

#626 2011-09-27 18:36:49

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

Re: luakit browser framework (almost with jQuery!)

xConStruct wrote:

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

doesn't work anymore after the latest updates of luakit-git. I'm not able to get this behaviour back, any help?

Offline

#627 2011-09-27 18:54:13

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

Re: luakit browser framework (almost with jQuery!)

Army wrote:

[fullscreen without statusbars] doesn't work anymore after the latest updates of luakit-git. I'm not able to get this behaviour back, any help?

Last updates changed a lot of the API functions, the win.fullscreen() / win.unfullscreen() functions are now a win.fullscreen boolean attribute - that should simplify your code a tiny bit, because we can drop our own variable. Try this (untested):

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

-- config/rc.lua
window.init_funcs.hide_tablist_fullscreen = function (w)
    w.tablist:add_signal("updated", function ()
        if w.win.fullscreen then w.tablist.widget:hide() end
    end)
end

Last edited by xConStruct (2011-09-27 18:56:57)

Offline

#628 2011-09-27 19:42:47

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

Re: luakit browser framework (almost with jQuery!)

Ok weird, it works like this

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

-- config/rc.lua
window.init_funcs.hide_tablist_fullscreen = function (w)
    w.tablist:add_signal("updated", function ()
        if w.win.fullscreen then w.tablist.widget:hide() end
    end)
end

with changed entries in if and else (sorry for this noob language).

Thanks for your help!

Offline

#629 2011-09-29 05:24:03

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

Re: luakit browser framework (almost with jQuery!)

Army wrote:

He guys, since luakit is very stable with the current most up to date versions of the dependencies in the repos, I once again activated the gnome-unstable repo to see if luakit also works fine with those newer versions of libwebkit (1.5.2-1), libsoup (2.35.90-1), glib2 (2.29.90-1) etc. It works, but it randomly crashes. Here's the output of a crash

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

(luakit:7058): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(luakit:7058): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(luakit:7058): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(luakit:7058): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(luakit:7058): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(luakit:7058): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
[1]    7058 segmentation fault  luakit

Looks like a glib2 issue right?

This is just a heads up, in case someone wants to try this repos as well. In case there's something that can be done in luakit to prevent those crashes, this information might be interesting.
And it's not supposed to be a bug report, since it's based on unstable software!

Now I'll downgrade again wink

Ok, now we have gnome 3.2 in [testing], which also got webkit 1.6.1 pulled in. Now those segfaults reappear. Does anybody know if this is luakit's fault or webkit's? I can test other webkit browsers later today, now I gotta go to school and teach a little wink

edit: I just checked, if it makes a difference if I use privoxy or not. Apparently there is a difference. So maybe this problem doesn't really exist. I'll test it.

edit2: Ok, these segfaults definitely only happen with privoxy as a proxy. I'll check polipo later to see if it's caused by proxys in general or just with privoxy. This sucks! Luakit needs a working adblock, quigybo's approach works here, but it needs some love.

Last edited by Army (2011-09-29 12:37:16)

Offline

#630 2011-10-02 14:57:57

PotatoesMaster
Member
From: France
Registered: 2010-08-26
Posts: 54

Re: luakit browser framework (almost with jQuery!)

Same "GLib-GObject" error message here, just after today updates. smile
I'm using polipo. Same thing, luakit runs fine without proxy.

Offline

#631 2011-10-03 17:39:58

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: luakit browser framework (almost with jQuery!)

Hey, just started trying out luakit -- couple of questions (sorry -- new to Lua and still trying to wrap my brain around the differences):
1. Which settings in theme.lua (or elsewhere) control the link hinting colors?
2. I'd like the link hints to appear as capital letters, and they do when I change them in rc.lua, but then the hints expect me to type them as capital letters as well. How can I change that (hints viewed as capitals, but typed as small letters)?

Thanks!
Scott

Offline

#632 2011-10-03 18:22:28

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

Re: luakit browser framework (almost with jQuery!)

This was posted here a couple of weeks ago. I'm too lazy to start searching for the post, so I'll just show you what I have in my themes.lua

-- hints theming
theme.follow = {}
theme.follow.focus_bg = "#00ff00";
theme.follow.normal_bg = "#ffff99";
theme.follow.opacity = 0.3;
theme.follow.border = "1px dotted #000000";
theme.follow.frame_border = "2px solid #880000";
theme.follow.tick_frame_bg = "#880000";
theme.follow.tick_fg = "#ffffff";
theme.follow.tick_bg = "#000000";
theme.follow.tick_border = "2px dashed #000000";
theme.follow.tick_opacity = 0.35;
theme.follow.tick_font = "9px terminus";
theme.follow.vert_offset = 0;
theme.follow.horiz_offset = 0;

Offline

#633 2011-10-03 18:36:32

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: luakit browser framework (almost with jQuery!)

Thanks, Army -- but your colors still don't cover the actual colors of the hint letters (fg and bg), unless I'm totally missing something. I even looked up all the colors you have there...none of them match what I'm seeing for hint colors!

Also, any idea about the capital letters issue?

Thanks!
Scott

Offline

#634 2011-10-03 20:07:34

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

Re: luakit browser framework (almost with jQuery!)

firecat53 wrote:

Thanks, Army -- but your colors still don't cover the actual colors of the hint letters (fg and bg), unless I'm totally missing something. I even looked up all the colors you have there...none of them match what I'm seeing for hint colors!

theme.follow.tick_fg and theme.follow.tick_bg should do the trick.

firecat53 wrote:

Also, any idea about the capital letters issue?

styles.upper() is the thing you're looking for. Here is an example:

local s = follow.styles
follow.style = s.upper(s.sort(s.reverse(s.charset("asdfqwerzxcv"))))

Offline

#635 2011-10-04 02:40:01

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: luakit browser framework (almost with jQuery!)

xConStruct wrote:
firecat53 wrote:

Thanks, Army -- but your colors still don't cover the actual colors of the hint letters (fg and bg), unless I'm totally missing something. I even looked up all the colors you have there...none of them match what I'm seeing for hint colors!

theme.follow.tick_fg and theme.follow.tick_bg should do the trick.

firecat53 wrote:

Also, any idea about the capital letters issue?

styles.upper() is the thing you're looking for. Here is an example:

local s = follow.styles
follow.style = s.upper(s.sort(s.reverse(s.charset("asdfqwerzxcv"))))

Ok, got it now...the colors looked different than I expected because of the opacity setting.

However, using the s.upper line gives this error:

/home/firecat53/.config/luakit/rc.lua:104: attempt to call field 'upper' (a nil value)
E: luakit: main:185: no windows spawned by rc file, exiting

Thanks,
Scott

Offline

#636 2011-10-04 03:21:37

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

Re: luakit browser framework (almost with jQuery!)

firecat53 wrote:

However, using the s.upper line gives this error:

/home/firecat53/.config/luakit/rc.lua:104: attempt to call field 'upper' (a nil value)
E: luakit: main:185: no windows spawned by rc file, exiting

Thanks,
Scott

Please check the `upper` function is in /usr/share/luakit/lib/follow/styles.lua if it is then please pastebin that section of your rc.lua and we'll try spot the error smile

Offline

#637 2011-10-04 04:05:12

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: luakit browser framework (almost with jQuery!)

There's no 'upper' in any of the /usr/share/luakit/lib/* files. Using luakit from [community], by the way, if that makes any difference. The only modification to the 'vanilla' rc.lua was to activate hinting and change the hinting keys. I did copy all the files from /etc/xdg/luakit into ~/.config/luakit.

Scott

rc.lua here just for completeness :-)

Last edited by firecat53 (2011-10-04 04:06:39)

Offline

#638 2011-10-04 18:48:38

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

Re: luakit browser framework (almost with jQuery!)

Oh yes, it's only in the development version. If you don't want to switch luakit versions, you could probably copy the function into your rc.lua or lib/follow/styles.lua

Offline

#639 2011-10-04 19:29:26

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: luakit browser framework (almost with jQuery!)

Ah, ok...I'll give that a try later...

Thanks,
Scott

Offline

#640 2011-10-04 20:06:15

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

Re: luakit browser framework (almost with jQuery!)

Luakit suddenly crashes on facebook (connected via https). I was searching for an artist's page, clicked on the search result and bäm it was gone. I also tried it without my custom configs, same issue. Tried it with jumanji, no problem there.

Can anybody reproduce this?

edit: Ok now I cannot reproduce it myself ... Facebook seems fucked up right now (kinda makes me grin big_smile ) It's still weird that jumanji didn't crash... Well, as soon as it happens again I'll call you back.

Last edited by Army (2011-10-04 20:11:24)

Offline

#641 2011-10-06 22:36:55

Vain
Member
Registered: 2008-10-19
Posts: 179
Website

Re: luakit browser framework (almost with jQuery!)

Hmmm, activating follow mode has become pretty slow. That is, I press “f” and it takes up to a few seconds until the labels show up. Has anybody else seen this? I’m using pretty much the default config (as far as follow is concerned).

Offline

#642 2011-10-07 06:25:17

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

Re: luakit browser framework (almost with jQuery!)

I've seen this too. Been thinking if it's caused by mistakes I did, but since you also have this issue, it might be because of luakit or libwebkit.

Offline

#643 2011-10-07 11:03:48

Vain
Member
Registered: 2008-10-19
Posts: 179
Website

Re: luakit browser framework (almost with jQuery!)

Okay, so it’s not my fault. smile And I don’t think it’s luakit’s fault, either. I went back to release 2011.07.22 which shows the same slow behaviour.

However, downgrading libwebkit from 1.6.1-1 to 1.4.3-1 appears to resolve the issue.

(I used www.isnichwahr.de as a test case. There’s a lot of links on that site and it takes 2 seconds on my machine to show all labels.)

Offline

#644 2011-10-07 11:29:09

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

Re: luakit browser framework (almost with jQuery!)

Is there a way to "unbind" keys? For example I wish to use "h" as the base key for 2-key commands (just like the way g is used - g-o-something, g-n-something) and I have to copy binds.lua to my home luakit folder and comment out the relevant line. When binds.lua gets updated I will have to do the same again, negating the advantage of userconf.lua.

Actually I think there are too many keystrokes dedicated to scrolling, tabs, history. The default should be a few and the rest can be added to userconf.lua. Anyway if there is unbind I can unbind what I don't want in userconf.lua so as to free up keystrokes for other commands.

Offline

#645 2011-10-07 12:38:21

DoctorSamulus
Member
Registered: 2010-11-04
Posts: 53

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?

If you append ?nobrowsercheck=true to the end of the gmail.com url it will let you access it with the normal luakit user agent.

Offline

#646 2011-10-07 13:05:10

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

Re: luakit browser framework (almost with jQuery!)

Army wrote:

This was posted here a couple of weeks ago. I'm too lazy to start searching for the post, so I'll just show you what I have in my themes.lua

-- hints theming
theme.follow = {}
theme.follow.focus_bg = "#00ff00";
theme.follow.normal_bg = "#ffff99";
theme.follow.opacity = 0.3;
theme.follow.border = "1px dotted #000000";
theme.follow.frame_border = "2px solid #880000";
theme.follow.tick_frame_bg = "#880000";
theme.follow.tick_fg = "#ffffff";
theme.follow.tick_bg = "#000000";
theme.follow.tick_border = "2px dashed #000000";
theme.follow.tick_opacity = 0.35;
theme.follow.tick_font = "9px terminus";
theme.follow.vert_offset = 0;
theme.follow.horiz_offset = 0;

did you mean theme.lua (instead of themeS.lua ?)
I put it in there, just before the `return theme` call.  But i see no change (in $XDG_CONF_HOME/luakit/theme.lua)
maybe it's because `lousy.theme.init(lousy.util.find_config("theme.lua"))` is executed before the `require "follow"` call.

So when I move the require "follow" upwards (above the theme init), I get:
/usr/share/luakit/lib/downloads.lua:78: attempt to index local 'window' (a nil value)
E: luakit: main:185: no windows spawned by rc file, exiting

If i move the theme init downwards (below the require "follow"), I get:
/usr/share/luakit/lib/proxy.lua:143: attempt to index upvalue 'theme' (a nil value)
making the luakit process hang.

Last edited by Dieter@be (2011-10-07 13:10:20)


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

Offline

#647 2011-10-07 15:31:29

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

Re: luakit browser framework (almost with jQuery!)

Stupid new libwebkit, this is really horrible, makes luakit totally unstable on some sites. Now the thing with facebook, which I mentioned earlier in this thread, happens again. Happens with all webkit browsers.

Dieter, yes I meant theme.lua of course! Stupid typo. It definitely makes a visible difference here.

Offline

#648 2011-10-07 16:34:10

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

Re: luakit browser framework (almost with jQuery!)

Army wrote:

Stupid new libwebkit, this is really horrible, makes luakit totally unstable on some sites. Now the thing with facebook, which I mentioned earlier in this thread, happens again. Happens with all webkit browsers.

Dieter, yes I meant theme.lua of course! Stupid typo. It definitely makes a visible difference here.

Army, have a look here. portix is probably right. Downgrade to last versions of lipsoup and libwebkit helped to remove this instability.

Last edited by jakob (2011-10-07 16:34:31)

Offline

#649 2011-10-07 22:40:14

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

Re: luakit browser framework (almost with jQuery!)

Well, WITH a proxy it's really horrible, then the browser really crashes all the time. But it's even less stable WITHOUT a proxy. Yes, I'll downgrade, definitely!

I was looking through the mailing lists of webkitgtk+ and in the release notes for 1.6.1 there's written, that gtk2 is no longer supported. My question: Is luakit prepared to do the switch to gtk3?

Last edited by Army (2011-10-07 22:41:08)

Offline

#650 2011-10-08 02:52:51

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

Re: luakit browser framework (almost with jQuery!)

Dieter@be wrote:
Army wrote:

This was posted here a couple of weeks ago. I'm too lazy to start searching for the post, so I'll just show you what I have in my themes.lua

-- hints theming
theme.follow = {}
theme.follow.focus_bg = "#00ff00";
theme.follow.normal_bg = "#ffff99";
theme.follow.opacity = 0.3;
theme.follow.border = "1px dotted #000000";
theme.follow.frame_border = "2px solid #880000";
theme.follow.tick_frame_bg = "#880000";
theme.follow.tick_fg = "#ffffff";
theme.follow.tick_bg = "#000000";
theme.follow.tick_border = "2px dashed #000000";
theme.follow.tick_opacity = 0.35;
theme.follow.tick_font = "9px terminus";
theme.follow.vert_offset = 0;
theme.follow.horiz_offset = 0;

did you mean theme.lua (instead of themeS.lua ?)
I put it in there, just before the `return theme` call.  But i see no change (in $XDG_CONF_HOME/luakit/theme.lua)
maybe it's because `lousy.theme.init(lousy.util.find_config("theme.lua"))` is executed before the `require "follow"` call.

So when I move the require "follow" upwards (above the theme init), I get:
/usr/share/luakit/lib/downloads.lua:78: attempt to index local 'window' (a nil value)
E: luakit: main:185: no windows spawned by rc file, exiting

If i move the theme init downwards (below the require "follow"), I get:
/usr/share/luakit/lib/proxy.lua:143: attempt to index upvalue 'theme' (a nil value)
making the luakit process hang.

You can't move the `require "follow"` above the "Optional user script loading" header becase it relies on the window, webview & binds libs.

Also pasting the above into my theme.lua works fine. Both in $XDG_CONFIG_HOME/luakit and /etc/xdg/luakit/ and locally in the repo.

Maybe pastebin your theme.lua and the relevant parts of your rc.lua and I'll try spot the problem.

Offline

Board footer

Powered by FluxBB