{{Article summary text|This article addresses the steps necessary to run and configure dwb.}}

{{Article summary text|This article addresses the steps necessary to run and configure dwb.}}

{{Article summary end}}

{{Article summary end}}

+

[[de:dwb]]

[[tr:dwb]]

[[tr:dwb]]

{{DISPLAYTITLE:dwb}}

{{DISPLAYTITLE:dwb}}

Line 9:

Line 10:

== Installation ==

== Installation ==

−

The {{Pkg|dwb}} package can be found in the [[Official Repositories|official repositories]] and can be installed with [[pacman]].

+

−

# pacman -S dwb

+

The {{Pkg|dwb}} package can be found in the [[official repositories]] and can be installed with [[pacman]]. There are also other versions in the [[AUR]]: {{AUR|dwb-git}}, {{AUR|dwb-gtk3}}, and {{AUR|dwb-gtk3-git}}.

−

There are also other versions in the [[AUR]]: {{AUR|dwb-git}}, {{AUR|dwb-gtk3}}, and {{AUR|dwb-gtk3-git}}.

+

== Basic usage ==

== Basic usage ==

−

Starting from a fresh configuration, use {{keypress|S}}{{keypress|k}} to open the ''Keys'' page. As you can see from there, most bindings are borrowed from [[Vim]] and [[Emacs]].

+

Starting from a fresh configuration, use {{ic|Sk}} to open the ''Keys'' page. As you can see from there, most bindings are borrowed from [[Vim]] and [[Emacs]].

−

Use {{keypress|:}} to access the command prompt. You can use {{keypress|Tab}} to auto-complete.

+

Use {{ic|:}} to access the command prompt. You can use {{ic|Tab}} to auto-complete.

Read the man page for more details and enable the {{ic|auto-completion}} option in the settings to help you learn the bindings.

Read the man page for more details and enable the {{ic|auto-completion}} option in the settings to help you learn the bindings.

Line 23:

Line 23:

$ man dwb

$ man dwb

−

====Navigation====

+

=== dwb-specific ===

o = enter url

o = enter url

O = enter url in new tab

O = enter url in new tab

−

f = spawn hints next to each hyperlink. You can use arrow keys to browse the hints while displaying their URI, or use the hint letters.

+

f = spawn hints. Use arrow keys to browse the hints while displaying their URI, or use the hint letters.

F = spawn hints in new tab

F = spawn hints in new tab

;b = spawn hints in new background tab

;b = spawn hints in new background tab

Line 41:

Line 41:

r = reload

r = reload

R = reload ignoring cache

R = reload ignoring cache

−

i = toggle_insert_mode (Esc works to go back to command mode much like vim)

−

Esc = back to normal mode

−

ctrl+n = back to normal mode

gi = go to the first input field and enter insert mode

gi = go to the first input field and enter insert mode

−

ctrl+e = open editable field in external editor. Very helpful for forums and wikis.

+

ctrl+e = open editable field in external editor. Useful for forums and wikis.

Press {{ic|v}} to switch to caret browsing, then press {{ic|space}} to toggle between caret and visual mode. Press {{ic|Esc}} one or two times to go back to normal mode. While in caret browsing, you can use the arrow keys to browse the different parts of the page. Hold {{ic|Shift}} to select text. Press {{ic|Enter}} to follow links.

−

: = enter command

+

−

xb = show/hide status bar

+

−

ZZ = exit

+

−

+

−

====Notes====

+

−

Press {{keypress|v}} to switch to caret browsing, then press {{keypress|space}} to toggle between caret and visual mode. Press {{keypress|Esc}} one or two times to go back to normal mode. While in caret browsing, you can use the arrow keys to browse the different parts of the page. Hold {{keypress|Shift}} to select text. Press {{keypress|Enter}} to follow links.

+

== Configuration ==

== Configuration ==

−

Almost everything can be configured from the ''Settings'' page. You can access it with {{keypress|S}}{{keypress|s}} by default.

+

The configuration files are stored in {{ic|$XDG_CONFIG_HOME/dwb/}} (usually {{ic| ~/.config/dwb/}}) and can be easily accessed through the web interface. Type {{ic|Ss}} to open the ''Settings'' page.

−

+

−

The configuration files are stored in {{ic|$XDG_CONFIG_HOME/dwb/}} (usually {{ic| ~/.config/dwb/}}).

+

=== Search engines ===

=== Search engines ===

−

Use {{keypress|g}}{{keypress|s}} to create a search engine from the first input field on the web page. Use {{keypress|Tab}} to switch between fields. Then enter a keyword.

+

Open your favorite search engine, type {{ic|gs}} to select the web page's first input field, and then enter a keyword associated with it.

−

Now you can use the keyword in the URI prompt to search directly on the corresponding website.

+

Now you can use the keyword in the URI prompt to search directly on the corresponding website. Typing queries directly in the address bar will search with the default search engine, which is the first entry in {{ic|$XDG_CONFIG_HOME/dwb/searchengines}}.

−

+

−

The first entry in {{ic|$XDG_CONFIG_HOME/dwb/searchengines}} will be the default search engine.

+

=== Custom keybinds ===

=== Custom keybinds ===

You can create custom key bindings by editing file {{ic|custom_keys}} in the profile directory. This is

You can create custom key bindings by editing file {{ic|custom_keys}} in the profile directory. This is

−

{{ic|~/.config/dwb/default}} by default. All keysyms which don't emit (multi)byte characters, must be enclosed in {{ic|@}}. One keybind can execute multiple dwb commands. These commands execute in same order as they are defined in bind, and must be separated by {{ic|;;}} separator. If the keybind's chord is already bound by dwb, it might be ignored (behaviour is not consistent). In such case one can try to check, whether there is collison with binds defined in {{ic|~/.config/dwb/keys}} and try to unbind the chord there (eg set it to nothing). Any running dwb instance will owerwrite {{ic|keys}} file on exit, so remember to do your modifications while dwb is not runing or use default dwb interface (''S k'').

+

{{ic|~/.config/dwb/default}} by default. All keysyms which don't emit (multi)byte characters, must be enclosed in {{ic|@}}. One keybind can execute multiple ''dwb'' commands. These commands execute in same order as they are defined in bind, and must be separated by {{ic|;;}} separator. If the keybind's chord is already bound by ''dwb'', it might be ignored (behaviour is not consistent). In such case one can try to check, whether there is collison with binds defined in {{ic|~/.config/dwb/keys}} and try to unbind the chord there (eg set it to nothing). Any running ''dwb'' instance will owerwrite {{ic|keys}} file on exit, so remember to do your modifications while ''dwb'' is not runing or use default ''dwb'' interface ({{ic|Sk}}).

{{hc|~/.config/dwb/default/custom_keys|<nowiki>

{{hc|~/.config/dwb/default/custom_keys|<nowiki>

Line 100:

Line 92:

== Extensions ==

== Extensions ==

−

dwb features an extension manager as a separate executable, ''dwbem''. To list all officially available extensions, use:

+

''dwb'' features an extension manager as a separate executable, ''dwbem''. To list all officially available extensions, use:

{{hc|dwbem -a|

{{hc|dwbem -a|

Line 127:

Line 119:

For more details, use {{ic|dwbem -I <extension>}} and read the [http://portix.bitbucket.org/dwb/resources/dwb.1.html dwb] and [http://portix.bitbucket.org/dwb/resources/dwbem.1.html dwbem] man pages.

For more details, use {{ic|dwbem -I <extension>}} and read the [http://portix.bitbucket.org/dwb/resources/dwb.1.html dwb] and [http://portix.bitbucket.org/dwb/resources/dwbem.1.html dwbem] man pages.

−

Below is a list of popular extensions (or add-ons) for which dwb has a built-in alternative:

+

Below is a list of popular extensions (or add-ons) for which ''dwb'' has a built-in alternative:

Restart dwb, use the ''adblock_subscribe'' command and choose your favorite filter (avoid using more than one filter to prevent duplicate entries that make the adblocker much slower).

+

Restart ''dwb'', use the ''adblock_subscribe'' command and choose your favorite filter (avoid using more than one filter to prevent duplicate entries that make the adblocker much slower).

== Userscripts ==

== Userscripts ==

−

dwb can execute .js or .sh scripts put in {{ic|~/.config/dwb/userscripts/}}. Make sure they are executable:

+

+

''dwb'' can execute .js or .sh scripts put in {{ic|~/.config/dwb/userscripts/}}. Make sure they are executable:

chmod +x ~/.config/dwb/userscripts/myscript.js

chmod +x ~/.config/dwb/userscripts/myscript.js

−

Below are some example scripts, see [http://portix.bitbucket.org/dwb/snippets/snippets.html dwb userscripts snippets] for more:

+

Below are some example scripts, see ''dwb'' [http://portix.bitbucket.org/dwb/snippets/snippets.html userscripts snippets] for more:

−

=== Fast-forward ===

+

=== defer-loading ===

−

Opera features a neat key binding which allows users to load to ne next/previous logical page by incrementing/decrementing the last URI digit. This is very useful for forum threads, documentation, and articles spread over several pages.

+

Prevents tabs from last session to load all at once at startup.

+

{{hc|~/.config/dwb/userscripts/defer-loading.js|<nowiki>

+

//!javascript

+

if (settings.loadOnFocus === false) {

+

execute('local_set load-on-focus true');

+

}

+

Signal.connect('navigation', function(webview) {

+

if (webview == tabs.current) {

+

execute('local_set load-on-focus false');

+

this.disconnect();

+

}

+

});</nowiki>}}

−

This feature can be implemented with a simple javascript function and bound to custom keys:

If you are always searching for ''undefined'' even with the {{ic|searchengine-submit-pattern}} option set, then you should edit {{ic|$XDG_CONFIG_HOME/dwb/searchengines}} and adapt the URIs to match your {{ic|searchengine-submit-pattern}}.

If you are always searching for ''undefined'' even with the {{ic|searchengine-submit-pattern}} option set, then you should edit {{ic|$XDG_CONFIG_HOME/dwb/searchengines}} and adapt the URIs to match your {{ic|searchengine-submit-pattern}}.

Line 208:

Line 247:

=== Fuzzy font in Github ===

=== Fuzzy font in Github ===

−

Add this in your ~/.config/fontconfig/fonts.conf inside the fontconfig-tags:

+

Add this in your {{ic|~/.config/fontconfig/fonts.conf}} inside the fontconfig-tags:

Notes

Press v to switch to caret browsing, then press space to toggle between caret and visual mode. Press Esc one or two times to go back to normal mode. While in caret browsing, you can use the arrow keys to browse the different parts of the page. Hold Shift to select text. Press Enter to follow links.

Configuration

The configuration files are stored in $XDG_CONFIG_HOME/dwb/ (usually ~/.config/dwb/) and can be easily accessed through the web interface. Type Ss to open the Settings page.

Search engines

Open your favorite search engine, type gs to select the web page's first input field, and then enter a keyword associated with it.

Now you can use the keyword in the URI prompt to search directly on the corresponding website. Typing queries directly in the address bar will search with the default search engine, which is the first entry in $XDG_CONFIG_HOME/dwb/searchengines.

Custom keybinds

You can create custom key bindings by editing file custom_keys in the profile directory. This is
~/.config/dwb/default by default. All keysyms which don't emit (multi)byte characters, must be enclosed in @. One keybind can execute multiple dwb commands. These commands execute in same order as they are defined in bind, and must be separated by ;; separator. If the keybind's chord is already bound by dwb, it might be ignored (behaviour is not consistent). In such case one can try to check, whether there is collison with binds defined in ~/.config/dwb/keys and try to unbind the chord there (eg set it to nothing). Any running dwb instance will owerwrite keys file on exit, so remember to do your modifications while dwb is not runing or use default dwb interface (Sk).

~/.config/dwb/default/custom_keys

Control w :close_tab
Control @Page_Up@ :focus_prev
Control @Page_Down@ :focus_next

Extensions

dwb features an extension manager as a separate executable, dwbem. To list all officially available extensions, use:

Stylesheet

a global stylesheet can be defined in the Settings, under user-stylesheet-uri (i.e. file:///home/tux/.config/dwb/stylesheet.css)

If you browse with the status bar hidden and are annoyed by the the link previews that appear while hovering over links with the mouse, add this to the stylesheet: #dwb_hover_element { display:none!important; }

Search engines search for undefined

If you are always searching for undefined even with the searchengine-submit-pattern option set, then you should edit $XDG_CONFIG_HOME/dwb/searchengines and adapt the URIs to match your searchengine-submit-pattern.

Fuzzy font in Github

Add this in your ~/.config/fontconfig/fonts.conf inside the fontconfig-tags: