You are not logged in.

#576 2011-09-14 11:36:21

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

Re: luakit browser framework (almost with jQuery!)

xConStruct wrote:

Well, CSS does not support variables and mixins - the example on the page is SCSS. He wrote his main site with SCSS, too, which gets compiled and compressed into normal CSS (per build script) before going live, so that it works without JavaScript (if you open the CSS file referenced in the source code, you'll notice it's minified).

I've compiled the SCSS to regular CSS for you: https://gist.github.com/1215094

thanks but how did you do it? i would like to be able to do it myself too smile


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

Offline

#577 2011-09-14 15:01:41

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: luakit browser framework (almost with jQuery!)

Hey guys, I want when I right click a link and select "open link in new window" the new tab should open in the background. It should not switch to that tab. In other words I want the same behavior I get when I use follow.

@Dieter@be: I don't always compile scss, but when I do I use ruby.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#578 2011-09-15 15:57:41

Gooru
Member
From: Poland
Registered: 2010-08-25
Posts: 53

Re: luakit browser framework (almost with jQuery!)

It seems like there is another bug I may have encountered. Here it is http://pastebin.com/EwSpDjmy
Does it help? Or should I put it some other way?

Offline

#579 2011-09-15 20:51:52

bbtrb
Member
Registered: 2010-08-12
Posts: 12

Re: luakit browser framework (almost with jQuery!)

Hi guys, I've looked through the whole thread, but nobody mentioned the following problem: Google Reader has vi-like key bindings and they do not work with luakit. Has anyone a solution?

Otherwise, keep up the great work, luakit is the bes lightweight browser out there.

Offline

#580 2011-09-15 22:04:45

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

Re: luakit browser framework (almost with jQuery!)

bbtrb wrote:

Hi guys, I've looked through the whole thread, but nobody mentioned the following problem: Google Reader has vi-like key bindings and they do not work with luakit. Has anyone a solution?

You could enter insert mode - or better, passthrough mode (Ctrl + z), so that all keys are directly passed to the website until you hit Esc.

Offline

#581 2011-09-15 22:48:49

bbtrb
Member
Registered: 2010-08-12
Posts: 12

Re: luakit browser framework (almost with jQuery!)

Wow, now I'm completely sold. Thank you!

Now that I know what to look for, it is pretty obvious from the configs, that this mode exists.

Offline

#582 2011-09-16 15:29:58

chris427
Member
Registered: 2011-06-03
Posts: 18

Re: luakit browser framework (almost with jQuery!)

Does anyone know how to use letters instead of numbers for following? I've tried altering /usr/share/luakit/lib/follow/style.lua to use letters but instead of the letters being sequential (01, 02, 03, or a, b, c, for example) they seem random and typing the letters to follow the link follows a different one. Any help would be greatly appreciated.


We are all watched over by machines of loving grace.

Offline

#583 2011-09-16 15:53:20

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

Re: luakit browser framework (almost with jQuery!)

chris427 wrote:

Does anyone know how to use letters instead of numbers for following? I've tried altering /usr/share/luakit/lib/follow/style.lua to use letters but instead of the letters being sequential (01, 02, 03, or a, b, c, for example) they seem random and typing the letters to follow the link follows a different one. Any help would be greatly appreciated.

You'll want to set them in config/rc.lua, there's also an example given. Uncomment the code lines and modify the charset to your liking.

-- To use a custom character set for the follow hint labels un-comment and
-- modify the following:
--local s = follow.styles
--follow.style = s.sort(s.reverse(s.charset("asdfqwerzxcv"))) -- I'm a lefty

The default number-based one is defined in lib/follow/init.lua:

style = styles.sort(styles.reverse(styles.numbers_and_labels()))

Offline

#584 2011-09-16 16:05:22

chris427
Member
Registered: 2011-06-03
Posts: 18

Re: luakit browser framework (almost with jQuery!)

xConStruct wrote:
chris427 wrote:

Does anyone know how to use letters instead of numbers for following? I've tried altering /usr/share/luakit/lib/follow/style.lua to use letters but instead of the letters being sequential (01, 02, 03, or a, b, c, for example) they seem random and typing the letters to follow the link follows a different one. Any help would be greatly appreciated.

You'll want to set them in config/rc.lua, there's also an example given. Uncomment the code lines and modify the charset to your liking.

-- To use a custom character set for the follow hint labels un-comment and
-- modify the following:
--local s = follow.styles
--follow.style = s.sort(s.reverse(s.charset("asdfqwerzxcv"))) -- I'm a lefty

The default number-based one is defined in lib/follow/init.lua:

style = styles.sort(styles.reverse(styles.numbers_and_labels()))

Thank you, I should have probably looked through luakit's rc.lua a bit better (or learn lua) tongue
Thanks again xConStruct smile


We are all watched over by machines of loving grace.

Offline

#585 2011-09-18 10:04:23

innn
Member
Registered: 2010-10-12
Posts: 96

Re: luakit browser framework (almost with jQuery!)

hello, does anyone know why I get notrust on any https site , then half a minute later on that page I get trust, is that normal behaviour or it there something I am required to configure?
also, the gmail page stays notrust no matter what.

Last edited by innn (2011-09-18 10:04:43)

Offline

#586 2011-09-18 12:02:43

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: luakit browser framework (almost with jQuery!)

talking about https, is there a way to force pages to use https? similar to the KBS enforcer extension

Offline

#587 2011-09-18 12:49:48

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

Re: luakit browser framework (almost with jQuery!)

@el mariachi, in theory this is a starting point
http://lists.debian.org/debian-user/201 … 00086.html
This works with all browsers except webkit browsers like luakit, which segfault because of libsoup. It definitely works in Chromium, which I tested on aur.archlinux.org
edit:
Here's the output I get with libsoup from [extra]

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

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


(luakit:27376): libsoup-CRITICAL **: soup_message_io_pause: assertion `io != NULL' failed

(luakit:27376): libsoup-CRITICAL **: soup_message_io_unpause: assertion `io != NULL' failed
[1]    27376 segmentation fault  luakit aur.archlinux.org

With the newer version of libsoup from the [gnome-unstable] repo it behaves a little bit different. The site is loaded with https, but luakit still segfaults with this output

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

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


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

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

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

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

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

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

libsoup is just f***ed up!

Last edited by Army (2011-09-18 13:10:32)

Offline

#588 2011-09-18 14:22:42

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

Re: luakit browser framework (almost with jQuery!)

@enricostn:
I've got spell-checking working by enabling it in the domain_props array of globals.lua.

domain_props = {
    ["all"] = {
        ["enable-spell-checking"] = true,
    },
}

I'v also installed hunspell.

Last edited by PotatoesMaster (2011-09-18 14:23:04)

Offline

#589 2011-09-18 14:53:06

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: luakit browser framework (almost with jQuery!)

Is there anything like the domain_props for handling how to open certain files e.g. *.pdf with epdfview and not saving them somewhere?

Offline

#590 2011-09-18 15:02:59

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

Re: luakit browser framework (almost with jQuery!)

That would be a nice feature!

Offline

#591 2011-09-18 16:14:44

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

Re: luakit browser framework (almost with jQuery!)

AndyRTR wrote:

Is there anything like the domain_props for handling how to open certain files e.g. *.pdf with epdfview and not saving them somewhere?

Currently, it's a bit more complicated.

First of all, you need to define the "open-file" signal handler. This will get called when you press 'o' in the downloads-list. Here is my own code as an example - passes everything to xdg-open/mimeo:

-- Open handler
downloads.add_signal("open-file", function(destination, mime_type, w)
    luakit.spawn("xdg-open " .. destination)
    return true
end)

Everything needs to be after 'require "downloads"' in config/rc.lua (or in config/globals.lua). You could test if the 'destination'-part has a '.pdf' in its name or simply check the mime_type if you want to fine-tune it for different applications, for example:

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

Then, if you do not want to save it somewhere permanently, you'll need to redirect it to a temporary directory. I personally save all my files to /tmp and move them to folders if I want to store them - you can automate this by providing a "download-location" signal handler - there's a tutorial on luakit.org. If you return nil in the function, it opens the save-file dialog - so you could test if the file matches '.pdf' and then return a temporary location and otherwise open the dialog. The current development version also provides mime_type as the third argument if I recall correctly.

If you want to automate the opening process instead of manually going through the downloads-list, you can use my pending pull request #26.

Offline

#592 2011-09-18 17:47:16

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

Re: luakit browser framework (almost with jQuery!)

Thanks, was about to ask for that too ; )

Offline

#593 2011-09-18 18:12:16

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

Re: luakit browser framework (almost with jQuery!)

Thanks a lot xConStruct! I asked this here a couple of weeks ago, maybe it wasn't written well, I got no answer. But this manual thing is nice! I really feel like luakit moves towards a state where there are no open wishes. I already got rid of firefox and chromium as backup, because everything works so fine with luakit.

The only thing that continues to make problems is this issue with libsoup I mentioned earlier this day (edit: actually it's libsoup in combination with privoxy)

Last edited by Army (2011-09-18 18:30:22)

Offline

#594 2011-09-18 18:23:55

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: luakit browser framework (almost with jQuery!)

Yeah, libsoup issue fixed and auto-open the files and I can say goodbye too big_smile

Offline

#595 2011-09-18 18:47:29

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

Re: luakit browser framework (almost with jQuery!)

One left question, how do I have to do if e.g. I want all movie files to be opened with mplayer?

    if mime_type == "video/*" then
        luakit.spawn("mplayer " .. destination)
        return true
    end

would be cool, but doesn't work. Of course I can do this for every file type, but that would be too much wink

Offline

#596 2011-09-18 18:55:55

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

Re: luakit browser framework (almost with jQuery!)

Just noticed this now, github seems to have this funny font in luakit, while in chromium it doesn't. Any idea why this happens?

http://i.imgur.com/VyNea.png

Offline

#597 2011-09-18 19:13:06

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

Re: luakit browser framework (almost with jQuery!)

Doesn't look like this here. What fonts do you have installed?

Offline

#598 2011-09-18 19:22:26

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

Re: luakit browser framework (almost with jQuery!)

@Army: You're looking for string.match:

    if string.match(mime_type, "^video/") then
        luakit.spawn("mplayer " .. destination)
        return true
    end

Offline

#599 2011-09-18 20:06:29

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

Re: luakit browser framework (almost with jQuery!)

Dankeschön smile

edit: Ok I tried it a bit, looks like this doesn't work with files which contain spaces in the filename. How can this be fixed?

Last edited by Army (2011-09-18 20:20:34)

Offline

#600 2011-09-18 21:56:43

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

Re: luakit browser framework (almost with jQuery!)

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

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

Offline

Board footer

Powered by FluxBB