You are not logged in.

#1101 2013-07-14 21:04:23

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

Re: luakit browser framework (almost with jQuery!)

ObliviousGmn wrote:

I'm actually quite interested in how you hide the tablist. I have no clue what so ever.

Well, I just put a comment ( -- ) infront of w.layout:pack(w.tablist.widget) in the "window.lua" file.  This just hides the actual tab bar but keeps the rest of the code that updates tab numbers and whatnot.

    -- Pack tablist
    --w.layout:pack(w.tablist.widget)

Offline

#1102 2013-07-14 21:50:23

ObliviousGmn
Member
Registered: 2011-09-14
Posts: 49
Website

Re: luakit browser framework (almost with jQuery!)

milomouse wrote:
ObliviousGmn wrote:

I'm actually quite interested in how you hide the tablist. I have no clue what so ever.

Well, I just put a comment ( -- ) infront of w.layout:pack(w.tablist.widget) in the "window.lua" file.  This just hides the actual tab bar but keeps the rest of the code that updates tab numbers and whatnot.

    -- Pack tablist
    --w.layout:pack(w.tablist.widget)

smile Thanks Milo! I feel really stupid for not seeing that a lot earlier.

Offline

#1103 2013-07-15 19:25:18

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

Re: luakit browser framework (almost with jQuery!)

milomouse wrote:

The one redeeming feature I found in Firefox's `vimperator' and 'pentadactyl' was the :buffers command which showed a list of "tabs" or buffers in the statusbar with the tabnumber next to each one.  In luakit I hide the tablist / tabbar because I hate the clutter, so you can see why a :buffers list would be very handy.  If Mason is not actively developing the Master branch is anyone in the active luakit forks reading this and possibly care about implementing?  If I knew more about Lua I would try it myself..   which I am at the moment but without luck so far.  Thanks for reading.

Can't believe I didn't search GitHub for this.  Anyway, found a tabmenu plugin and changed it to :buffers.  No need for tab number next to each url since the titles are selectable through the statusbar menu -- ( j/k | down/up ) + Return. Phew!

Link (minor :buffers mod): buffers.lua [[EDIT: File no longer in use, deleted]]
Link (original :tabmenu): plugins/tabmenu/init.lua

Edit:  Updated buffers.lua mod to display text (URI , TITLE) above each row.

Last edited by milomouse (2013-07-16 02:03:13)

Offline

#1104 2013-07-15 23:59:48

quigybo
Member
Registered: 2009-01-15
Posts: 220

Re: luakit browser framework (almost with jQuery!)

@milomouse: Dammit beaten to it. It is something I have thought about for a while too, but also never thought of searching github. tongue Anyway in between reading your request and the above post I hacked together something similar, it basically works the same except it doesn't move the cursor to the current tab on opening the menu. See my tabmenu branch.

I named the command "tabmenu" instead of "buffers" as buffers have a different meaning within the context of luakit. Coincidentally it is the same name chosen by Alexander Clare.

I also wanted to add the ability to reorder the tabs from within the menu, and while moving the tab isn't an issue (w.tabs:reorder), there is no clean way to reflect that change in the menu. As far as I can see there is no way to reorder items in the menu without rebuilding the whole thing, and if you do that then you lose the current cursor position (plus it is inefficient).

Offline

#1105 2013-07-16 02:49:44

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

Re: luakit browser framework (almost with jQuery!)

@quigybo:  Nice.  Your version is a bit cleaner, too.  I do agree that it would be good to have real-time changes to the menu.  I thought there was something like that for the old statusbar menu :downloads command before it switched to the webpage version although I could be wrong...

Anyway, the only way I can think of at the moment is to call set_mode to refresh the menu.  Here's my slight modifications to tabmenu so you can see what I mean. ( tabmenu.lua ) Let me know if you have any ideas.


P.S.  I think I'll use ":tabmenu" instead of ":buffers" since it seems to hold a different standing in luakit.  smile

Edit:  I wonder if we could check for 'nil' value for uri because if you try to call tabmenu too early it will display an error.

Last edited by milomouse (2013-07-16 03:44:14)

Offline

#1106 2013-07-17 23:36:38

quigybo
Member
Registered: 2009-01-15
Posts: 220

Re: luakit browser framework (almost with jQuery!)

@milomouse: good stuff. Ideally I would like to modify the menu code itself to allow items to be moved/reordered in a more efficient way. I may still do it if I find time, but it I'm not sure if Mason is around much and it would be nice to know it will be merged upstream at some point. But anyway I would recommend doing a pull request to the luakit-plugins repo with the current improvements.

milomouse wrote:

Edit: I wonder if we could check for 'nil' value for uri because if you try to call tabmenu too early it will display an error.

I already do that for the title, in my admittedly very brief testing I thought it wasn't necessary for the uri. Anyway, here's the fix:

diff --git a/lib/tabmenu.lua b/lib/tabmenu.lua
index be163cd..d6db157 100644
--- a/lib/tabmenu.lua
+++ b/lib/tabmenu.lua
@@ -16,7 +16,7 @@ new_mode("tabmenu", {
         local rows = {{ "    Title", "URI", title = true }}
         local escape = lousy.util.escape
         for i, view in ipairs(w.tabs.children) do
-            local uri = escape(view.uri)
+            local uri = escape(view.uri or "")
             local title = escape(view.title or "")
             table.insert(rows, { " " .. i .. ":  " .. title, " " .. uri, index = i })
         end

Offline

#1107 2013-07-18 21:23:43

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

Re: luakit browser framework (almost with jQuery!)

Anyone know why "link hints" look different on some pages?
For instance the hints on ArchLinux site (this site) look this:
h_1374182344_8341417_8fced2e2ff.jpg
As you can see it's kind of a Dejavu type font.

On most sites they look the way I want -- the Fixed font -- like this:
h_1374182344_6454328_b83651fc14.jpg

Do follow link hints somehow inherit certain webpage settings?  I was hoping the font I set would be respected from follow.lua and am not 100% sure how the webpage overrides them.

Offline

#1108 2013-07-20 17:11:21

th3voic3
Member
Registered: 2012-03-20
Posts: 90

Re: luakit browser framework (almost with jQuery!)

Just a heads up. The recent update of gnutls to 3.2.1-1 gave me quite a headache with luakit. Several https sites stopped working. Couldn't reproduce the issue with firefox, but downgrading to the previous version made luakit play nice again.

Offline

#1109 2013-07-21 15:15:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Re: luakit browser framework (almost with jQuery!)

th3voic3 wrote:

Just a heads up. The recent update of gnutls to 3.2.1-1 gave me quite a headache with luakit. Several https sites stopped working. Couldn't reproduce the issue with firefox, but downgrading to the previous version made luakit play nice again.

You meant the upgrade to gnutls 3.2.2, right? I filed a bug report upstream on this as it breaks a number of sites with dwb as well.

Offline

#1110 2013-07-21 22:12:22

th3voic3
Member
Registered: 2012-03-20
Posts: 90

Re: luakit browser framework (almost with jQuery!)

skottish wrote:
th3voic3 wrote:

Just a heads up. The recent update of gnutls to 3.2.1-1 gave me quite a headache with luakit. Several https sites stopped working. Couldn't reproduce the issue with firefox, but downgrading to the previous version made luakit play nice again.

You meant the upgrade to gnutls 3.2.2, right? I filed a bug report upstream on this as it breaks a number of sites with dwb as well.


Yes, that's the one. And good to know about the bug report.

Offline

#1111 2013-08-05 03:32:31

mrawfull
Member
Registered: 2011-11-26
Posts: 24

Re: luakit browser framework (almost with jQuery!)

Anyone know how to display the scrollbars on the left-hand side? Thanks.
Great browser, btw.


edit > ok n/m, I added this to gtkrc-2.0 it is good now.

gtk-scrolled-window-placement = top-right

Last edited by mrawfull (2013-08-05 04:00:32)

Offline

#1112 2013-08-07 09:38:12

wirr
Member
Registered: 2009-10-25
Posts: 68

Re: luakit browser framework (almost with jQuery!)

Hi

The page luakit://history doesn't show the entries from the sqlite db. It's a blank page on all of my computers, at least since december. I didn't find anyone describing this problem, thats why I think I'm doing something wrong.

Once there showed up some error messages that sqlite could not write to the db because the disk is full. But luakit -v doesn't show them, and the disk is not full. As you can see below, there is no problem with writing to the history db.

I just configured domain props and the theme.

ciril@bigmama ~ % rm $XDG_DATA_HOME/luakit/history.db
ciril@bigmama ~ % luakit google.com &
[1] 19829
ciril@bigmama ~ % awk -v 'RS=\0' -F= '$1=="XDG_DATA_HOME" {print $2}' /proc/19829/environ
/home/ciril/.local/share
ciril@bigmama ~ % 
[1]  + 19829 done       luakit google.com
ciril@bigmama ~ % luakit wikipedia.org &
[1] 19855                             
ciril@bigmama ~ % awk -v 'RS=\0' -F= '$1=="XDG_DATA_HOME" {print $2}' /proc/19855/environ
/home/ciril/.local/share
ciril@bigmama ~ % 
[1]  + 19855 done       luakit wikipedia.org
ciril@bigmama ~ % sqlite3 /home/ciril/.local/share/luakit/history.db 'select * from history
1|http://www.google.ch/?gws_rd=cr|Google|1|1375616521
2|http://www.wikipedia.org/|Wikipedia|1|1375616566
ciril@bigmama ~ % luakit "luakit://history" & # will be empty
[1] 19917
2 ciril@bigmama ~ % awk -v 'RS=\0' -F= '$1=="XDG_DATA_HOME" {print $2}' /proc/19917/environ
/home/ciril/.local/share
ciril@bigmama ~ %

Thank you for your help, and of course for this superior browser smile

Offline

#1113 2013-08-08 15:58:46

mrawfull
Member
Registered: 2011-11-26
Posts: 24

Re: luakit browser framework (almost with jQuery!)

When you are running only one tab and you close it, how to make it so that it goes to your luakit://bookmarks/ instead of about:blank?


[edit] >>> ok n/m, I seem to have made it work by modifying line 611 of window.lua

611 old:             w:new_tab("about:blank", false)

611 new:            w:new_tab("luakit://bookmarks/", false)

Last edited by mrawfull (2013-08-29 21:34:08)

Offline

#1114 2013-09-09 21:47:21

mrawfull
Member
Registered: 2011-11-26
Posts: 24

Re: luakit browser framework (almost with jQuery!)

How to make it so that bookmarks page automatically has either :open or :tabopen mode enabled? So whenever I go to bookmarks I can type an address right away without having to press o or t first.

Offline

#1115 2013-10-10 21:16:15

dz
Member
Registered: 2013-08-21
Posts: 16

Re: luakit browser framework (almost with jQuery!)

e: nm

Last edited by dz (2013-10-13 03:11:16)

Offline

#1116 2013-11-06 13:08:47

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: luakit browser framework (almost with jQuery!)

hi guys, is it possible to have luakit just using html5? or does anyone know if facebook can be loaded using html5 in luakit?

Offline

#1117 2014-03-07 06:19:57

sw2wolf
Member
From: China
Registered: 2009-06-08
Posts: 99
Website

Re: luakit browser framework (almost with jQuery!)

How can i open TAB background ?


e^(π⋅i) + 1 = 0

Offline

#1118 2014-03-07 15:19:18

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 121
Website

Re: luakit browser framework (almost with jQuery!)

yabasta wrote:

hi guys, is it possible to have luakit just using html5? or does anyone know if facebook can be loaded using html5 in luakit?

That is nonsense. HTML5 is not something the browser "uses", but rather a format the markup is provided in by a site or server. The browser simply interprets and renders it.


Fear me! I have root! Sometimes...

Offline

#1119 2014-03-08 01:34:46

sw2wolf
Member
From: China
Registered: 2009-06-08
Posts: 99
Website

Re: luakit browser framework (almost with jQuery!)

luakit  is great ! Now i am using it instead of Opera.  However, there are some questions left:
1) How to open Tab background
Ctrl+clicking works!

2) How to close Tab using mouse instead of Ctrl+W/d
N/A

3)How to make luakit know *.lua in ~/luakit/share/luakit/lib
Adding

package.path = package.path .. ";" .. (os.getenv("HOME") .. "/luakit/share/luakit/lib") .."/?.lua"

into ~/.config/luakit/rc.lua doesnot work.


regards!

Last edited by sw2wolf (2014-03-13 07:52:33)


e^(π⋅i) + 1 = 0

Offline

#1120 2014-03-08 02:11:52

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,550

Re: luakit browser framework (almost with jQuery!)

Moved sw2wolf's post to this thread.


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

Offline

#1121 2014-03-08 09:01:32

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 124

Re: luakit browser framework (almost with jQuery!)

sw2wolf wrote:

luakit  is great ! Now i am using it instead of Opera.  However, there are 2 questions:
1) How to open Tab background
2) How to close Tab using mouse instead of Ctrl+W/d

regards!

1) `F` instead of `f`. Have a look at `:help` for more keybindings.
2) Can't be done at present, but you're welcome to have a go at coding it in. The sources are on GitHub.

Offline

#1122 2014-03-13 15:53:03

jenerated
Member
Registered: 2014-02-05
Posts: 5

Re: luakit browser framework (almost with jQuery!)

zoqaeski wrote:
sw2wolf wrote:

luakit  is great ! Now i am using it instead of Opera.  However, there are 2 questions:
1) How to open Tab background
2) How to close Tab using mouse instead of Ctrl+W/d

regards!

1) `F` instead of `f`. Have a look at `:help` for more keybindings.
2) Can't be done at present, but you're welcome to have a go at coding it in. The sources are on GitHub.

Hmm? You can close a tab by middle-clicking on it.

Offline

#1123 2014-03-14 06:41:26

sw2wolf
Member
From: China
Registered: 2009-06-08
Posts: 99
Website

Re: luakit browser framework (almost with jQuery!)

jenerated wrote:
zoqaeski wrote:
sw2wolf wrote:

luakit  is great ! Now i am using it instead of Opera.  However, there are 2 questions:
1) How to open Tab background
2) How to close Tab using mouse instead of Ctrl+W/d

regards!

1) `F` instead of `f`. Have a look at `:help` for more keybindings.
2) Can't be done at present, but you're welcome to have a go at coding it in. The sources are on GitHub.

Hmm? You can close a tab by middle-clicking on it.

middle-clicking doesnot work here.


e^(π⋅i) + 1 = 0

Offline

#1124 2014-03-14 09:17:11

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 124

Re: luakit browser framework (almost with jQuery!)

jenerated wrote:
zoqaeski wrote:
sw2wolf wrote:

luakit  is great ! Now i am using it instead of Opera.  However, there are 2 questions:
1) How to open Tab background
2) How to close Tab using mouse instead of Ctrl+W/d

regards!

1) `F` instead of `f`. Have a look at `:help` for more keybindings.
2) Can't be done at present, but you're welcome to have a go at coding it in. The sources are on GitHub.

Hmm? You can close a tab by middle-clicking on it.

Oh! So you can. See how often I use the mouse in luakit? smile

Either way, in answer to the original question, if you edit your rc.conf you should be able to customise it. Look at how the other bindings function to figure out how. I've added a few ideas from dwb but I don't know whether to push them to the community repo yet as they change default functionality.

Offline

#1125 2014-03-15 01:43:12

sw2wolf
Member
From: China
Registered: 2009-06-08
Posts: 99
Website

Re: luakit browser framework (almost with jQuery!)

zoqaeski, do you mind showing us your rc.lua especially the mouse relative configuration ?


e^(π⋅i) + 1 = 0

Offline

Board footer

Powered by FluxBB