You are not logged in.

#876 2012-07-03 10:23:59

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Re: dwb - a webkit web browser

Hi,

dwb doesn't pick up my $http_proxy and $no_proxy variables. It allows you to specify a proxy in the settings, but there is no ignore list. When toggling the proxy with Ctrl+p, the proxy defined in the settings always remains active so I cannot turn it off without removing the "proxy-url" entry in the settings.

I'm using the latest stable version.

Many thanks


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

Offline

#877 2012-07-03 11:59:15

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: dwb - a webkit web browser

jsteel wrote:

Hi,

dwb doesn't pick up my $http_proxy and $no_proxy variables. It allows you to specify a proxy in the settings, but there is no ignore list. When toggling the proxy with Ctrl+p, the proxy defined in the settings always remains active so I cannot turn it off without removing the "proxy-url" entry in the settings.

I'm using the latest stable version.

Many thanks

For me it does pick up the $http_proxy variable, but it will only have effect if the settings "proxy" is set to true.

Ctrl+p works for me too, except that the settings page (dwb://settings) doesn't reflect the new value, probably due to it being created from $XDG_CONFIG_CONFIG/dwb/settings, and not the settings in memory.

I tested this by using a off-site proxy, visiting and reloading http://whatismyip.org while toggling the proxy false/true with Ctrl-P a few times to make sure my IP-address was different.

Offline

#878 2012-07-04 20:06:21

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Re: dwb - a webkit web browser

OK I see. I'll try not setting the proxy-url when I'm back at work tomorrow and see if it picks up my variables.

I would like to adjust the size/padding of the bars without affecting the font size. Is that currently possible?

Many thanks


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

Offline

#879 2012-07-04 20:11:45

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

Re: dwb - a webkit web browser

I'll have a look into the proxy thing. There was already a feature request about padding in the statusbar, i closed the ticket with 'won't fix' and sent the requester a patch, maybe i'll apply the patch to the main branch.

Offline

#880 2012-07-04 21:33:38

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Re: dwb - a webkit web browser

Just found the patch; it's perfect! Cheers.


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

Offline

#881 2012-07-04 22:05:52

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: dwb - a webkit web browser

portix wrote:

Tags for bookmarks are on my todo list but i don't know when they will be added. But you can have more than 26 quickmarks, quickmarks can also be complete words. If you want to create a quickmark for NY Times you can add a quickmark with m nyt and open it with b nyt, it is also possible to tabcomplete quickmarks.

Nice, I didn't know that yet, but it works like a charm. Thanks for making quickmarks much more usable!

Offline

#882 2012-07-09 14:37:52

brianb
Member
From: Montreal, QC
Registered: 2012-02-17
Posts: 81
Website

Re: dwb - a webkit web browser

After a couple weeks of using dwb, and comparing it with luakit/uzbl/pentadactyl, I think I'm in love! I've changed a lot of the keybindings to things that make a bit more sense to me, and added a few custom ones too. I love how easy it is to configure everything in dwb.

I just have two quick questions, and one comment.

(1) Is it possible to use the backspace key in a keybinding? I'd like to bind the new "toggle_tab" command to ctrl-backspace, but "Control @Backspace@" doesn't work.

(2) Is it possible to load a previously saved session from within an instance of dwb, e.g., by issuing something like ":load_session <session-name>"? And relatedly, is it possible to delete a saved session either from within dwb or from the command line, without having to manually delete the relevant lines from the session file?

(3) I noticed in one of the commit messages that there is a new "sanitize" command--very useful! However, it's not yet in the man pages or in dwb:keys. It'd be useful to be able to bind it to something.

Thanks!

Brian

P.S. For those interested, here is a custom keybindings you might find useful. It lets you press "cc" to totally clear all tabs, leaving you with one blank tab with no history (for that tab). It's useful when you want to start fresh (or quickly hide tabs from someone approaching your desk...), but you can still undo the closed tabs if you need to.

cc:tab_new;;only;;clear_tab

Offline

#883 2012-07-09 19:51:38

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

Re: dwb - a webkit web browser

brianb wrote:

(1) Is it possible to use the backspace key in a keybinding? I'd like to bind the new "toggle_tab" command to ctrl-backspace, but "Control @Backspace@" doesn't work.

(2) Is it possible to load a previously saved session from within an instance of dwb, e.g., by issuing something like ":load_session <session-name>"? And relatedly, is it possible to delete a saved session either from within dwb or from the command line, without having to manually delete the relevant lines from the session file?

(3) I noticed in one of the commit messages that there is a new "sanitize" command--very useful! However, it's not yet in the man pages or in dwb:keys. It'd be useful to be able to bind it to something.

1. This is now possible in with the latest revision, but it is @BackSpace@ not @Backspace@.

2. This is currently not possible, but i consider adding such a command.

3. Yeah, i know that it is not mentioned in the man page, it is not in the man page because i don't know if i keep sanitize in the current form. It doesn't appear in dwb:keys because sanitize can also take an argument, e.g. :sanitize history will only clear history and :sanitize cookies will only clear cookies. There are several commands that are not listed in dwb:keys.

Offline

#884 2012-07-11 07:44:30

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

I'm having trouble getting JS userscripts to work (I've tried both custom keys and a #!javascript userscript) - any hints would be great.

The custom key I'm trying is:

MM:open javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://mlkshk.com/static/straw/compact.js?r='+Math.random()*99999999);document.body.appendChild(e)})());

The userscript is pretty much the same except it's in the following format:

bind("gM", function(){
  tabs.current.inject(blahblah);
}, "mlkshk");

where "blahblah" is a non-encoded javascript snippet.

The userscript isn't recognized at all (i.e., "no userscripts available" when pressing "eu") and nothing "appears" to happen when using the custom key version. Is there some way of getting debugging output from dwb when fiddling with this sort of thing?

Thanks.


[edit]
I've just realized that the link in the snippet above loads more JS - that's clearly the issue and I'll play with that JS a bit.
Debugging output would still be handy smile

Last edited by syngin (2012-07-11 07:48:13)

Offline

#885 2012-07-11 08:16:05

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

Re: dwb - a webkit web browser

You have to decode the javascript snippet, i.e. %20 must be replace with ' '. The shortcut 'eu' is only for userscripts that doesn't use the javascript api, it is the shortcut for 'execute userscript' but scripts that use the javascript api cannot be executed, they are only parsed on startup. Using the javascript api you could try

#!javascript

var myScript = "var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://mlkshk.com/static/straw/compact.js?r='+Math.random()*99999999);document.body.appendChild(e);");

bind("gM", function(){
  tabs.current.inject(decodeURI(my);
}, "mlkshk");

For javascript snippets you can use the web inspector, if there is an error in a script that use the javascript api dwb will print the error to stderr.

Offline

#886 2012-07-12 00:15:06

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

Thanks portix; that worked a treat. I've included the slightly mended script you posted just in case any one else here uses mlkshk. And thanks for a great browser UI.

#!javascript

var myScript = "var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://mlkshk.com/static/straw/compact.js?r='+Math.random()*99999999);document.body.appendChild(e);";

bind("gM", function(){
  tabs.current.inject(decodeURI(myScript));
}, "mlkshk");

Offline

#887 2012-07-12 05:53:56

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

Re: dwb - a webkit web browser

There was an mistake in my post, you don't need decodeURI if %20 is already replaced with a space.

Offline

#888 2012-07-13 00:26:43

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

portix wrote:

There was an mistake in my post, you don't need decodeURI if %20 is already replaced with a space.

I'll admit, I was a little confused about that smile

Offline

#889 2012-07-19 00:13:00

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

Ocassionally when using dwb, the command bar stops accepting input correctly. i.e., if I press "O" (tabopen), there's no blinking cursor in the command bar and the next letter I type gets sent as a command. A restart solves it, but obviously not ideal. Any ideas?

Offline

#890 2012-07-19 00:15:57

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

Re: dwb - a webkit web browser

Are you using the gtk3 version?

Offline

#891 2012-07-19 00:19:44

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

Why, yes I am. The only reason is that when I compile the GTK2 version, I get huge black borders around widgets.

Offline

#892 2012-07-19 00:26:52

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

Re: dwb - a webkit web browser

The missing input focus is a gtk3 bug, i think it only appears in non reparenting window managers. I implemented some testcases a few months ago and it is also reproducible in a simple textbox inside a window.

Offline

#893 2012-07-19 00:29:52

syngin
Member
From: Melbourne
Registered: 2011-03-29
Posts: 39

Re: dwb - a webkit web browser

Righto; well, that's a pooper. Guess I'll have a crack at sussing out why GTK2 is a bit borky on this system. Thanks for the heads-up.

Offline

#894 2012-07-19 14:01:18

brianb
Member
From: Montreal, QC
Registered: 2012-02-17
Posts: 81
Website

Re: dwb - a webkit web browser

The latest dwb-hg pull breaks keybinding completion. I have auto-completion checked to true, but when I press, say, "g", I don't see a list of keybindings.

Before updating, I would press "g" and see things like: "gg scroll_top | gt buffers | ...". I could then tab through the possible keybindings.

Any idea what happened?

P.S. I hadn't updated dwb-hg in about a week, so it may not be the absolute latest version that is responsible.

Last edited by brianb (2012-07-19 14:02:14)

Offline

#895 2012-07-19 14:21:19

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

Re: dwb - a webkit web browser

brianb wrote:

The latest dwb-hg pull breaks keybinding completion. I have auto-completion checked to true, but when I press, say, "g", I don't see a list of keybindings.

Before updating, I would press "g" and see things like: "gg scroll_top | gt buffers | ...". I could then tab through the possible keybindings.

Any idea what happened?

P.S. I hadn't updated dwb-hg in about a week, so it may not be the absolute latest version that is responsible.

The new statusbar-padding setting broke the shorcut-completion, this is now fixed in tip.

Offline

#896 2012-07-19 14:32:36

brianb
Member
From: Montreal, QC
Registered: 2012-02-17
Posts: 81
Website

Re: dwb - a webkit web browser

portix wrote:

The new statusbar-padding setting broke the shorcut-completion, this is now fixed in tip.

Works again -- thanks!

Just a couple of other, minor issues.

1) pressing a normal letter like "g" shows the letter "g" at the far left of the status bar (plus the completions), but pressing ";" does not show ";" (it shows only the completions).

2) pressing "Control e" to open my editor produces a stray "e" in the status bar, which is not cleared even after quitting my editor. (Curiously, the "e" doesn't actually DO anything: no completions are visible, and pressing a key like "j" scrolls down instead of doing nothing; whereas pressing "e" normally shows completions, and followed by "j" does nothing since "ej" is not a keybinding.)

Offline

#897 2012-07-21 21:52:54

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: dwb - a webkit web browser

syngin wrote:

Righto; well, that's a pooper. Guess I'll have a crack at sussing out why GTK2 is a bit borky on this system. Thanks for the heads-up.

The GTK2 build seems to need Composite extension enabled for some reason.

@portix, how are the download tabs handled?
I get some flickering on monsterwm when there are some downloads going on. Might help me to figure it out

Offline

#898 2012-07-21 22:28:58

dabrado
Member
Registered: 2012-07-21
Posts: 15

Re: dwb - a webkit web browser

Is there a way for a (non-javascript) userscript to open a prompt in dwb and get some input from the user?

Specifically, I'm trying to mimic the behavior of the built-in command 'open', which will either take a URL via an argument, or if there is no argument, will prompt for one.

Thanks for any help on that!

Offline

#899 2012-07-22 16:14:32

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: dwb - a webkit web browser

Hi.
Is there a way to change background color of about:blank?

Thanks.

Offline

#900 2012-07-22 21:23:03

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

Re: dwb - a webkit web browser

Cloudef wrote:

how are the download tabs handled?
I get some flickering on monsterwm when there are some downloads going on. Might help me to figure it out

The download labels are simple gtklabels, the text on the label is updated when the download progress changes.

dabrado wrote:

Is there a way for a (non-javascript) userscript to open a prompt in dwb and get some input from the user?

Specifically, I'm trying to mimic the behavior of the built-in command 'open', which will either take a URL via an argument, or if there is no argument, will prompt for one.

Why don't you just use o? I don't know how this could be useful but here is a bash script:

#!/bin/bash

if [ "$DWB_ARGUMENT" ]; then 
  echo "open $DWB_ARGUMENT" > "$DWB_FIFO"
else 
  echo "open" > "$DWB_FIFO"
fi

There is no builtin possibility to change the color of about:blank. You can change the background color with a custom user stylesheet by setting the the body's background color, or with the following userscript

#!javascript

signals.connect("documentLoaded", function (wv) {
  if (wv.uri == "about:blank") {
    wv.inject("document.body.style.background = '#000';");
  }
});

Offline

Board footer

Powered by FluxBB