You are not logged in.
My only real problem is still the ":q" closing all windows. I'll keep probing the .lua's.
The confusing thing here is that the :q & :wq are re-defined in lib/downloads.lua, what you want is the following:
diff --git a/lib/downloads.lua b/lib/downloads.lua
index 6ccfa5a..6ab1639 100644
--- a/lib/downloads.lua
+++ b/lib/downloads.lua
@@ -314,16 +314,16 @@ add_cmds({
-- Overwrite quit commands to check if downloads are finished
add_cmds({
cmd("q[uit]",
- function (w) try_close(w) end),
+ function (w) if w.tabs:count() > 1 then w:close_tab() else try_close(w) end end),
cmd({"quit!", "q!"},
- function (w) w:close_win() end),
+ function (w) if w.tabs:count() > 1 then w:close_tab() else w:close_win(w) end end),
cmd({"writequit", "wq"},
- function (w) try_close(w, true, ":wq!") end),
+ function (w) if w.tabs:count() > 1 then w:close_tab() else try_close(w, true, ":wq!") end end),
cmd({"writequit!", "wq!"},
- function (w) w:save_session() w:close_win() end),
+ function (w) if w.tabs:count() > 1 then w:close_tab() else w:save_session() w:close_win() end end),
}, true)
I'll have a look into removing these re-defined binds in lib/downloads.lua when I get home tonight. It will likely be as easy as emitting a "can-close" signal on the window to check for running downloads before quitting.
Offline
@mason: Fantastic, that fixes the problem for now. Good idea about download checks, though. Will look forward to that.
I hate to "request" anything, as it seems more of a personal preference I don't want to force on anyone, but I've always preferred using the window menu at the bottom (such as with the proxy menu and downloads lists) for viewing open tabs/windows, and maybe I'm not the only one? It just seems cleaner to me, although this could be seen as trivial. E.g., shortcut and/or :promptcmd packs the tablist in the window menu widget (?) at the bottom instead of the layout tabline widget (?) at the top. Not sure the depth of what would be involved here but it's an idea anyway. Feel free to discard as superfluous or integrate as you see fit. Just brainstorming as a luakit end-user. :}
Much appreciated, as always.
Offline
Wow. So many good browser to choose from. I'm using jumanji, but this one is also pretty good. My only gripe would be the lack of website autocompletion. Just like jumanji would get my quickly to archlinux.org by only typing arch followed by the tab key.
I apologize if it's being asked before but how can i get through my history? I'm looking for something very similar to the bookmark page. But I can't find anything about it.
Offline
Wow. So many good browser to choose from. I'm using jumanji, but this one is also pretty good. My only gripe would be the lack of website autocompletion. Just like jumanji would get my quickly to archlinux.org by only typing arch followed by the tab key.
Would quickmarks work for you here? I type 'gob' to open the Arch forums, or 'gnb' to open in a new window. No tab or return nec.
Offline
aluser wrote:Wow. So many good browser to choose from. I'm using jumanji, but this one is also pretty good. My only gripe would be the lack of website autocompletion. Just like jumanji would get my quickly to archlinux.org by only typing arch followed by the tab key.
Would quickmarks work for you here? I type 'gob' to open the Arch forums, or 'gnb' to open in a new window. No tab or return nec.
Yes they would work, but the whole point is to not be doing some extra work and shortcuts like those would never be as efficient.
Offline
I'd also like to have a history search the way aluser describes it. I know luakit already saves the browsing history, but you can't do a search, so it's not perfect. The quickmarks are very handy of course, I use them too for my most important sites. There's an entry in the wiki (http://luakit.org/projects/luakit/wiki/Browsing_history) but I don't understand how this is supposed to work or where this code is supposed to be included.
One minor thing I prefer with jumanji is the fact that jumanji opens external commands (like jumanji google.com) in a new tab. That's nice to have, I often open links which I get e.g. in irssi with the urxvt-url-select script. With luakit it always opens in a new window. I'd prefer to have only one luakit session.
Offline
I'd also like to have a history search the way aluser describes it. I know luakit already saves the browsing history, but you can't do a search, so it's not perfect. The quickmarks are very handy of course, I use them too for my most important sites. There's an entry in the wiki (http://luakit.org/projects/luakit/wiki/Browsing_history) but I don't understand how this is supposed to work or where this code is supposed to be included.(...)
That code was only for adding entries to the history file. I've just appended to that page a snippet to browse that file using dmenu compiled with the vertical patch.
Cheers,
Last edited by escherdragon (2011-02-10 16:36:34)
José Alfredo Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)
Offline
Right now I just installed luakit-git and it works well for about 10 pages. Then after that it will stay at 10%. When that happens switching to chromium doesn't help because it won't open any webpages either. Are the two conflicting because I never experience the problem when just using chromium.
Thanks
Offline
sorry, i'm not sure how to help in previous comment but wanted to ask something of my own.
i recently made luakit hide the statusbar by default [on startup] (and utilized the toggle binding as seen on the luakit site, if i need to see it again) but i can't really use the other suggested "move scroll percent to title" because i never see the title except in their tabs--my window manager doesn't really work that way. regardless, i was wondering if it was possible to put the scroll percent at the beginning of the title in each tab? not sure how often the tab titles are updated though. will continue to look on my own in the meantime. thanks for all the great work.
Offline
sorry, i'm not sure how to help in previous comment but wanted to ask something of my own.
i recently made luakit hide the statusbar by default [on startup] (and utilized the toggle binding as seen on the luakit site, if i need to see it again) but i can't really use the other suggested "move scroll percent to title" because i never see the title except in their tabs--my window manager doesn't really work that way. regardless, i was wondering if it was possible to put the scroll percent at the beginning of the title in each tab? not sure how often the tab titles are updated though. will continue to look on my own in the meantime. thanks for all the great work.
It's possible, look at the get_tab_title function in window.methods. Just place the scroll text (the code is found in the update_scroll function) before the title and you may want to do the same in the update_win_title function. Then replace the update_scroll function with something that calls w:update_tablist() & w:update_win_title().
Offline
Thankyou mason + devs for this excellent project.
One bug I found is when I yank a url, it should encode the url. eg. if I yank this:
http://mini-box.com.au/purchase/Jetway%20JBC360F33W-B.html
It gives me
http://mini-box.com.au/purchase/Jetway JBC360F33W-B.html
Offline
Thankyou mason + devs for this excellent project.
One bug I found is when I yank a url, it should encode the url. eg. if I yank this:
http://mini-box.com.au/purchase/Jetway%20JBC360F33W-B.html
It gives me
http://mini-box.com.au/purchase/Jetway JBC360F33W-B.html
Fixed, thanks.
And to everyone else there has been some interesting commits recently in the develop branch which could do with some testing and or feedback. These include:
History libs have been re-written to use sqlite3 and a (chromium-like) chrome://history/ page replaces the old history menu. Commits: 11b2bd1433...567ae6d3e9. Actionshots: 1 2
A history position indicator widget has been added to the statusbar to indicate if you can go back or forward (or both). Commits: a0f55bde...737ebbe9
The search_open function (which detects whether you've typed in a search term or address based on a set of rules) now reads a list of hostnames from your /etc/hosts, it's not quite the same as local network dns name resolving but it's closer. Commit: 3fc47c30. This commit also breaks the old search engine string format, you need to use %s in the string instead of {0}.
Opening files from the filesystem now works again. Commit: d1f26b1
If you compile luakit with `make USE_LUAJIT=1` then luakit will be linked against the Just-In-Time compiler for Lua which makes luakit even faster (with lua bound operations). Commit: fa09dd2f
The luakit Makefile will now autodetect the lua pkg-config name (which changes from system to system). Commit: a7c35414
Did I mention sqlite? We now have native sqlite3 bindings for Lua and we've implemented a fully compatable mozilla cookie jar using sqlite3 (I.e. you can copy your Firefox 3 cookies database and use it with luakit if you desire). No more losing logins!. Commit: 950a2d7b7
There is now support for saving http authentication credentials with the formfiller. Commits: 8f924172
Faster link following hinting. Commits: 29a06eb8
And more
Offline
Awesome browser, I really love it
but I have a problem: I use almost dark/black themes and all the forms are unreadable because it is black text (#000000) on black forms (e.g. #101010). How can I fix it?
Offline
@mason: Holy Christmas, it's fast (with luajit option, as suggested)! Love the new features, including history support. So far everything seems to work as intended but will report back otherwise. Thanks for the previous information, as well. Already migrated/diffed/examined most of my old configs into new structure, commands, etc. Looks good.
Although, I haven't used the development version in a while, has the per site "accept-policy" for cookies changed? I only see a single soup.set_property("accept-policy", cookie_policy.OPTION) and I get warnings when trying to set it per-site.
EDIT: nevermind, bookmark bindings are in bookmarks.lua under lib directory. Can I ask why some bindings are in libs and some are in binds.lua?
@SuNjACk: have you tried setting a CSS file in your globals.lua file?
["user-stylesheet-uri"] = "file://" .. luakit.data_dir .. "/styles/yourfilename.css",
I think that's how it works, anyway. You might not need the file:// if it was changed in that open commit(?).
Last edited by milomouse (2011-03-07 22:57:01)
Offline
@mason: Holy Christmas, it's fast (with luajit option, as suggested)! Love the new features, including history support. So far everything seems to work as intended but will report back otherwise. Thanks for the previous information, as well. Already migrated/diffed/examined most of my old configs into new structure, commands, etc. Looks good.
Although, I haven't used the development version in a while, has the per site "accept-policy" for cookies changed? I only see a single soup.set_property("accept-policy", cookie_policy.OPTION) and I get warnings when trying to set it per-site.
The trap here is that the "accept-policy" property wasn't a webview setting, it is set globally on the soup cookie jar affecting the accept policy for all tabs and windows (from the same instance). This setting and other global soup properties have been moved to the top of classes/soup/soup.c and it's more appropriate to set them via `soup.set_property(name, value)` in Lua.
EDIT: nevermind, bookmark bindings are in bookmarks.lua under lib directory. Can I ask why some bindings are in libs and some are in binds.lua?
The theory goes that you can at any point remove whichever files you like from the lib directory and the browser will continue to function normally (though without said feature). The bindings are too tightly coupled to the optional libs to include them all in binds.lua so each lib that has bindings keeps a table of them at the bottom of the file.
I admit it is a bit difficult to track them all at the moment but I'm working on a way for luakit to list all of its own bindings in a chrome://binds/ or chrome://help/ page.
@SuNjACk: have you tried setting a CSS file in your globals.lua file?
["user-stylesheet-uri"] = "file://" .. luakit.data_dir .. "/styles/yourfilename.css",
I think that's how it works, anyway. You might not need the file:// if it was changed in that open commit(?).
SuNjACk will still need the file:// in the user-stylesheet-uri property. We've had a lot of users say that custom stylesheets weren't working but this turned out to be the issue.
Offline
@mason: Okay, that makes sense. One thing I did notice though (with develop-git) is a somewhat significant lag when initially using anything calling 'open' (due to reading /etc/hosts file with 700,000+ hosts) but is understandable. After each directly called 'open' (initially starting luakit with an argument, or tabnew or open, etc), it's basically frozen until it loads but after that everything loads very quickly, e.g. with link hints or clicking links.
@anyone (including mason): As a side note; not sure if it was just me but since we're on the note of soup.c, with libwebkit >= 1.3.10 I had to `sed' this before configuring/making it, otherwise luakit wouldn't compile.
sed -i 's|include <gtk/gtk.h>|&\n#include <libsoup/soup.h>|' Source/WebKit/gtk/webkit/webkitsoupauthdialog.h
For luakit it errored during classes/soup/soup.c so I backtracked my webkit's until I found what changed in the file it was complaining about (webkitsoupauthdialog.h, as mentioned). The version of libsoup doesn't seem to matter, I tried webkit >= 1.3.10 with libsoup > 2.32.2 to what I'm using now = 2.33.90, and it was same results. So, if anyone else is having problems with compiling luakit (or a webkit browser) with libwebkit >= 1.3.10 this may help.. currently using 1.3.12. Doubt this is a permanent solution but confused why it was removed in the first place.
back @ mason: By the way, how much history is saved? Infinite or... ?
EDIT: Is this intended link following behavior? Seems to go a little goofy with lots of links, I thought it would go 001 002 003, but that's ok. http://itmages.ru/image/view/142460/e7da17f2
EDIT2: Not sure about this one; when I do `:open luakit' it tries to open file://luakit because I guess it's a file? but `:open archlinux' works as intended, it will search for archlinux.
Last edited by milomouse (2011-03-08 05:32:36)
Offline
@mason: Okay, that makes sense. One thing I did notice though (with develop-git) is a somewhat significant lag when initially using anything calling 'open' (due to reading /etc/hosts file with 700,000+ hosts) but is understandable. After each directly called 'open' (initially starting luakit with an argument, or tabnew or open, etc), it's basically frozen until it loads but after that everything loads very quickly, e.g. with link hints or clicking links.
Are you using /etc/hosts for adblocking? Maybe it's worth adding a global option to skip the /etc/hosts checking.
@anyone (including mason): As a side note; not sure if it was just me but since we're on the note of soup.c, with libwebkit >= 1.3.10 I had to `sed' this before configuring/making it, otherwise luakit wouldn't compile.
sed -i 's|include <gtk/gtk.h>|&\n#include <libsoup/soup.h>|' Source/WebKit/gtk/webkit/webkitsoupauthdialog.h
For luakit it errored during classes/soup/soup.c so I backtracked my webkit's until I found what changed in the file it was complaining about (webkitsoupauthdialog.h, as mentioned). The version of libsoup doesn't seem to matter, I tried webkit >= 1.3.10 with libsoup > 2.32.2 to what I'm using now = 2.33.90, and it was same results. So, if anyone else is having problems with compiling luakit (or a webkit browser) with libwebkit >= 1.3.10 this may help.. currently using 1.3.12. Doubt this is a permanent solution but confused why it was removed in the first place.
So is that a webkit issue or are we just missing an #include? I'm going to upgrade and check.
back @ mason: By the way, how much history is saved? Infinite or... ?
Infinite, but note that unlike the old history.txt we don't add a new item on each navigation. If an old item exists with the same uri it's last access time is updated and it's visit count incremented (which will be useful for history completion when we get around to it). So you would have to access GB's of unique uri's to notice any performance problems. Even then I think sqlite handles large databases really well.
EDIT: Is this intended link following behavior? Seems to go a little goofy with lots of links, I thought it would go 001 002 003, but that's ok. http://itmages.ru/image/view/142460/e7da17f2
I've noticed the same thing and sent karottenreibe an email, hopefully he will know what is wrong.
EDIT2: Not sure about this one; when I do `:open luakit' it tries to open file://luakit because I guess it's a file? but `:open archlinux' works as intended, it will search for archlinux.
Good point, we should check for search engines first.
Last edited by mason.larobina (2011-03-08 07:38:40)
Offline
EDIT: Is this intended link following behavior? Seems to go a little goofy with lots of links, I thought it would go 001 002 003, but that's ok. http://itmages.ru/image/view/142460/e7da17f2
That's indeed intended. The script generates the numbers like you expected but then reverses all digits. This will decrease the number of digits you have to type to follow a specific link in some situations, e.g for 11 links you'd get:
10, 20, 30, 40, 50, 60, 70, 80, 90, 01, 11
Greetz!
Offline
If you compile luakit with `make USE_LUAJIT=1` then luakit will be linked against the Just-In-Time compiler for Lua which makes luakit even faster (with lua bound operations). Commit: fa09dd2f
I want to try this out, so I edited the PKGBUILD of luakit-develop-git from AUR and changed the last line in the build function to
make USE_LUAJIT=1 PREFIX=/usr DESTDIR="$pkgdir/" clean all install
which lead to the following error
config.mk:17: *** Unable to determine luajit pkg-config name, specify manually with `LUA_PKG_NAME=<name> make`, use `pkg-config --list-all | grep luajit` to find the correct package name for your system. Please also check that you have luajit installed. Stop.
Alright, reading the error message I see that luajit is a separate package. So I installed it and tried it again with no luck, same error message, because pkg-config doesn't find it. So I tried a reboot, maybe then pkg-config will have recognized it, but still no luck.
What do I have to do to make this work?
Offline
mason.larobina wrote:
If you compile luakit with `make USE_LUAJIT=1` then luakit will be linked against the Just-In-Time compiler for Lua which makes luakit even faster (with lua bound operations). Commit: fa09dd2f
I want to try this out, so I edited the PKGBUILD of luakit-develop-git from AUR and changed the last line in the build function to
make USE_LUAJIT=1 PREFIX=/usr DESTDIR="$pkgdir/" clean all install
which lead to the following error
config.mk:17: *** Unable to determine luajit pkg-config name, specify manually with `LUA_PKG_NAME=<name> make`, use `pkg-config --list-all | grep luajit` to find the correct package name for your system. Please also check that you have luajit installed. Stop.
Alright, reading the error message I see that luajit is a separate package. So I installed it and tried it again with no luck, same error message, because pkg-config doesn't find it. So I tried a reboot, maybe then pkg-config will have recognized it, but still no luck.
What do I have to do to make this work?
On my arch notebook I just installed this AUR package then checked "luajit" was in `pkg-config --list-all | grep lua` (which it was). And then luakit compiled correctly with `make USE_LUAJIT=1`.
Offline
milomouse wrote:EDIT: Is this intended link following behavior? Seems to go a little goofy with lots of links, I thought it would go 001 002 003, but that's ok. http://itmages.ru/image/view/142460/e7da17f2
That's indeed intended. The script generates the numbers like you expected but then reverses all digits. This will decrease the number of digits you have to type to follow a specific link in some situations, e.g for 11 links you'd get:
10, 20, 30, 40, 50, 60, 70, 80, 90, 01, 11
Greetz!
I think we should also add an option to return the links ordered (I.e. 01, 10, 11, 20, 30, 40, 50, 60, 70, 80, 90) to avoid the mess in milomouse's screenshot.
Offline
For some reason it won't work with the community package. The pkg-config stuff seems only to be installed with the AUR package.
BTW @mason: Is there a way to use this as the default without having to edit config.mk? I'm lazy and don't want to have to type USE_LUAJIT=1 in front of my make all the time^^
Edit: Having that option shouldn't be a problem, I'll look into it tonight.
Last edited by karottenreibe (2011-03-08 09:46:41)
Offline
For some reason it won't work with the community package. The pkg-config stuff seems only to be installed with the AUR package.
I didn't think to check in pacman. What version is the community package? From my tests on Gentoo luajit needs to be version 2 or higher to provide a pkg-config file.
BTW @mason: Is there a way to use this as the default without having to edit config.mk? I'm lazy and don't want to have to type USE_LUAJIT=1 in front of my make all the time^^
Yeah, do this:
export USE_LUAJIT=1
Edit: Having that option shouldn't be a problem, I'll look into it tonight.
Already done, it just needs a `table.sort(labels)` at the bottom of the make_labels function.
Offline
On my arch notebook I just installed this AUR package then checked "luajit" was in `pkg-config --list-all | grep lua` (which it was). And then luakit compiled correctly with `make USE_LUAJIT=1`.
Ok, using luajit2 from the AUR solves the problem, thanks I used luajit from the repos
Offline
milomouse wrote:@mason: Okay, that makes sense. One thing I did notice though (with develop-git) is a somewhat significant lag when initially using anything calling 'open' (due to reading /etc/hosts file with 700,000+ hosts) but is understandable. After each directly called 'open' (initially starting luakit with an argument, or tabnew or open, etc), it's basically frozen until it loads but after that everything loads very quickly, e.g. with link hints or clicking links.
Are you using /etc/hosts for adblocking? Maybe it's worth adding a global option to skip the /etc/hosts checking.
Added a `globals.load_etc_hosts` option to enable/disable loading of hostnames from /etc/hosts (for those of you with huge /etc/hosts files). Commit: 29875cc
milomouse wrote:EDIT: Is this intended link following behavior? Seems to go a little goofy with lots of links, I thought it would go 001 002 003, but that's ok. http://itmages.ru/image/view/142460/e7da17f2
I've noticed the same thing and sent karottenreibe an email, hopefully he will know what is wrong.
Ok, there is now an option `follow.sort_labels` which when true sorts the follow labels (default's to true to avoid confusion). Commit: 6c4f224
milomouse wrote:EDIT2: Not sure about this one; when I do `:open luakit' it tries to open file://luakit because I guess it's a file? but `:open archlinux' works as intended, it will search for archlinux.
Good point, we should check for search engines first.
Also there was a request on IRC to be able to change the chrome://history date format from 12 hour time to 24 hour time. Change `history.chrome.time_format` from "12h" to "24h" for 24 hour time. Commit: d7235e9
Offline