Git Product home page Git Product logo

luakit-plugins's Introduction

Luakit

luakit is a fast, light and simple to use micro-browser framework extensible by Lua using the WebKit web content engine and the GTK+ toolkit.

Don't Panic!

You don't have to be a developer to use luakit on a daily basis. If you are familiar with vimperator, pentadactyl, jumanji, uzbl & etc you will find luakit behaves similarly out of the box.

Requirements

  • GTK+ 3
  • Lua 5.1 or LuaJIT 2
  • lfs (lua file system)
  • webkit2gtk
  • sqlite3
  • gstreamer (for video playback)

Installing

Luakit is available on most Linux Distributions and BSD system via their package managers. A few examples below:

  • Debian/Ubuntu: apt-get install luakit
  • Gentoo: emerge luakit
  • Guix: guix install luakit
  • Arch: pacman -S luakit
  • FreeBSD: pkg install luakit
  • OpenBSD: pkg_add luakit
  • Void Linux: xbps-install luakit

Packaging status:

Packaging Status

Installing from source

Make sure you system fulfills the requirements listed above, then install luakit with the following commands:

$ git clone https://github.com/luakit/luakit.git
$ cd luakit
$ make
$ sudo make install

Uninstall with:

$ sudo make uninstall

Note: If you are on BSD, you might need to use gmake.

Use Luakit

Just run:

$ luakit [URI..]

Or to see the full list of luakit launch options run:

$ luakit -h

Luakit works with vim-style bindings. To find out more, type :help within luakit.

Configuration

Luakit configuration files are written in lua. This means you can program within the config files, which make the configuration options endless.

There are three ways to customize luakit.

1. within luakit

After starting luakit, type :settings. This page shows you webkit engine related settings.

2. userconf.lua

Create a file called $HOME/.config/luakit/userconf.lua. Then add your configuration there. Configuration in this file supersedes configuration set in :settings

3. copy rc.lua

The most powerful customization is to copy rc.lua from /etc/xdg/luakit/rc.lua to $HOME/.config/luakit/rc.lua

When this file is found, /etc/xdg/luakit/rc.lua is ignored.

Be informed that when luakit is updated, you may need to adapt changes from /etc/xdg/luakit/rc.lua to your own copy.

Colors and fonts

Copy the /etc/xdg/luakit/theme.lua to $HOME/.config/luakit/theme.lua. You can change fonts and colors there.

Development Information

This section contains information about the compile and testing process.

Luakit honors the PREFIX variable. The default is /usr/local.

$ make PREFIX=/usr
$ sudo make PREFIX=/usr install

Notes:

  • You also have to set the PREFIX when uninstalling.
  • If you want to change PREFIX after a previous build, you need to make clean first.

Luakit uses luajit by default, to use lua you can turn off luajit with:

$ make USE_LUAJIT=0

To build with local paths (interesting for package maintainer and contributers). You may wish to build luakit with:

$ make DEVELOPMENT_PATHS=1

This lets you start luakit from the build directory, using the config and libraries within the same.

Take a look at config.mk for more options.

If you made changes and want to know if luakit is still working properly, you can execute the test suite with:

$ make test

Tips and fixes:

Video playback

If you're having issues with video playback, this is often related to buggy graphic drivers. It often helps to set LIBGL_DRI3_DISABLE before starting luakit:

$ export LIBGL_DRI3_DISABLE=1

Webkit process limit

Since Webkit 2.26, the webkit engine used in luakit is creating a new process for each tab. This has the benefit that a webkit webview crash will only crash one tab. The downside is lower performance and increased memory use.

If you value speed over stability, you can ask webkit to use one process for all tabs by setting WEBKIT_USE_SINGLE_WEB_PROCESS before starting luakit:

$ export WEBKIT_USE_SINGLE_WEB_PROCESS=1

HiDPI Monitor Configuration

If you have a HiDPI monitor (> 1920x1080) and find that web pages are too small, you can change the webview.zoom_level on the settings page (luakit://settings/) to 150 or 200 as per your taste.

Reporting Bugs

Please note that most rendering related issues come from the used webkit engine and can not be fixed by luakit. If you think your issue is luakit related, please use the bug tracker at:

https://github.com/luakit/luakit/issues

Coming from a very old luakit version? Look at the MIGRATION document.

IRC

Join us in #luakit on the irc.oftc.net network.

luakit-plugins's People

Contributors

aidanholm avatar c0dev0id avatar mason-larobina avatar serg-kozhemyakin avatar zappathustra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luakit-plugins's Issues

Incorrect parsing of adblock files

After setting up adblock plugin, I've noticed, that github no longer shows avatars (checked with :adblock-disable). Verbose output from luakit gives the following:

Requesting: https://avatars2.githubusercontent.com/u/1707020?v=3&s=32
adblock: blocking "resource-request-starting" as pattern "^https?://[^/]*%.?ntent%.com[^%w%-%.%%]" matched to uri https://avatars2.githubusercontent.com/u/1707020?v=3&s=32

I've tried to find this way too broad pattern in the lists (easylist.txt and ruadlist+easylist.txt), but to no avail. Looking into the code of adblock/init.lua, I found that it does some conversion of easylist patterns to lua one's (abp_to_pattern). I've put some debug statements to print the initial easylist's definition, and here it is:

||ntent.com^$third-party

So, uhm, is it correct to convert this into https?://[^/]*%.?ntent%.com[^%w%-%.%%] (don't know the syntax of easylist, nor of Lua's regex)? I'm not saying anything about https? part, but where is third-party?

License?

They are marked with copyright, but it is not clear which one. Suggest GPLv3.

Update useragent strings in uaswitch.lua

From @schvabodka-man:

plugins.uaswitch.ua_strings.fakes = {
   
   ["luakit"]        = "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/604.1 (KHTML, like Gecko) Version/11.0 Safari/604.1",
   ["firefox"]        = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0",
   ["chrome"]        = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
   ["chromium"]        = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36",
   ["edge"]        = "Mozilla/5.0 (Windows NT 6.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393",
   ["ie11"]        = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
   ["opera"]        = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 OPR/46.0.2597.57",
   ["opera-presto"]        = "Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14",
   ["opera-mini-j2me"]        = "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2/28.3590; U; en) Presto/2.8.119 Version/11.10",
   ["opera-mini-android"]        = "Opera/9.80 (Android; Opera Mini/24.0.2254/62.178; U; en) Presto/2.12.423 Version/12.16",
   ["okhttp"]        = "okhttp/3.8.0",
   ["netscape"]        = "Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)",
   ["netsurf"]        = "NetSurf/3.6 (Linux)",
   ["links"]        = "Links (2.7; Linux 3.10.24+ armv6l; GNU C 4.6.3; dump)",
   ["dillo"]        = "Dillo/3.0.5",
   ["lynx"]        = "Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23",
   ["safari"]        = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8",
   ["iphone"]        = "Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1",
   ["ipad"]        = "Mozilla/5.0 (iPad; CPU OS 9_3_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E238 Safari/601.1",
["android-phone"]        = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 6P Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36",
   ["android-tablet"]        = "Mozilla/5.0 (Linux; Android 7.0; Pixel C Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36",
}

Depends on #14

Plugins break ':help' luakit introspection.

At least, 'oldschoolkeys' does.

Upd0: Since the introspection mechanism still needs to be documented more so I can't decide it mistreats plugins or plugins do violate it; thus, this issue affects plugins more than luakit.

Cannot load plugins

Using current develop branch from luakit (ref commit 16f8b89).
I clone the plugin folder to my ~/.config/luakit/plugins and change my rc.lua to include the line
'require "plugins"' but when I try and launch luakit with the plugins enabled I always get an error message:

Initializing plugins: scanning subfolders for valid entries…
plugins: reading rc.lua…
plugins: rc file exists.
Initializing plugin 'adblock'…
./lib/chrome.lua:162: attempt to index local 'webview' (a nil value)
[    0.036598] E: luakit: main:187: no windows spawned by rc file, exiting

I believe I have followed the instructions correctly to setting it up. Perhaps you can offer some help in getting it working. I'm particularly interesting in getting adblock set up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.