You are not logged in.

#501 2012-01-13 12:06:44

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

portix wrote:

I'm not using the formfiller script anymore but if you have a fix for it I would include it in the source

I rewrote it in Perl:

#! /usr/bin/perl
# dwb: Control Mod1 f
# The file referenced by $FORMS needs to be formated as follow:
# url name1 value1 name2 value2 ...

use strict;

my $FORMS = "$ENV{'XDG_CONFIG_HOME'}/dwb/forms";
my $SUBMIT = 0;
my $url = $ARGV[0];
my $cmd = 'var elt;';

open FILE, "<", "$FORMS" or die $!;

while (my $line = <FILE>) {
    chomp($line);
    my @infos = split(/ /, $line);
    my $f_url = shift(@infos);
    if (index($url, $f_url) == 0) {
        while (@infos) {
            my $name = shift(@infos);
            my $value = shift(@infos);
            $cmd .= "elt = document.getElementsByName('$name')[0]; set_value(elt,'$value');"
        }
        if ($SUBMIT) {
            $cmd .= "elt.form.submit();"
        }
        last;
    }
}

close FILE;

print "execute_javascript $cmd\n";

And I extracted the JS function:

function set_value(elt, val) {
    if (elt.type == "checkbox" || elt.type == "radio") {
        elt.checked = (val.toLowerCase() !== 'false' && val !== '0');
    } else {
        elt.value = val;
    }
}

Last edited by bloom (2012-01-13 12:54:30)


gh · da · ds

Offline

#502 2012-01-13 17:46:36

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: dwb - a webkit web browser

Clicking on a link with ctrl pressed doesnt open them in a new tab, intended behaviour or bug ?

Last edited by TheLemonMan (2012-01-13 17:46:47)

Offline

#503 2012-01-13 20:23:40

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

It would be nice to be able to disable the download path confirmation dialog.


gh · da · ds

Offline

#504 2012-01-13 20:33:10

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

Re: dwb - a webkit web browser

bloom wrote:
portix wrote:

I'm not using the formfiller script anymore but if you have a fix for it I would include it in the source

I rewrote it in Perl:

#! /usr/bin/perl
...

And I extracted the JS function:
...

Thanks, i will include it. I can also add the title to the arguments list.

TheLemonMan wrote:

Clicking on a link with ctrl pressed doesnt open them in a new tab, intended behaviour or bug ?

This isn't a bug, pressing Button2 opens a link in a new tab. Control-Button1 is used for selecting text inside links.

bloom wrote:

It would be nice to be able to disable the download path confirmation dialog.

I will think about adding an option for it.

Offline

#505 2012-01-13 20:45:01

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

Re: dwb - a webkit web browser

bloom wrote:

I need the title of the page in one of my script: could you provide it as $3?

It is added to the list of commands, the arguments are now url, title, name of the profile, the numerical modifier and an optional argument for the script, so title is $2 now.

Offline

#506 2012-01-13 20:59:22

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: dwb - a webkit web browser

portix wrote:

This isn't a bug, pressing Button2 opens a link in a new tab. Control-Button1 is used for selecting text inside links.

Pressing button2 brings the context menu here

Offline

#507 2012-01-13 21:07:52

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

Re: dwb - a webkit web browser

TheLemonMan wrote:

Pressing button2 brings the context menu here

Nope, that would be button3. Button2 is middle-click.

Offline

#508 2012-01-13 21:17:01

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

Re: dwb - a webkit web browser

It seems that ctrl button1 is the common shortcut in most browsers besides button2 i might also add ctrl-button1 since ctrl + button1-click currently does nothing.

Offline

#509 2012-01-14 09:55:21

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

Here's what I propose for the focus movement after tab deletion:

— The focus should move to one of the neighboring tabs (left or right).
— If one of the (neighboring) tabs is unvisited then the focus should move to that tab.
— If both of the tabs are unvisited or visited then the focus should move to most recently created tab.
(— And of course, if one of the tabs is missing then the focus should move to the non missing one.)


gh · da · ds

Offline

#510 2012-01-14 15:00:25

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: dwb - a webkit web browser

Thanks alot portix for the fix for the custom keys, when the file isn't allready available!

Also, I would also love, like bloom, an option for disabling the download path... I've many times previously thought about suggesting it, but I always hesitated because of the "spawn with ..." toggling option(ctrl+x), but if it someway could still be possible(well, I guess that the "spawn with" option then just wouldn't be available if there was an option for disabling the download path?).

Thanks also bloom, for posting that perl script for form-filling...

-- EDIT --

Thanks you sooo much, bloom and portix; you guys just simply rocks!

I've just now configured the two custom keys for fast-forward/backwards with '[' and ']', and it works perfectly! That's just simply an awesome addition to this allready brilliant browser!

Thanks again!

Last edited by mhertz (2012-01-14 16:58:05)

Offline

#511 2012-01-14 18:30:59

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

@mhertz: my pleasure.

If I browse to
http://twitter.com/cr4shd

Then, press 'F' and type the hint of the pic.twitter.com link (30 Nov), dwb freezes.

It also freezes if I just click the link.

Last edited by bloom (2012-01-14 20:32:17)


gh · da · ds

Offline

#512 2012-01-14 18:50:19

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

Re: dwb - a webkit web browser

bloom wrote:

If I browse to
http://twitter.com/cr4shd

Then, press 'F' and type the hint of the pic.twitter.com link (30 Nov), dwb freezes.

It also freezes if I just click the link.

It's an issue with all tweets, click on them and the browser freezes. Un-maximize the window, it'll work then. Which is just plain weird. Oh, and this is a webkit-gtk bug, it affects Midori too.

Last edited by Gusar (2012-01-14 18:50:42)

Offline

#513 2012-01-15 11:55:49

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

Re: dwb - a webkit web browser

There is a new option 'download-no-confirm' now, if download-directory is set it downloads immediatly without asking for a path.
The twitter issue is indeed a webkit bug.

Offline

#514 2012-01-15 12:37:26

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: dwb - a webkit web browser

Outstanding! Thanks again!

Offline

#515 2012-01-15 15:56:01

clod89
Member
Registered: 2011-11-14
Posts: 18

Re: dwb - a webkit web browser

when browsing 4chan if i open a link a new tab with F the browser crashes, if i re-launch it though the new tab has been opened, but this just happens randomly, other times it just works fine.

Last edited by clod89 (2012-01-15 15:57:37)

Offline

#516 2012-01-15 16:01:05

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: dwb - a webkit web browser

Yeah, I can also reproduce that here...

Offline

#517 2012-01-15 19:16:37

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

portix wrote:

There is a new option 'download-no-confirm' now, if download-directory is set it downloads immediately without asking for a path.

Thanks for that!

Is there a command I could bind 'C-j' to, so that it becomes the equivalent of 'return' in the status bar?

I've tried overriding the default hints.js (I want to add padding and round corners) by copying it in $XDG_CONFIG_HOME/dwb/scripts/ but it doesn't seem to be taking precedence...

Could you add a command line option such that 'dwb -t foo', for example, will open 'foo' in a new tab in the most recent dwb instance (or in a new dwb instance if there is none)?

Could you provide some feedbacks regarding this:
https://bbs.archlinux.org/viewtopic.php … 2#p1040592
?


gh · da · ds

Offline

#518 2012-01-16 04:12:41

redhalo
Member
Registered: 2009-08-11
Posts: 22

Re: dwb - a webkit web browser

Is there a way I can turn off the icons on the tabs?

Offline

#519 2012-01-16 10:51:35

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

Re: dwb - a webkit web browser

bloom wrote:

Is there a command I could bind 'C-j' to, so that it becomes the equivalent of 'return' in the status bar?

Currently there is no command to bind another key to return, i'll put it on my todo list.

bloom wrote:

I've tried overriding the default hints.js (I want to add padding and round corners) by copying it in $XDG_CONFIG_HOME/dwb/scripts/ but it doesn't seem to be taking precedence...

You don't need to override the hints.js script, you can use a custom stylesheet for that using the classname dwb_hint:

.dwb_hint { padding: ...; border-radius: ... }
bloom wrote:

Could you add a command line option such that 'dwb -t foo', for example, will open 'foo' in a new tab in the most recent dwb instance (or in a new dwb instance if there is none)?

There is the single instance setting. I will not add an option for opening tabs in existing instances if single-instance is not set.

bloom wrote:

Could you provide some feedbacks regarding this:
https://bbs.archlinux.org/viewtopic.php … 2#p1040592
?

This will not get the default tab behaviour, i thought already about making this easily configurable. There will be an option for it if i have a solution.

Is there a way I can turn off the icons on the tabs?

There is a new option 'enable-favicon' in last revision.

Offline

#520 2012-01-16 13:26:57

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

Re: dwb - a webkit web browser

bloom wrote:

Is there a command I could bind 'C-j' to, so that it becomes the equivalent of 'return' in the status bar?

Two new shorcuts were added: entry_confirm and entry_escape.

Offline

#521 2012-01-16 13:35:26

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

There is a shortcut for "show bookmarks in pop-up" and when I use it bookmarks are shown in a black popup window. There doesn't seem to be a way to choose the bookmark that I want. I have tried clicking, arrow keys, j and k... I'm sure I missed something...

*edit*
... OK found it on page 6: Use tab & shift-tab to scroll.

Last edited by stryder (2012-01-16 13:39:12)

Offline

#522 2012-01-16 13:40:15

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

Re: dwb - a webkit web browser

stryder wrote:

There is a shortcut for "show bookmarks in pop-up" and when I use it bookmarks are shown in a black popup window. There doesn't seem to be a way to choose the bookmark that I want. I have tried clicking, arrow keys, j and k... I'm sure I missed something...

You can choose the bookmark pressing (Shift)-Tab and select it with return.

Offline

#523 2012-01-16 13:55:08

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

portix wrote:
bloom wrote:

Is there a command I could bind 'C-j' to, so that it becomes the equivalent of 'return' in the status bar?

Two new shorcuts were added: entry_confirm and entry_escape.

Thanks!

Bug report: dwb crashes on 'yank_title' if the current page's title is empty.


gh · da · ds

Offline

#524 2012-01-16 14:02:03

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

Re: dwb - a webkit web browser

bloom wrote:

Bug report: dwb crashes on 'yank_title' if the current page's title is empty.

Fixed.

Offline

#525 2012-01-16 14:03:37

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

portix wrote:

Two new shorcuts were added: entry_confirm and entry_escape.

By looking at the commit, I can tell there's a little mistake: 'C-g' should be 'entry_escape' and 'C-j' should be 'entry_confirm'.

Last edited by bloom (2012-01-16 14:04:04)


gh · da · ds

Offline

Board footer

Powered by FluxBB