You are not logged in.
Mihai238 wrote:Hi guys! Is there a way I can copy the current URL to the clipboard?
Check if 'yY' is what you want.
I have found it with your help. 'yy' is what I wanted. This can be pasted than outside the application. Thanks a lot!
@portix Thanks for this really cool browser, keep it going.
Offline
@WonderWoofy
You're right, I didn't have dwb open, so I was trying to recall what it was.
@Mihai238
https://wiki.archlinux.org/index.php/Dwb#Basic_usage
Starting from a fresh configuration, use Sk to open the Keys page.
After pressing 'Sk', scroll to the 'Clipboard' section so see the current settings (and to modify them if you want).
Offline
How to bind numbers (on the main keyboard) in userscripts?
Something like:
bind ("g[n]", someFunction(n));
Binding like this:
bind ("g3", someFunction(3));
works only for numeric keyboard.
Offline
Binding numbers is not really supported in dwb's keyboard parsing mechanism, in
general numbers must be prepended to a shortcut, so you could bind 1g by simply
binding g, which won't work if you don't remap the default shortcuts because
there are several shortcuts that start with g. [n] only works with modifiers
like Control or Mod1. Fow now you have to implement keyboard handling yourself in
the script using the keyPress signal. I'm planning to replace the bind-function
with a register-function before the next release anyway that allows to
configure shortcuts bound in scripts on dwb:keys, i'll keep in mind to allow
also mapping of numbers.
Edit: In git binding of numbers now is possible, you could now bind them with
bind("g1", function() { .... });
Last edited by portix (2013-06-03 21:08:43)
Offline
Works perfectly, thank you.
The reason I wanted this functionality is to make it easier to follow search results:
//!javascript
// follow Nth search result
function followGoogleResult() {
/* argument[0] is the number of result (1-based) */
window.location = document.getElementsByClassName("r")[arguments[0]-1].getElementsByTagName("a")[0].href;
}
function followResult(n) {
/* can be extended to other search engines */
if ((/google\.com\/search/).test(tabs.current.uri)){
tabs.current.inject(followGoogleResult, n);
}
}
bind ("g1", function(){followResult(1);});
bind ("g2", function(){followResult(2);});
bind ("g3", function(){followResult(3);});
bind ("g4", function(){followResult(4);});
bind ("g5", function(){followResult(5);});
Offline
That's neat, i think i will write a small extension that also works on other search-sites.
Offline
Hi,
first of all, I only used dwb for 2 days now but I am already loving it and it's now my default browser.
There is an issues I ran into though - on some pages, after following hints to downloads I cannot follow any more hints (or to be more precise, when I press 'f' no hints are shown).
This persists until I refresh the website - an example can be found here on nyaa.eu.
If I follow the hints to a new tab, it seems to work, but I end up with a lot of empty tabs I have to manually close.
I'd be grateful for any help
Offline
I can reproduce it in the last release, in dwb-git it is no longer reproducible, so i assume that i accidently fixed it. You might want to try dwb-git or wait for the next release, but there will be no new release before july.
Offline
Great, I'll use the git version then, thanks for the quick answer.
Offline
I added a line to view.c so that pressing the mouse exits insert mode. The reasoning is that when I hit the mouse (most likely submitting a form) it would make sense to exit insert mode. Ideally (for me) pressing Enter should also return to normal mode (same reasoning - forms, such as google search). However Enter works differently depending on whether we're editing a TextArea or TextField (not sure what are the names in HTML, multi-line vs one-line text entry widget). Coupled with the fact that I don't know where dwb handles forms, I'm totally lost. Is such a change possible, and if yes, where should I look in the code?
EDIT: found the bitbucket page and submitted it as an 'enhancement' (or should it have been a 'proposal'?)
Last edited by spupy (2013-06-10 09:28:48)
There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.
Offline
Hello,
is there a way to overide the about:blank page in dwb? I am using the latest gtk2 git version. What I want to have is my custom locally available home page.
And thanks a lot for the browser!!!
Offline
@Liuuutas: Yes, the `startpage' option in the main settings. Press Ss to get there.
Offline
I have it already set up, but I want to overide the about:blank page, which I still sometimes see. Is it possible to do that?
Offline
@spupy: dwb doesn't handle forms at all, that's done by webkit, it's not possible for dwb to detect if a form is submitted with an ajax-request like google does with enabled javascript. If it is a real form submission without ajax it's possible to detect if a form was submitted (in view.c, view_navigation_policy_cb). I won't accept patches that let enter leave insert mode, websites can handle return themself, some sites submit forms when return is pressed, even if a textarea has focus, most don't. dwb did handle Return in the past but the behaviour was not consistent. If you really want this behaviour you can get it with a script, e.g.
//!javascript
var onKeyPress = Signal("keyPress", function(wv, event) {
if (event.name == "Return")
{
var tagName = JSON.parse(wv.focusedFrame.inject("return document.activeElement.tagName"));
if (tagName == "INPUT")
util.normalMode();
}
});
Signal.connect("changeMode", function(wv, mode) {
if (mode == Modes.InsertMode)
onKeyPress.connect();
else
onKeyPress.disconnect();
});
Last edited by portix (2013-06-10 10:08:49)
Offline
I have it already set up, but I want to overide the about:blank page, which I still sometimes see. Is it possible to do that?
I don't think that it is possible to override about:blank, about:blank is internally handled by webkit.
Offline
@portix: I see. Thanks for the explanation! I'll see what I can do with the code.
There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.
Offline
I can't build dwb-git
==> Starting build()...
Build options:
CC = cc
CFLAGS = -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -Werror=format-security -pipe --ansi -std=c99 -D_POSIX_SOURCE -O2 -g -D_BSD_SOURCE -D_NETBSD_SOURCE -pthread -I/usr/include/webkitgtk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/p11-kit-1 -I/usr/include/json-c -DWITH_LIBSOUP_2_38=1
LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro -lwebkitgtk-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -ljavascriptcoregtk-1.0 -lglib-2.0 -lgnutls -ljson-c -lpthread -lm
CPPFLAGS = -D_FORTIFY_SOURCE=2
cc convert_transport_security.c
gen hsts_preload.h
cc mktlds-header.c
gen tlds.h
cc exar.c
gen settings.html
gen keys.html
cc html.c
cc view.c
cc editor.c
cc adblock.c
cc visual.c
cc hsts.c
cc dom.c
cc domain.c
cc plugins.c
cc download.c
cc dwb.c
dwb.c: In function ‘dwb_update_status_text’:
dwb.c:990:9: warning: format ‘%lc’ expects argument of type ‘wint_t’, but argument 3 has type ‘wchar_t’ [-Wformat=]
g_string_append_printf(string, "%lc<span foreground='%s'>%ls</span><span foreground='%s'>%ls</span>%lc", bar_blocks[0], dwb.color.progress_full, buffer, dwb.color.progress_empty, cbuffer, bar_blocks[3]);
^
dwb.c:990:9: warning: format ‘%lc’ expects argument of type ‘wint_t’, but argument 8 has type ‘wchar_t’ [-Wformat=]
cc commands.c
cc soup.c
cc scripts.c
cc util.c
cc callback.c
cc local.c
cc completion.c
cc session.c
cc js.c
cc application.c
cc entry.c
cc -o dwb
/usr/bin/ld: warning: libicui18n.so.51, needed by /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicuuc.so.51, needed by /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicudata.so.51, needed by /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_toUnicode_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `UCNV_TO_U_CALLBACK_SUBSTITUTE_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_getMatchedLength_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_setAttribute_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_last_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_totitle_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_getCollator_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_tolower_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_open_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_getIntPropertyValue_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_isBoundary_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_openRules_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `udat_close_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_close_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_open_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_ispunct_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_close_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_charType_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_previous_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_setText_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_countAliases_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_isalnum_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_charDirection_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_foldCase_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_current_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uidna_IDNToASCII_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_open_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_getStandardName_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `unorm_normalize_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_preceding_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `u_strToUpper_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_following_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_getAttribute_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_getCombiningClass_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_getName_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_next_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucol_getStrength_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_reset_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_contains_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_setText_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `u_strToLower_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_addRange_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_first_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `UCNV_FROM_U_CALLBACK_ESCAPE_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_getRuleStatus_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_setPattern_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `u_strFoldCase_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_getAlias_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `udat_format_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_strcoll_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ublock_getCode_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_toupper_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_setOffset_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_setToUCallBack_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `ucol_getLocaleByType_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_charMirror_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_setFallback_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_setFromUCallBack_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_setSubstChars_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_isprint_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `usearch_next_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_countAvailable_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_open_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_cbFromUWriteUChars_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_fromUnicode_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_close_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libjavascriptcoregtk-1.0.so: undefined reference to `udat_open_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucol_setStrength_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `unorm_quickCheck_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_openPattern_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_add_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_getAvailableName_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `uset_addAll_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ucnv_cbFromUWriteBytes_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `ubrk_close_51'
/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../libwebkitgtk-1.0.so: undefined reference to `u_memcasecmp_51'
collect2: error: ld returned 1 exit status
make[1]: *** [dwb] Error 1
make: *** [src.subdir-make] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Last edited by karol (2013-06-13 20:01:26)
Offline
You have icu installed, right?
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Now I do and dwb builds fine - thanks ;-)
Does it mean that the PKGBUILD should be updated?
Last edited by karol (2013-06-13 21:06:05)
Offline
The answer seems to be positive: adding icu to makedepends definitely won't hurt.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
I think it is needed as a regular dependency
$ dwb
dwb: error while loading shared libraries: libicui18n.so.51: cannot open shared object file: No such file or directory
Other libwebkit browsers like midori, luakit and the dwb from the repos suffer from the same issue.
Edit: I didn't open more bug reports (e.g. for surf and uzbl) as I'm not sure if it isn't going to be fixed by adding icu as a dependency to e.g. webkitgtk2.
Last edited by karol (2013-06-14 08:19:19)
Offline
I think it must be fixed in the webkitgtk2-package, icu is a dependency of webkitgtk and for webkitgtk2 namcap says:
webkitgtk2 E: Dependency icu detected and not included (libraries ['usr/lib/libicuuc.so.51', 'usr/lib/libicui18n.so.51', 'usr/lib/libicudata.so.51'] needed in files ['usr/lib/libwebkitgtk-1.0.so.0.17.5', 'usr/lib/libjavascriptcoregtk-1.0.so.0.13.11'])
Edit: i opened a bug report.
Last edited by portix (2013-06-14 09:34:15)
Offline
Yup, https://bugs.archlinux.org/task/35785 with webkitgtk2 1.10.2-7 fixed it.
Thanks :-)
Offline
What with wrong ?, Mega.co.nz said download with modern browser opera, safari and chrome large file >100Mb . What browser agent work
Offline
It would be nice to get the menu links working.
http://angularjs.org
usability == arch + i3 + urxvt + vim + ranger + dwb + vlc + cmus + mutt + shitload of scripts
Offline