You are not logged in.

#426 2011-12-03 14:31:15

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

Re: dwb - a webkit web browser

vekin wrote:
portix wrote:

That would be relatively trivial to implement and i don't care about the window icon since i'm using a window manager that doesn't show window icons. But i'm not sure how reasonable this is. If this was the common behaviour of other webbrowsers i wouldn't implement it since then one couldn't distinguish between dwb and the other webbrowser through its window icon and i think this is the purpose of a window icon.

Ah you are right, I don't even know C and figured out how to do this in view.c with one line.


  if (pb) {
+    gtk_window_set_icon(GTK_WINDOW(dwb.gui.window), pb);
    rescale = gdk_pixbuf_scale_simple(pb, dwb.misc.tab_height, dwb.misc.tab_height, GDK_INTERP_BILINEAR);

But this only works if you really have on tab per instance, otherwise the windowicon has to be updated when the active tab changes.

Offline

#427 2011-12-03 15:17:00

vekin
Member
Registered: 2011-12-02
Posts: 4

Re: dwb - a webkit web browser

portix wrote:

But this only works if you really have on tab per instance, otherwise the windowicon has to be updated when the active tab changes.

I realise it is not the intended use and causes a few problems with the windows over writing config files.
I attached a link to an image so you could see why I prefer this behaviour.
http://i.imgur.com/VLTgZ.png

Offline

#428 2011-12-06 05:13:31

intrntbrn
Member
From: Germany
Registered: 2011-12-01
Posts: 66

Re: dwb - a webkit web browser

website icons as window icons: +1

Offline

#429 2011-12-08 03:37:12

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

Re: dwb - a webkit web browser

@portix

I'm using latest dwb-hg for x86_64, and i'm getting dwb quiting out and closing upon e.g. gmail, and also if searching in google for 'flash about' and going to the first link(where it tells you what flash version you've installed).

Alsom many flash pages does the same...

I'm using the flashplugin-beta from the aur, since that's a native x86_64 build, and as I don't want multi-lib with all it's clutered lib32 libs...

I've tried the same pages with midori, and that works without problem(also firefox, but as that isn't libwebkit, then not really relevant...)

I used to use dwb-hg on i686, untill a couple of days ago, where there where no problems at all, but since my old notebook broke and I have just gotten a new one with 4gb ram, then I installed arch64 and am now having these issues...

I don't think it's a flash issue since it's also failing on gmail and since it works in midori/firefox + that dwb has a flash-blocker anyways, which i've eabled...

Thanks in advance!

-- EDIT --

I've forgot to try disablig the plugin-blocker, to see if that was the issue and it was, so it seems there's an issue with the plugin-blocker then...

Last edited by mhertz (2011-12-08 03:42:30)

Offline

#430 2011-12-08 09:38:36

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

Re: dwb - a webkit web browser

mhertz wrote:

@portix

I'm using latest dwb-hg for x86_64, and i'm getting dwb quiting out and closing upon e.g. gmail, and also if searching in google for 'flash about' and going to the first link(where it tells you what flash version you've installed).

Alsom many flash pages does the same...

I'm using the flashplugin-beta from the aur, since that's a native x86_64 build, and as I don't want multi-lib with all it's clutered lib32 libs...

I've tried the same pages with midori, and that works without problem(also firefox, but as that isn't libwebkit, then not really relevant...)

I used to use dwb-hg on i686, untill a couple of days ago, where there where no problems at all, but since my old notebook broke and I have just gotten a new one with 4gb ram, then I installed arch64 and am now having these issues...

I don't think it's a flash issue since it's also failing on gmail and since it works in midori/firefox + that dwb has a flash-blocker anyways, which i've eabled...

Thanks in advance!

-- EDIT --

I've forgot to try disablig the plugin-blocker, to see if that was the issue and it was, so it seems there's an issue with the plugin-blocker then...

You are right, the was a bug in the plugin-blocker, it is fixed now.

Edit: btw, the 64-bit flashplugin is in extra, you don't need to install the 32-bit libs.

Last edited by portix (2011-12-08 09:49:07)

Offline

#431 2011-12-08 14:31:10

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

Re: dwb - a webkit web browser

Thanks alot, mate; it's really appreciated!

Also thanks for letting me know that there's a native 64bit flashplugin in extra.

CU, martin.

Offline

#432 2011-12-19 14:47:24

eduardo.eae
Member
From: Reconquista - Argentina
Registered: 2010-01-24
Posts: 69

Re: dwb - a webkit web browser

One thing that I would like is an option for hiding tabbar and statusbar at start. Like when "xx" or "Control F12" is pressed.
Great browser, it completly replaced firefox in my PC.

*EDIT: I'd also like to be able to use hints when watching the source-code.

Last edited by eduardo.eae (2011-12-19 14:49:29)

Offline

#433 2011-12-19 22:06:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: dwb - a webkit web browser

I'd also have a use for an option (command line switch) to hide tab and status bars at start.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#434 2011-12-19 23:27:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: dwb - a webkit web browser

Eduardo, for my purposes this little script does just what I need with the help of xdotool

#!/bin/bash
dwb -n "$1" &
sleep 0.1
xdotool key x key x

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#435 2011-12-20 00:03:24

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

Re: dwb - a webkit web browser

eduardo.eae wrote:

One thing that I would like is an option for hiding tabbar and statusbar at start.

I will add an option for it in the next days.

Offline

#436 2012-01-05 22:25:01

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

Re: dwb - a webkit web browser

Regarding the man page:

– Maybe you could drop the 'mode' in 'Normalmode', 'Insertmode', etc. and just refer to the Normal mode, the Insert mode, etc.

– I found a typo:

wf     Show hints, open link in a new view. (command hint_mode_nw).

(It should be 'new window'.)

– Maybe you should write 'case sensitive' instead of 'casesensitive'.

– Same remark for 'masterarea'.

– I don't see anything on how to apply per domain CSS…


gh · da · ds

Offline

#437 2012-01-05 22:42:15

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

Re: dwb - a webkit web browser

bloom wrote:

Regarding the man page:

– Maybe you could drop the 'mode' in 'Normalmode', 'Insertmode', etc. and just refer to the Normal mode, the Insert mode, etc.

– I found a typo:

wf     Show hints, open link in a new view. (command hint_mode_nw).

(It should be 'new window'.)

– Maybe you should write 'case sensitive' instead of 'casesensitive'.

– Same remark for 'masterarea'.

– I don't see anything on how to apply per domain CSS…

Thanks for reporting the typos, the manpage is a bit outdated anyway, e.g. there is no longer a master area in tip because tiling was dropped (mostly).
There will be a release in the next weeks and the man page will be updated before the release.
Currently it is not possible to apply stylesheets on a domain basis and i'm not sure if it will be possible in the future.

Offline

#438 2012-01-06 11:37:51

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

Re: dwb - a webkit web browser

I've tried the Insert mode on deviantart and I've got a few problems:

– If I press unbound keys, although I'm not in Insert mode, there're added to the search box.
– If I switch to Insert mode and hit 'C-w' I get the expected readline behavior but I'm being also thrown out of Insert mode.
– If I press 'C-h' in Insert mode, I being redirect to the start page.
– I would expect 'C-e' to jump to end of line, instead it's bound to 'edit in external editor' (can't 'Meta' be used instead of 'Control'?) and if I make some changes to the corresponding vim buffer and save it, the input field stays still ; I can't find the relevant script (`ext_editor.sh`?) in the output of `pacman -Ql dwb-hg`.
– I would expect 'C-j' to behave like its readline counterpart.


gh · da · ds

Offline

#439 2012-01-06 12:03:41

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

Re: dwb - a webkit web browser

bloom wrote:

I've tried the Insert mode on deviantart and I've got a few problems:

– If I press unbound keys, although I'm not in Insert mode, there're added to the search box.

This will not be  changed, if all unbounded keys are ignored one has to go in insert mode on all pages that use shortcuts which i find annoying.

bloom wrote:

– If I switch to Insert mode and hit 'C-w' I get the expected readline behavior but I'm being also thrown out of Insert mode.
– If I press 'C-h' in Insert mode, I being redirect to the start page.
– I would expect 'C-e' to jump to end of line, instead it's bound to 'edit in external editor' (can't 'Meta' be used instead of 'Control'?) and if I make some changes to the corresponding vim buffer and save it, the input field stays still ; I can't find the relevant script (`ext_editor.sh`?) in the output of `pacman -Ql dwb-hg`.
– I would expect 'C-j' to behave like its readline counterpart.

There are no readline shortcuts for textareas and input fields, only the default gtk shortcuts, some of them also cannot be implemented reliably, for example delete to beginning/end of the line.
There are only readline shortcuts for dwbs own input field. But i think you can change the editing shortcuts in your gtk settings.
You don't need a script for the external editor, you only need a valid 'editor' setting (gvim doesn't work and this won't be fixed but all other editors should work).

Offline

#440 2012-01-06 14:08:57

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

Re: dwb - a webkit web browser

portix wrote:

There are no readline shortcuts for textareas and input fields, only the default gtk shortcuts, some of them also cannot be implemented reliably, for example delete to beginning/end of the line.
There are only readline shortcuts for dwbs own input field. But i think you can change the editing shortcuts in your gtk settings.

I'm using luakit and I've set my gtk key theme to 'emacs'.
In luakit, on the same text field: hitting 'C-h' have the expected readline behavior (in dwb it triggers 'open_start_page' whenever I'm in Insert mode or not).
I also forgot to mention the fact that 'C-c' should have the same effect as 'esc' in dwb's input field.
I must correct what I said about 'C-w': it seems dwb stays in Insert mode, but the Insert mode notification of the status bar disappears.

portix wrote:

You don't need a script for the external editor, you only need a valid 'editor' setting (gvim doesn't work and this won't be fixed but all other editors should work).

I'll give it another try then.

Unrelated questions:
– I've seen a form loading script in the examples, but there's no script to add entries to the form file?
– Can I create a key binding to zoom to a specific zoom level?
– There's no built-in ']]' and '[[' next / previous page heuristics?


gh · da · ds

Offline

#441 2012-01-06 14:32:25

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

Re: dwb - a webkit web browser

Bloom wrote:

I'm using luakit and I've set my gtk key theme to 'emacs'.
In luakit, on the same text field: hitting 'C-h' have the expected readline behavior (in dwb it triggers 'open_start_page' whenever I'm in Insert mode or not).
I also forgot to mention the fact that 'C-c' should have the same effect as 'esc' in dwb's input field.
I must correct what I said about 'C-w': it seems dwb stays in Insert mode, but the Insert mode notification of the status bar disappears.

In insert mode the shortcuts that have a modifier aren't ignored, you may use pass-through mode then, in pass-through mode all keys are ignored by dwb except for escape of course.

Bloom wrote:

Unrelated questions:
– I've seen a form loading script in the examples, but there's no script to add entries to the form file?
– Can I create a key binding to zoom to a specific zoom level?
– There's no built-in ']]' and '[[' next / previous page heuristics?

Currently there is no script for adding entries to the form file, you have to use the webinspector or other tools to create the form file, but dwb will get a builtin formfiller.
I just replaced the zoom_normal function by a zoom function, you can now zoom to a specific level with [n]=, if n is omitted = will zoom to 100%.
Next/previous page is bound to H/J, you can change the shortcuts opening dwb://keys or on commandline pressing 'sk'.

Offline

#442 2012-01-06 18:01:53

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

Re: dwb - a webkit web browser

portix wrote:

In insert mode the shortcuts that have a modifier aren't ignored, you may use pass-through mode then, in pass-through mode all keys are ignored by dwb except for escape of course.

Shouldn't Normal mode bindings be inactive in Insert mode?
And why does the 'INSERT MODE' message disappear if I press 'C-w' in Insert mode?

portix wrote:

I just replaced the zoom_normal function by a zoom function, you can now zoom to a specific level with [n]=, if n is omitted = will zoom to 100%.

Great!
But can I bind, for example, 'C-8' to 'set_zoom_level(1.333)'?

portix wrote:

Next/previous page is bound to H/J, you can change the shortcuts opening dwb://keys or on commandline pressing 'sk'.

Sorry, I meant next and previous page of the current web page (e.g. luakit's default ']]' and '[[').
But I guess I can adapt luakit's scripts.

Last edited by bloom (2012-01-06 20:59:49)


gh · da · ds

Offline

#443 2012-01-06 18:29:23

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

Re: dwb - a webkit web browser

bloom wrote:

Great!
But can I bind, for example, 'C-8' to 'set_zoom_level(1.333)'?

This is not possible directly, however there is a workaround with a userscript:

#!/bin/bash
# dwb: Control [n]
[ $3 = 8 ] && echo "133zoom"
bloom wrote:

Sorry, I meant next and previous page of the current web page (e.g. luakit's default ']]' and '[[').
But I guess I can adapt luakit's scripts.

No, but i also think luakit does this with some javascript which also should work with dwb.

Offline

#444 2012-01-06 19:58:35

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

Re: dwb - a webkit web browser

Very nice, I didn't know about $3.
Thanks to your little snippet, I've translated my luakit zoom bindings to dwb:

#! /bin/bash
# dwb: Control [n]

ZOOM_LEVELS=(111 112 114 116 120 125 133 150 200)
key=$3
zindex=$((key - 1))
zlevel=''
[[ zindex -ge 0 ]] && zlevel=${ZOOM_LEVELS[$zindex]}
printf "${zlevel}zoom" 

Last edited by bloom (2012-01-06 20:48:01)


gh · da · ds

Offline

#445 2012-01-07 03:40:37

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

Re: dwb - a webkit web browser

With the latest commit custom shortcuts were introduced, you can now also define the shortcuts for zooming in dwb://keys or in ~/.config/dwb/<name of profile>/custom_keys. Multiple commands can be defined for a shortcut, the syntax is

<shortcut>:<command>;<command>;...

where command is of the form

[numerical modifier][command or command alias] [arg].

For zooming with Control 1-9 you can define

Control 1:111zo
Control 2:112zo
...

Offline

#446 2012-01-07 10:41:59

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

Re: dwb - a webkit web browser

Great!

Misc suggestions / bug reports:

– I've tried the Pass Through mode and I think it should be call Insert mode, in other words, I don't see what's the use of the current Insert mode...
open_editor doesn't work for me: if I am in Insert mode and I hit 'C-e' I get an urxvtc window with an empty vim buffer (even if the text area is not empty) pointing to a temporary file in '~/.cache/dwb/' whose name starts with 'edit', if I modify that buffer and quit vim with 'ZZ', nothing happens (and still, the corresponding file exists in dwb's cache).
– I've translated my luakit search engines to dwb (is there a reason for you to use '_dwb_search_submit_' instead of '%s'?) and I'll like to be able to use empty lines in that file (searchengines) but empty lines produce a seg fault...
– Maybe you could handle '~' in download-directory: I'm always reluctant to use absolute paths?

Last edited by bloom (2012-01-07 11:29:05)


gh · da · ds

Offline

#447 2012-01-07 13:23:11

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

Re: dwb - a webkit web browser

bloom wrote:

I've tried the Pass Through mode and I think it should be call Insert mode, in other words, I don't see what's the use of the current Insert mode...

The intention of insert mode was to allow the use of shortcuts with a modifier but i will think about remoing insert mode and calling pass through insert mode instead.

bloom wrote:

open_editor doesn't work for me: if I am in Insert mode and I hit 'C-e' I get an urxvtc window with an empty vim buffer (even if the text area is not empty) pointing to a temporary file in '~/.cache/dwb/' whose name starts with 'edit', if I modify that buffer and quit vim with 'ZZ', nothing happens (and still, the corresponding file exists in dwb's cache).

Have you changed the default editor setting, if so what is the editor you try to use. As i already said, gvim won't work and all other editors that detach from the parent process won't work either. I could fix this but as all editors that are opened in a terminal should work, i'm too lazy too fix it. I never noticed a problem with the default setting.

bloom wrote:

I've translated my luakit search engines to dwb (is there a reason for you to use '_dwb_search_submit_' instead of '%s'?) and I'll like to be able to use empty lines in that file (searchengines) but empty lines produce a seg fault...

The segfault is fixed, there is no specific reason why i'm not using '%s'.

bloom wrote:

Maybe you could handle '~' in download-directory: I'm always reluctant to use absolute paths?

Yes, i'll put it on my todo list.

Offline

#448 2012-01-07 13:44:45

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

Re: dwb - a webkit web browser

portix wrote:
bloom wrote:

open_editor doesn't work for me: if I am in Insert mode and I hit 'C-e' I get an urxvtc window with an empty vim buffer (even if the text area is not empty) pointing to a temporary file in '~/.cache/dwb/' whose name starts with 'edit', if I modify that buffer and quit vim with 'ZZ', nothing happens (and still, the corresponding file exists in dwb's cache).

Have you changed the default editor setting, if so what is the editor you try to use. As i already said, gvim won't work and all other editors that detach from the parent process won't work either. I could fix this but as all editors that are opened in a terminal should work, i'm too lazy too fix it. I never noticed a problem with the default setting.

No I didn't touch the defaults because I'm actually using urxvtc and vim.
I've just replaced 'urxvtc' by 'xterm' in the default command and sudenly it worked.
Then I remembered that 'urxvtc' don't behave like 'urxvt' regarding its parent process so I tried with 'urxvt' and it worked too.
Solved. Thanks.

Last edited by bloom (2012-01-07 13:51:20)


gh · da · ds

Offline

#449 2012-01-07 15:23:54

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

Re: dwb - a webkit web browser

Ahh, thanks alot for the tip, mate!

I've many times been close at writing a post about if I was somehow misunderstanding the 'external editor' functionality, since I also just gotten an empty vim and then I needed to copy the content too and from vim and dwb additionally at start of writing/end of...

Now i've just changed urxvtc to urxvt in dwb(and I have always had vim as defined editor), and now the function "auto-transfers" content beetween vim and dwb automatically!

This is simply now an awesome function now that i've gotten it to work propperly!

Thanks again!

Btw portix, what do you mean about ditching tiling _mostly_? I didn't used tiling in dwb myself, so I don't mind...

Last edited by mhertz (2012-01-07 15:31:50)

Offline

#450 2012-01-07 17:47:50

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

Re: dwb - a webkit web browser

quickmarks are broken (the corresponding section of the default startpage is empty and b[:graph:] is not working although the related entries exist in the quickmarks file).

I think it might be related to this commit:

https://bitbucket.org/portix/dwb/changeset/4495ad2fd7e3

Shouldn't it be (util.c, line 537)

if (!line)
    return NULL;

?

Last edited by bloom (2012-01-07 17:51:50)


gh · da · ds

Offline

Board footer

Powered by FluxBB