You are not logged in.

#776 2012-02-26 11:08:44

bootleg
Member
Registered: 2010-12-08
Posts: 38

Re: luakit browser framework (almost with jQuery!)

Hi,
I was wondering if there was a way to open links with other apps according to the protocol, to manage 'mailto' or ftp links for instance.

Offline

#777 2012-02-26 11:33:20

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

Re: luakit browser framework (almost with jQuery!)

mailto to gmail would be swell too big_smile

Offline

#778 2012-02-26 13:55:56

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

Re: luakit browser framework (almost with jQuery!)

bootleg wrote:

Hi,
I was wondering if there was a way to open links with other apps according to the protocol, to manage 'mailto' or ftp links for instance.

Look here

Offline

#779 2012-02-27 11:42:06

bootleg
Member
Registered: 2010-12-08
Posts: 38

Re: luakit browser framework (almost with jQuery!)

Nice, thanks!

Offline

#780 2012-02-27 20:18:24

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: luakit browser framework (almost with jQuery!)

Where do I find a config file for this thing? I just installed it, but it did not generate anything in ~/,config/luakit, and I can't find any generic config online.

I need to set default things like:
window position
window size
disable status bar

Offline

#781 2012-02-27 20:25:46

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

Re: luakit browser framework (almost with jQuery!)

pacman -Ql luakit

will show you the contents of the package. The files you are looking for are in /etc/xdg/luakit

About your defaults: I think window position is managed by the window manager. Window size can be adjusted in the globals.lua (default_window_size). Disabling the status bar might be a bit more tricky. Do you want to disable it completely?

Last edited by Army (2012-02-27 20:27:59)

Offline

#782 2012-02-28 13:59:37

jwbirdsong
Member
From: Western KS USA
Registered: 2006-11-25
Posts: 173

Re: luakit browser framework (almost with jQuery!)

Lockheed wrote:

Where do I find a config file for this thing? I just installed it, but it did not generate anything in ~/,config/luakit, and I can't find any generic config online.

Also pay better attention to pacman. It told you where configs are upon install.
http://sprunge.us/CVAj


PLEASE read and try to FIX/FILE BUGS instead of assuming other have/will.

Offline

#783 2012-02-28 18:21:50

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: luakit browser framework (almost with jQuery!)

Is it possible to block domains completely in luakit? I'm looking for a way to block domains for me but not for everyone else (read: facebook).

Offline

#784 2012-02-28 18:31:11

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

Re: luakit browser framework (almost with jQuery!)

Bellum wrote:

Is it possible to block domains completely in luakit? I'm looking for a way to block domains for me but not for everyone else (read: facebook).

Yes! Use https://gist.github.com/1073680, put it in your ~/.config/luakit, named e.g. adblock.lua, edit your rc.lua and include

require "adblock"

Then create a file ~/.config/luakit/adblock.blacklist according to the comment in the adblock.lua. Here's what works for facebook

facebook%.com

Offline

#785 2012-02-28 18:49:58

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: luakit browser framework (almost with jQuery!)

+1, thanks. smile

Offline

#786 2012-02-28 20:12:14

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

Re: luakit browser framework (almost with jQuery!)

@Army: your mailto snippet works, but I can't adapt it to auto-add magnet links to transmission :s

Offline

#787 2012-02-28 20:41:31

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

Re: luakit browser framework (almost with jQuery!)

Sorry, I don't know how to do that, I didn't write that code, I just took it from the mailing list to this thread so everyone sees it, because obviously it's pretty cool stuff.

Offline

#788 2012-02-28 20:58:03

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

Re: luakit browser framework (almost with jQuery!)

Oh I see! yes it's awesome stuff! big_smile well if anyone know how to make transmission open "magnet:" links do tell big_smile

Offline

#789 2012-02-28 22:28:25

sonkei
Member
From: Detroit,MI
Registered: 2009-04-06
Posts: 27

Re: luakit browser framework (almost with jQuery!)

-cut-
nvm i guess it's documented and a webkit problem (http://luakit.org/issues/24)

Last edited by sonkei (2012-02-28 22:30:09)

Offline

#790 2012-02-29 08:28:09

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: luakit browser framework (almost with jQuery!)

I tried changing the default window size  by

    set_default_size = function (w)
        local size = globals.default_window_size or "1251x767"

but it doesn't work.

I also was unable to find an option to keep window position on browser close/open and how to disable the statusbar.

Offline

#791 2012-02-29 09:24:34

bootleg
Member
Registered: 2010-12-08
Posts: 38

Re: luakit browser framework (almost with jQuery!)

el mariachi wrote:

Oh I see! yes it's awesome stuff! big_smile well if anyone know how to make transmission open "magnet:" links do tell big_smile

Here is how I made it work with rTorrent:

webview.init_funcs.magned_hook = function (view, w)
    view:add_signal("navigation-request", function (v, uri)
        if string.match(uri, "^magnet:") then
            local cmd = string.format("%s %q", "mktor", uri)
            luakit.spawn(cmd)
            return false
        end
    end)
end

this should work with any bittorrent client I think.
(see pyroscope for mktor)

Last edited by bootleg (2012-02-29 09:24:46)

Offline

#792 2012-02-29 19:03:11

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

Re: luakit browser framework (almost with jQuery!)

Great!! I'll check this one out soon!

Here's a script which translates hosts files for adblocking into an adblock.blacklist file. Use it as an example only!

Offline

#793 2012-03-01 12:59:58

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

Re: luakit browser framework (almost with jQuery!)

@bootleg: thanks it works wink
any news on luakit's code working?

Offline

#794 2012-03-15 08:20:57

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

is there a way to change the default font and font size of webpages?

Offline

#795 2012-03-18 02:35:57

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: luakit browser framework (almost with jQuery!)

Trying to compile luakit on CRUX and getting this: http://paste.lisp.org/+2R34

Offline

#796 2012-03-20 18:04:44

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: luakit browser framework (almost with jQuery!)

Any thoughts? Is there more information I need to provide?

Offline

#797 2012-03-21 00:55:05

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: luakit browser framework (almost with jQuery!)

What compiler are you using? You using the latest source from git?

EDIT:

Try setting CC to clang. At the very least, it has better error messages. I don't get any error messages or warnings at all with clang or gcc. The ones you're getting don't seem to actually point to any incorrect code. hmm

Oh! Hum. It looks like our lua is out of date, and the new version changes the API around a bit.

Last edited by Bellum (2012-03-21 02:18:05)

Offline

#798 2012-03-21 06:05:54

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: luakit browser framework (almost with jQuery!)

Thank you for the reply.

Yes, latest code from git. Compiler is set to cc, which is a symlink to gcc. Output of gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.5.3/configure --prefix=/usr --mandir=/usr/man --libexecdir=/usr/lib --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable-nls --with-x=no --with-system-zlib --with-pkgversion=CRUX
Thread model: posix
gcc version 4.5.3 (CRUX) 

My version of lua is 5.2.0, which I am led to believe is the latest version. I don't understand your comment about 'our' lua being out of date.

CRUX has no clang port. Do I really have to install a new compiler to resolve this?

Perhaps I shouldn't have snipped the output. Here is all of it: http://paste.lisp.org/display/128458

Offline

#799 2012-03-21 07:31:43

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: luakit browser framework (almost with jQuery!)

No, no. I was just commenting that clangs output is more human-friendly so it would be easier for me see what's going on. But after looking around a bit, I think I see what's going on.

By "our" lua, I mean Arch Linux, which uses 5.1. 5.2 seems to break backwards compatibility a bit. In which case it's just a matter of either installing lua 5.1 or waiting for luakit to be ported to 5.2.

Offline

#800 2012-03-21 11:11:48

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

anti-destin wrote:

is there a way to change the default font and font size of webpages?

i tried to solve this by creating a custom css file with the following code:

/* Fonts and Dimensions */
{font-size: 16pt !important;}

i have the following line in globals.lua:

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

but the font size doesn't change. did i miss something?

Offline

Board footer

Powered by FluxBB