You are not logged in.

#1026 2012-12-09 20:24:55

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

Re: luakit browser framework (almost with jQuery!)

Hello, I have made an alternative session system. Instead of saving everything in one session file, save each window as a separate session file, analogous to vim and text files. smile

To use, download this file to your luakit config directory as session.lua. Install a json library; I use luajson installed through luarocks. Restart luakit and verify directory $XDG_DATA_HOME/luakit/sessions.d is created.

Commands (most of these take a session name as an argument),

  • :w - write current session to file, optional give a name to save as

  • :l - load a session, closes existing tabs in window

  • :m - merge a session into current; that is same as load but does not close existing tabs

  • :nl - load a session in a new window

  • :s - set new session name

  • :wq - write out and quit

  • :sname - show current session's name

  • ZZ - overloaded, does what's on the tin

The file format is plain json. The lua table is saved as is through a simple json.encode and includes history data. The name of the current session is stored in w.session. There is no automatic restore on start. Thanks to IsoLinCHiP from IRC for proofreading and suggesting a couple of changes. smile


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

Offline

#1027 2012-12-10 00:13:10

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: luakit browser framework (almost with jQuery!)

This may sound really stupid.. but every now and then when I visit a webpage a download dialog comes up for "fastbutton" (developers.google.com gives this to me, among others).  And just recently I came across one that tried to download "badge" (dreamincode.net gives this to me). I don't think I have anything too foreign in my *.lua files, just wondering if anyone else has come across this or visiting those sites gives the same result, or perhaps just know where it stems from?  It's not a "problem", it's just annoying to keep having these download dialogs pop up.

Edit:  Seems to be 'privoxy' related...  using "no proxy" and doesn't happen, also doesn't happen with 'polipo'.  Oh well.. trying to migrate away from 'privoxy' anyway towards caching.  Happens in 'squid' too.  Strange.

Last edited by milomouse (2012-12-10 04:14:47)

Offline

#1028 2012-12-10 01:21:12

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: luakit browser framework (almost with jQuery!)

@fsckd:  Really like the alternative session management.. thanks. smile

Edit: @fsckd:  I know you said it's not supported right now but is automatic restore on start a possiblity or is that undesired?  If possible, maybe if user saves a session as "default" (or "auto" or some other predetermined name) it will be loaded on start?   Also, is there a "delete session" option I didn't notice or is that not implemented and manual file removal intervention required?

Edit2: luakit's "restart" command has problems with the alternate session.lua by attempting to call method 'error', etc.  Just a heads up.

Last edited by milomouse (2012-12-10 15:31:39)

Offline

#1029 2012-12-10 17:34:34

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

Re: luakit browser framework (almost with jQuery!)

Thanks milomouse. I manually remove session files. There's no technical reason not to have a deletion command or restore on start of a default session.

I have never used the restart command. I will look into it, thanks.

Edit: restart has this code which obviously conflicts,

        -- Save session.
        local wins = {}
        for _, w in pairs(window.bywidget) do table.insert(wins, w) end
        session.save(wins)

luakit is saving the current state tot he session file and reloading it on restore. This does not fit with my alt sessions.

The solution I can think of is to rename the table to altsession and let luakit keep its session stuff. This would conflict with restoring a default session and as it is window session names would be lost.

Edit: Another solution, rename existing session.save and make a new session.save to write all browser state. Then restore can check for that, etc.


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

Offline

#1030 2012-12-14 23:37:03

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: luakit browser framework (almost with jQuery!)

I am not sure if this has been addressed previously but at some pages when using follow I get this message,

Error: /usr/share/luakit/lib/follow.lua:617: 'TypeError' 'undefined' is not an object (evaluating 'head.appendChild')

and right below a stack backtrack is listed.

Also related to follow is that this afternoon when reading some of the entries of this thread (thanks for that helpful flashblock script!!) I used follow a couple of times and they were followed erroneously. That is, follow code was 30 and Luakit followed a 10 one :-?

Finally, is some sort of autosave already implemented? If not, are there plans for it to be introduced?

Before I forget, could someone hint me how to personalize the 'show in folder' in 'Downloads' for the download folder I have defined according the steps in the Wiki (the Arch one)? I have taken a look at download.lua and download_chrome.lua but I seem to not be able to figure it out there :s


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

#1031 2013-01-02 12:39:12

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Hi. I have a little problem with luakit, as normal user it doesn't connect to any page, as root, it works perfectly.
I installed it like shown in the wiki, through pacman, and copy config files with: cp -r $XDG_CONFIG_DIRS/luakit $XDG_CONFIG_HOME

I think this is not a Luakit problem, but i don't know what to do.

Thanks.

Offline

#1032 2013-01-02 12:52:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

Can you use other browsers as your regular user?  If not can you ping or curl websites/pages?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1033 2013-01-02 12:54:26

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Trilby wrote:

Can you use other browsers as your regular user?  If not can you ping or curl websites/pages?

I can use another browser without problems as regular user, firefox and chromium are working perfectly

Offline

#1034 2013-01-02 12:58:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

You didn't happen to do the cp command as root (or with sudo) did you?
What do the following return:

echo $XDG_CONFIG_HOME
ls -l ~/.config/luakit/

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1035 2013-01-02 13:07:48

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

This is not the problem, even tried with a chmod -R 777 and nothing happens

Offline

#1036 2013-01-02 13:10:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

I don't know why you tried that.  But if you don't want to answer troubleshooting questions I'm not sure how you expect to be helped.  I assume if you knew what the problem *was* you wouldn't have asked here.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1037 2013-01-02 14:10:10

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Im not in my computer right now, so i can't answer your question. i'll paste the return of that command in a few hours.

Offline

#1038 2013-01-02 17:47:08

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Trilby wrote:

You didn't happen to do the cp command as root (or with sudo) did you?
What do the following return:

echo $XDG_CONFIG_HOME
ls -l ~/.config/luakit/

Here it is

echo $XDG_CONFIG_HOME
/home/silverius/.config
ls -l ~/.config/luakit/
total 88K
-rw-r--r-- 1 silverius users  21K ene  2 18:43 binds.lua
-rw-r--r-- 1 silverius users 3,1K ene  2 18:43 globals.lua
-rw-r--r-- 1 silverius users 5,0K ene  2 18:43 modes.lua
-rw-r--r-- 1 silverius users 5,0K ene  2 18:43 rc.lua
-rw-r--r-- 1 silverius users 1,7K ene  2 18:43 theme.lua
-rw-r--r-- 1 silverius users  11K ene  2 18:43 webview.lua
-rw-r--r-- 1 silverius users  27K ene  2 18:43 window.lua

All seems OK

Offline

#1039 2013-01-02 18:01:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

Thanks.

Do you get any message output from luakit when you try to visit a page?  You can check your xorg output/logs for this, or if you launch luakit from a terminal emulator the messages will show up there.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1040 2013-01-02 19:45:19

silverius
Member
From: Spain
Registered: 2010-09-28
Posts: 6

Re: luakit browser framework (almost with jQuery!)

Nothing in Xorg logs, nothing in terminal... i don't understand sad

Luakit only shows:

Unable to load page

Problem occurred while loading the URL http://luakit.org/

Cannot connect to destination (luakit.org)

Last edited by silverius (2013-01-02 20:22:27)

Offline

#1041 2013-01-03 02:02:10

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

Re: luakit browser framework (almost with jQuery!)

start in a term with 'luakit -vv' see if get some better output.


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

Offline

#1042 2013-01-06 19:46:32

phynix
Member
Registered: 2008-09-21
Posts: 28

Re: luakit browser framework (almost with jQuery!)

I could not find any information regarding this so forgive me if I am being trite. Is there any way/plan for syncing bookmarks I have in luakit with my Google account mirroring Chromes functionality?

Offline

#1043 2013-01-09 10:45:30

Dark.Light
Member
Registered: 2010-08-09
Posts: 19

Re: luakit browser framework (almost with jQuery!)

For syncing, try the wiki.

I was wondering if anybody knew if luakit supports bookmarklets. And if it does, how to use it? I'm trying to use evernote's bookmarklet to clip webpages to my evernote notebook...

Offline

#1044 2013-01-09 12:32:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

Dark.Light wrote:

For syncing, try the wiki.

I was wondering if anybody knew if luakit supports bookmarklets. And if it does, how to use it? I'm trying to use evernote's bookmarklet to clip webpages to my evernote notebook...

This is well described in the man page.  Is there something there that isn't working as expected?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1045 2013-01-10 14:32:01

Dark.Light
Member
Registered: 2010-08-09
Posts: 19

Re: luakit browser framework (almost with jQuery!)

Trilby wrote:
Dark.Light wrote:

For syncing, try the wiki.

I was wondering if anybody knew if luakit supports bookmarklets. And if it does, how to use it? I'm trying to use evernote's bookmarklet to clip webpages to my evernote notebook...

This is well described in the man page.  Is there something there that isn't working as expected?

Is it? I couldn't find it... It describes well how to use bookmarks, however I've seen nothing specific about bookmarkLETs. Are they used in the same way as normal bookmarks?

Offline

#1046 2013-01-10 14:45:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

Oops, sorry, I misread.  I don't know what bookmarlets are.  Luakit has quickmarks ... I don't know if that is similar.

EDIT: I just looked it up.  Isn't that just a 'cutesy' name for a script?  You can write (or download) your own userscripts and launch them with regular bookmark bindings.

Last edited by Trilby (2013-01-10 14:47:05)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1047 2013-01-12 08:05:17

Dark.Light
Member
Registered: 2010-08-09
Posts: 19

Re: luakit browser framework (almost with jQuery!)

Yes, it's kind of a "cutesy" name for a script. Basically, it sits as a bookmark until it is summoned! When the particular bookmarklet is activated, it executes a script on the current page (instead of taking the user to another page in the case of normal bookmarks).

As for luakit, I tried assigning it to a quickmark, and it works! Thanks for the tip!

Offline

#1048 2013-01-14 21:20:58

mpnordland
Member
Registered: 2011-11-29
Posts: 46

Re: luakit browser framework (almost with jQuery!)

For me, luakit is agonizingly slow at web browsing. The browser itself is fast, but loading pages takes forever. Chromium, on the other hand is fast at loading pages. I really like luakit's interface (or rather, lack of one) but slow page load is a real deal breaker for me. Anyone know of a solution?

Offline

#1049 2013-01-14 21:23:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: luakit browser framework (almost with jQuery!)

mpnordland, more information would be needed.  There should not be a difference.  The only thing that comes to mind is if your network has ipv6 problems (this is fairly common and would make web page loading lag considerably) and chromium was set to use ipv4 only.  To test this, disable ipv6 on your system and see if luakit works better.

Also, you can use wget/curl to download a web page or two, and see if they open quickly in luakit.

EDIT: fixed typo (ipv5 -> ipv4)

Last edited by Trilby (2013-01-15 18:45:51)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#1050 2013-01-15 05:02:29

Nemesis1963
Member
Registered: 2010-06-04
Posts: 11

Re: luakit browser framework (almost with jQuery!)

Hi, I can't make flash-plugin work in Luakit (nor in any other minimal Webkit browsers: tried with DWB, Jumanji & Uzbl).
It works flawlessly with Firefox (& Conkeror) and Chromium.

I'm on Sabayon AMD64 and the plugin version (adobe-flash-11.2.202.258) is located at /usr/lib64/nsbrowser/plugins/libflashplayer.so

Versions: luakit-2012.09.13_p1, webkit-gtk-1.8.3-r300.

I googled a lot but found no references if/where I should create a symlink to make it work.
Any ideas?

Thank's in advance.

p.s.: sorry if I am in the wrong forum, I switched my box few months ago but still think Arch community is the best smile

EDIT:

Plugins are enabled and html5 works.

EDIT:

Solved: actually Flash was working, only missed some functionality on few sites, depending on the version.

Last edited by Nemesis1963 (2013-01-16 02:41:51)

Offline

Board footer

Powered by FluxBB