Vimprobable

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Gnome-colors-add-files-to-archive.pngThis article is being considered for archiving.Gnome-colors-add-files-to-archive.png

Reason: The project is dead. (Discuss in Talk:Vimprobable)
Warning: Vimprobable is based on a WebKit port that is today considered insecure and outdated. It is recommended to use another browser instead. More info here.

Vimprobable is a WWW browser that behaves like the Vimperator plugin available for Mozilla Firefox. It is based on the WebKit engine (using GTK bindings). It is a fork of the currently abandoned vimpression.

Install

There are three versions of Vimprobable in the AUR: vimprobable-gitAUR[broken link: package not found], vimprobable2-gitAUR[broken link: package not found], and vimprobable2AUR[broken link: package not found] (latest release). Now that Vimprobable2 is at version 1.0, it is considered the primary branch; development of Vimprobable1 will still recieve bugfixes, but active development will be restricted to Vimprobable2.

The first version can only be customised by editing config.h before compilation. It is pretty stable and very usable. Version 2, while also stable, is under more active development - it aims at allowing more customisation, for example through :set and :map commands.

Configuration

Both versions require you to make customizations in the config.h file before recompiling with

$ makepkg -fi

Additionally, Vimprobable2 will look for a configuration file called $XDG_CONFIG_HOME/vimprobable/vimprobablerc that has a number of options that can be configured without any need to recompile. You will need to create this file yourself.

A basic vimprobablerc might contain the following options:

set homepage=https://bbs.archlinux.org/
set scrollbars=false
set fontsize=12
set monofontsize=10
set monofont="Droid Sans Mono Slashed"

More details on configuring Vimprobable2 can be found in the rc man page

man vimprobablerc

Within the source directory, you will find two other files that can be customized, config.h and keymap.h. As one would expect, the first contains general configuration options, such as appearance and the second allows you to set your own keybindings. Any changes to either of these files require that Vimprobable2 be recompiled before they take effect.

Tip: As per the post install instructions, you will need to copy these files from the source directory to customize them.

Details for the default keybindings and options can be found in the man page

man vimprobable

Tips

Setting a more generic user agent will make accessing some websites more straightforward. In $XDG_CONFIG_HOME/vimprobable/vimprobablerc add a useragent for a browser that the site will find more acceptable, for example:

set useragent="Vimprobable2 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)"

You can find a list of useragents here: http://www.useragentstring.com/pages/useragentstring.php

You can specify additional search engines in Vimprobable2's config.h like so

static Searchengine searchengines[] = {
{ "b",         "http://blekko.com/?q=%s" },
{ "d",         "https://duckduckgo.com/?q=%s" },
{ "g",         "https://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q=%25s" },
{ "a",         "https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go" },
{ "w",         "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },
}

If you are running Vimprobable in tabbed, you can direct other applications to open webpages and have them captured in tabbed by starting Vimprobable with an xid:

 $(tabbed -d >/tmp/tabbed.xid); vimprobable2 -e $(</tmp/tabbed.xid)

and then directing the other applications to use that xid to launch Vimprobable:

 exec vimprobable2 -e $(</tmp/tabbed.xid) "$1"

With this script you can create a tabbed session if there is not already a window with tabbed, and then launch Vimprobable within it.

#!/usr/bin/env bash
[[ -z $((xprop -id $(</tmp/tabbed.xid)) 2>/dev/null) ]] && tabbed -d > /tmp/tabbed.xid 
exec vimprobable2 -e $(</tmp/tabbed.xid) $( [[  "$1"  ]] && echo "$1") &

Resources