You are not logged in.

#326 2011-08-26 23:16:25

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

This is not possible, it would be easy adding an option that puts the statusbar below the tabs but not above because every tab has its own statusbar, but i think about adding an option for setting the statusbar on top at least in tabbed mode. 

I have uploaded a new package to the AUR: dwb-gtk3-hg which builds a gtk3-version.

Offline

#327 2011-08-26 23:56:18

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

I see. Below the tabs would be great; I was just being fussy!

Thanks


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#328 2011-08-27 00:19:19

firecat53
Member
From: Sammamish, Wa
Registered: 2007-05-14
Posts: 1,435
Website

Re: dwb - a webkit web browser

dwb-gtk3-hg works great! Well, as soon as I installed a gtk3 theme, that is smile Also added the .config/gtk-3.0/settings.ini with the name of the theme.

Nice work portix!

Scott

Offline

#329 2011-08-27 07:10:18

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

jsteel wrote:

I see. Below the tabs would be great; I was just being fussy!

Thanks

There is a now new setting called "top-statusbar" in the latest hg-version.

Offline

#330 2011-08-27 11:07:32

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

That's great; thank you!

When I type something like "f" to follow a hint, the status bar grows by a few pixels and pushes the page down. Is that something to do with my setup (font-sizes?) or can you reproduce this?


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#331 2011-08-27 11:59:40

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

The problem is that the entry-widget that is used for the addressbar is a few pixels higher than the label-widgets that are used for the status. If you don't want this behaviour you have to set the font for the entry smaller than the font for the rest of the ui. You get the same behaviour if the statusbar is at the bottom but the page isn't pushed up. However, i will try to find a solution for this tomorrow.

Offline

#332 2011-08-27 15:10:18

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

Set it to size 6 (a little on the small side) and it stays the same size; that'll do for the time being! Many thanks.


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#333 2011-08-27 21:01:11

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

The size issue is fixed with the latest revision.

Offline

#334 2011-08-27 22:49:09

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

Thanks for the fast changes! Looks great.

There's a typo "tabbed-brosing" in settings.

What does [+] mean in the status bar on some pages?


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#335 2011-08-27 22:54:11

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

A [+] means that you can go back in history and a [-] that you can go forward, [+-] means that you can go back and forward.

Offline

#336 2011-08-27 23:12:35

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

I see, thanks.

I'm trying to get some simple userscripts to run. I type "eu" and select one but they don't seem to work; here's an example: http://userscripts.org/scripts/review/100273


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#337 2011-08-27 23:46:01

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

jsteel wrote:

I see, thanks.

I'm trying to get some simple userscripts to run. I type "eu" and select one but they don't seem to work; here's an example: http://userscripts.org/scripts/review/100273

If you want to add javascript userscripts you have to put them in ~/.config/dwb/scripts. They are executed automatically before a site is loaded. The userscripts directory is for other scripts, e.g. shellscripts. But you can also execute javascript using shellscripts, e.g.

#!/bin/bash

echo "open javascript:$(< /path/to/your/javascriptfile)" | tr '\n' ' '
echo close

Offline

#338 2011-08-28 07:29:53

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

I've tried putting it in scripts and also calling it with a bash script but I can't get it to work.


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#339 2011-08-28 08:11:59

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

Javascript scripts are injected when the load is committed, but your script needs to be called after the page has loaded. You can fix this by modifying the script so that the script is executed when the page is loaded:

function baseToSelf() {
  var base = document.getElementsByTagName('base'); 
  for (i = 0; i < base.length; i++) {
    if (base[i].getAttribute('target') === '_blank') {
      base[i].setAttribute('target', '_self');
    }
  }

  var a = document.getElementsByTagName('a'); 
  for (i = 0; i < a.length; i++) {
    if (a[i].getAttribute('target') === '_blank') {
      a[i].setAttribute('target', '_self');
    }
  }
}
window.addEventListener("load", baseToSelf, false);

If you want to call the script from a bash script you have to remove all comments and all newlines, either in the script itself or you can use a tool like sed:

echo "open javascript:$(sed '/^\s*\/\//d' /path/to/script)" | tr '\n' ' '

Offline

#340 2011-08-29 21:04:10

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

I just tried this but it doesn't work for me; I wonder what I'm missing.


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#341 2011-08-30 08:06:13

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

Both work for me, if you use a bash-script it has to be executable of course. I can't figure out, why the javascript-script doesn't work for you. Maybe a wrong path or a typo?

Offline

#342 2011-08-30 15:50:37

jsteel
Trusted User (TU)
From: England
Registered: 2008-03-18
Posts: 115

Re: dwb - a webkit web browser

The above is in a file ".config/dwb/scripts/blank-mod.js". I even tried making this executable. Not sure what else to try.

EDIT: It seems like it works for some sites but not others. For example Google uses "target=_blank" when switching between different "Google services" but it still opens in a new tab/window. I wrote my own simple HTML page and it works fine with that.

Last edited by jsteel (2011-08-30 17:20:33)


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#343 2011-08-30 20:44:32

Gusar
Member
Registered: 2009-08-25
Posts: 3,398

Re: dwb - a webkit web browser

I've been going through all these lightweight browsers lately. Dwb comes the closest to what I'd like, except in one area: tab opening/closing behavior. I'd like new tabs to open at the end of the tabbar. And when I close a tab, I'd like the browser to swith to the right, instead of to the left like it does now. If I'll have to hack the source for this, it's fine by me, just tell me what I need to change.

Another thing is configuring mouse buttons, which is already reported on bitbucket as issue #38. Then there's the same thing I alredy mentioned in the luakit thread - the ability to remove specific items from history. I see dwb stores history in a simple text file, so I suppose I could just modify that, but a more elegant in-browser solution would be cool.

Oops, I just saw something else: I'm using the mouse.js script because I like autoscroll. But I just saw it interferes with pasting text. Could you modify the script so that it does not trigger autoscroll in text boxes? Also where can I find out what I can use for the mouse gestures? I'd like the up/down gestures to trigger scroll-to-top/scroll-to-bottom.

Offline

#344 2011-08-30 21:37:03

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

jsteel wrote:

The above is in a file ".config/dwb/scripts/blank-mod.js". I even tried making this executable. Not sure what else to try.

EDIT: It seems like it works for some sites but not others. For example Google uses "target=_blank" when switching between different "Google services" but it still opens in a new tab/window. I wrote my own simple HTML page and it works fine with that.

Do you know if this script works correct in other browsers?

Gusar wrote:

I'd like new tabs to open at the end of the tabbar. And when I close a tab, I'd like the browser to swith to the right, instead of to the left like it does now. If I'll have to hack the source for this, it's fine by me, just tell me what I need to change.

This was the behaviour some weeks ago. I could provide a patch for it but the problem is you have to patch it every time you update.

Gusar wrote:

Another thing is configuring mouse buttons, which is already reported on bitbucket as issue #38.

It is still on my todo list but this is a bigger task and i don't know when i find time to implement it.

Gusar wrote:

Then there's the same thing I alredy mentioned in the luakit thread - the ability to remove specific items from history. I see dwb stores history in a simple text file, so I suppose I could just modify that, but a more elegant in-browser solution would be cool.

I already started to implement the possibility to remove hints, quickmarks and bookmarks in the corresponding dwb://... pages. I hope to complete this task the next weekend.

Gusar wrote:

Oops, I just saw something else: I'm using the mouse.js script because I like autoscroll. But I just saw it interferes with pasting text. Could you modify the script so that it does not trigger autoscroll in text boxes? Also where can I find out what I can use for the mouse gestures? I'd like the up/down gestures to trigger scroll-to-top/scroll-to-bottom.

The autoscroll issue is solved, check revision 486, note that i moved all scripts that are not installed to examples. To scroll to bottom/top change line 59 to

window.scrollTo(0, 0);

and line 62 to

window.scrollTo(0, document.height - window.innerHeight);

Offline

#345 2011-08-31 00:14:08

Gusar
Member
Registered: 2009-08-25
Posts: 3,398

Re: dwb - a webkit web browser

portix wrote:

This was the behaviour some weeks ago. I could provide a patch for it but the problem is you have to patch it every time you update.

The ideal solution is a browser setting to control tab behavior. But if a patch gets me the feature faster, I don't mind needing to always apply it.

portix wrote:

I already started to implement the possibility to remove hints, quickmarks and bookmarks in the corresponding dwb://... pages. I hope to complete this task the next weekend.

Nice!

portix wrote:

The autoscroll issue is solved, check revision 486, note that i moved all scripts that are not installed to examples. To scroll to bottom/top change line 59 to

window.scrollTo(0, 0);

and line 62 to

window.scrollTo(0, document.height - window.innerHeight);

Thanks, works great.

Now there's two things I noticed. I'd like tab completion to be case insensitive. Say I've visited a website titled "Blah", I'd like ":tabopen bla<tab>" to match that website. Luakit works like that, and so do the "big" browsers. The other thing, opening a previous session, the tabs are in random order instead of the order they were in when I ZZ'd the browser.
With these two fixed and with my desired tab open/close behavior, I'd pretty much have the perfect little browser.


Edit: I figured out tab closing with a gesture. I also figured out diagonal gestures, but now I need further actions, which I can't figure out - switch to next tab, switch to previous tab, undo close tab.
Hmm, closing a tab doesn't always work. What I'm using is window.close(MouseGestures.target), it mostly works, but not always.

Last edited by Gusar (2011-08-31 12:59:31)

Offline

#346 2011-08-31 21:18:14

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

Gusar wrote:

The ideal solution is a browser setting to control tab behavior. But if a patch gets me the feature faster, I don't mind needing to always apply it.

I will think about adding an option for it.

Gusar wrote:

Now there's two things I noticed. I'd like tab completion to be case insensitive. Say I've visited a website titled "Blah", I'd like ":tabopen bla<tab>" to match that website. Luakit works like that, and so do the "big" browsers.

I already have a patch for it, i haven't applied it yet because it doesn't work correct with utf8 characters.

Gusar wrote:

The other thing, opening a previous session, the tabs are in random order instead of the order they were in when I ZZ'd the browser.
With these two fixed and with my desired tab open/close behavior, I'd pretty much have the perfect little browser.

I haven't noticed it yet but i will have a look into it.

Gusar wrote:

Edit: I figured out tab closing with a gesture. I also figured out diagonal gestures, but now I need further actions, which I can't figure out - switch to next tab, switch to previous tab, undo close tab.
Hmm, closing a tab doesn't always work. What I'm using is window.close(MouseGestures.target), it mostly works, but not always.

Switching between tabs is not possible from javascript and i won't implement mousegestures in C because dwb has a focus on keyboard control. I thought about adding a background page similar to chromiums background page, that would make it possible, but i won't implement this in the near future.

Offline

#347 2011-09-01 11:12:18

Gusar
Member
Registered: 2009-08-25
Posts: 3,398

Re: dwb - a webkit web browser

portix wrote:

Switching between tabs is not possible from javascript and i won't implement mousegestures in C because dwb has a focus on keyboard control.

Yeah, I get that. All of these lightweight browsers are geared towards the keyboard. Which is a bit unfortunate for me, but your mouse script already implements a lot of what I like, so thanks for that. Could you at least comment on why tab closing doesn't always work? Same javascript limitation as with tab switching? And the same also goes for reopening a closed tab?

Then there's something I noticed in all webkit-gtk browsers, even midori - links I've visited in previous browsing sessions are not marked visited. I use this a lot, for example to see which messages I've already read when I'm going through mailing list archives. Can something be done here or is this a webkit thing? I'm thinking the latter, considering all webkit-gtk browsers are like that. The more I dabble in these light browsers, the more I'm seeing why the "big" browsers are, well, big.
Edit: Found info on this, it's a webkit-gtk bug: https://bugs.webkit.org/show_bug.cgi?id=51747

Last edited by Gusar (2011-09-01 19:19:03)

Offline

#348 2011-09-02 08:54:13

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

Gusar wrote:

Yeah, I get that. All of these lightweight browsers are geared towards the keyboard. Which is a bit unfortunate for me, but your mouse script already implements a lot of what I like, so thanks for that. Could you at least comment on why tab closing doesn't always work? Same javascript limitation as with tab switching? And the same also goes for reopening a closed tab?

I cannot reproduce that closing tabs doesn't always work, maybe the mousegesture doesn't work always correct. Reopening a closed tab is not possible, the scripts are executed in the context of the tab, they don't know anything about other tabs.

Offline

#349 2011-09-28 16:28:30

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: dwb - a webkit web browser

Hello Portix,

really nice browser. It's going to replace Opera on my netbook.
Though there are some minor things that bother me:
1. Is there a key for "stop loading page". There are some pages with lots of pictures tht don't need to be fully loaded.
2. I want to set "Focus previous view", "Focus next view" on the "1" and "2" keys, but it does not work with the keys on the "normal" keyboard, but only with the keys on the numpad. Have I missed something or is it this intended?
3. Would you add a "fast forward" and "rewind" functionality like in Opera (http://operawiki.info/whyopera) in a future release?
4. How does the quicksearch stuff work? In the dwb FAQ you say that they can be accessed through "<keyword> <searchterm>", but it does not really work for me. Let say I have "g" as google quicksearch. Where do I have to enter "g <searchterm>" to do a google search?
5. Is there a way to assign more keys to an action (eg, "go back" to "backspace" and "H")?

Thank you,

Vlad

PS: Where does dwb/webkit keep cached files,cookies, etc?
Havewn't found anything under .config or .cache/webkit.

Last edited by DonVla (2011-09-28 16:41:51)

Offline

#350 2011-09-28 17:03:39

portix
Member
Registered: 2009-01-13
Posts: 755

Re: dwb - a webkit web browser

DonVla wrote:

1. Is there a key for "stop loading page". There are some pages with lots of
pictures tht don't need to be fully loaded.

There wasn't a shortcut that stops loading the page, but i have just added one (default bound to Control-s). If you use the snapshot version you have to wait some days but it is available in the hg-version.

DonVla wrote:

2. I want to set "Focus previous view", "Focus next view" on the "1" and "2" keys, but it does not work with the keys on the "normal" keyboard, but only with the keys on the numpad. Have I missed something or is it this intended?

Indeed this is intended. The number keys are used as numerical modifiers, for example 5j scrolls 5 steps down so the keys 0-9 cannot be mapped to a function.

DonVla wrote:

3. Would you add a "fast forward" and "rewind" functionality like in Opera (http://operawiki.info/whyopera) in a future release?

I never heard of this feature but sounds like a great feature. If i figure out how to implement this i would do it but it sounds not very trivial.

DonVla wrote:

4. How does the quicksearch stuff work? In the dwb FAQ you say that they can be accessed through "<keyword> <searchterm>", but it does not really work for me. Let say I have "g" as google quicksearch. Where do I have to enter "g <searchterm>" to do a google search?

You have to add searchengines and keywords if you want to use this feature, if you want to add google with keyword g, go to google, press 'gs', enter the keyword. The first engine you add will then be your default searchengine, you don't need to enter a keyword for your default searchengine.

DonVla wrote:

5. Is there a way to assign more keys to an action (eg, "go back" to "backspace" and "H")?

Currently there is no way to assign more keys, i was planning to implement it but it has not a very hight priority for me since i would rarely use this feature.

Offline

Board footer

Powered by FluxBB