A web browser that adheres to the unix philosophy.
Any program can only be really useful if it complies with the Unix philosophy. Web browsers (and other tools that work with HTML, such as feed readers) are frequent violators of this principle:
The Uzbl project was started as an attempt to resolve this.
"Uzbl" is an umbrella project consisting of different flavors. In the future more things may come, but for now:
Main component meant for integration with other tools and scripts.
A minimal browser which encompasses a default configuration file, event manager and a selection of scripts which gives a comparable browsing experience to the more common browsers.
uzbl-core
except that the status bar contains useful
information.A flavor of uzbl
built on top of uzbl-browser
which adds tabbed browsing.
uzbl-browser
.uzbl-browser
instances without getting lost.Throughout the documentation, when referring to uzbl
we mean uzbl-core
,
unless otherwise specified.
The general idea is that Uzbl by default is very bare bones. You can send it commands to update settings and perform actions, through various interfaces. There is a limited, built-in default configuration. It sets a basic status bar, title format, and network connection settings. By default, there are no keybindings defined at all (default keybindings would be counterproductive when you try to customize). For examples of the possibilities what you can do, please see the sample configurations, and wiki page.
There are several interfaces to interact with Uzbl:
uzbl --config <filename>
: <filename>
will be read line by line, and the
commands in it will be executed. Useful to configure Uzbl at startup. If you
have a file in $XDG_CONFIG_HOME/uzbl/config
(this expands to
~/.config/uzbl/config
on most systems), it will be automatically recognized.
stdin
: to write commands into stdin
, use --config -
(or -c -
).
Interactive: you can enter commands (and bind them to shortcuts, even at runtime). By default, the behaviour is modal (vi-like):
There is also support for "chained" commands (multiple characters long), and keyworded commands. Also you can trigger incremental matching on commands and variables after pressing return. See the sample configuration file for more information.
By default, copy and paste works when typing commands:
insert
(paste X cliboard)shift insert
(paste primary selection buffer)FIFO & socket files: If enabled by setting their paths through one of the
above means, you can have socket and FIFO files available which are very
useful to control uzbl
using external programs.
The advantage of the FIFO is you can write directly to it, but it's half
duplex only (uzbl
cannot send a response to you).
The socket is full duplex but a socket-compatible wrapper such as socat
is needed to work with it. For example:
echo
When uzbl
forks a new instance (e.g., "open in new window") it will use the
same command line arguments (e.g., the same --config <file>
), except for
--named
. If you made changes to the configuration at runtime, these are not
passed on to the child.
WebKit2 changes many things compared to WebKit1, some of which impact uzbl
greatly. This version of uzbl
only supports WebKit1 while older version tried
to support both at the same time.
For a uzbl
built on WebKit2 check out the
next branch
Uzbl
will read commands via standard input, named FIFO pipe (once fifo_dir
is set) and Unix socket (once socket_dir
is set). For convenience, uzbl
can
also be instructed to read commands from a file on startup by using the
--config
option. Indeed, the config file is nothing more than a list of
commands with support for comments (using the #
character).
Each command starts with the name of a command or a uzbl
variable that expands
to it. A command is terminated by a newline. Empty lines and lines that start
with the hash sign (ignoring leading whitespace) are ignored by the parser.
Command names are always written in lowercase.
A list of commands supported by uzbl
is given here. Optional arguments are
given in square brackets ([]
) with literal strings options in lowercase
separated by a pipe (|
) character. N
indicates an integer value and other
uppercase values are placeholders describing what the value should be. Required
options are given in angle brackets (<>
). Arguments on which argument
splitting is not performed are given in curly braces ({}
). Variable arguments
are indicated with ellipses (...
). As an example:
`example1 <a|b> <N> [URI...]`
means that the command example
requires its first argument which must either
be a literal a
or b
, a second argument which is an integer, and any
remaining arguments are treated as URIs. Another example:
`example2 <KEY> {VALUE}`
means that the first argument is split off used as a key and the remaining
string is used verbatim. The command example2 key many args
would have key
as KEY
and many args
as VALUE
.
back [N]
forward [N]
reload [cached|full]
cached
is given (the default), the cache is
used. If full
is given, the cache is ignored.stop
uri {URI}
uzbl
to navigate to the given URI.download <URI> [DESTINATION]
load <COMMAND>
html <URI> <CONTENT>
text <CONTENT>
error_html <URI> <BASE_URI> <CONTENT>
frame <list|focus|reload|stop|dump|inject|get|set> [NAME]
_current
frame is used. Supported subcommands include:
list
(Unimplemented)
focus
(Unimplemented)
reload
stop
save
(Unimplemented)
load
(Unimplemented)
get <VARIABLE>
(Unimplemented)
set <VARIABLE> <VALUE>
(Unimplemented)
cookie <add|delete|clear>
uzbl
. The subcommands work as follows:
add <HOST> <PATH> <NAME> <VALUE> <SCHEME> <EXPIRATION>
delete <DOMAIN> <PATH> <NAME> <VALUE>
clear all
clear domain [DOMAIN...]
scroll <horizontal|vertical> <VALUE>
begin
end
[-]N
[-]N%
N!
N%!
zoom <in|out|set> [VALUE]
zoom_step
is used.hardcopy [REGION]
page
(the default)
frame [NAME]
geometry <SIZE>
uzbl
window. This is subject to window manager
policy. If the size is maximized
, the uzbl
window will try to maximize
itself. Otherwise, the size is parsed using the
WIDTHxHEIGHT±XOFFSET±YOFFSET
pattern.snapshot <PATH> <FORMAT> <REGION> [FLAG...]
(WebKit1 >= 1.9.6)
png
. Acceptable regions include:
visible
plugin <COMMAND>
refresh
toggle [NAME...]
remove_all_db
spell <COMMAND>
(WebKit1 >= 1.5.1)
ignore [WORD...]
learn [WORD...]
autocorrect <WORD>
guesses <WORD>
favicon <COMMAND>
clear
uri <URI>
save <URI> <PATH>
(Unimplemented)
css <COMMAND>
add <URI>
clear
Clears all user-supplied stylesheets.scheme <SCHEME> {COMMAND}
uzbl
. The handler should accept a
single argument for the URI to load and return HTML. When run, the output
is interpreted as content at the URL with a leading line with the MIME
type.menu <COMMAND>
uzbl
. Supported subcommands include:
add <OBJECT> <NAME> <COMMAND>
add_separator <OBJECT> <NAME>
remove <NAME>
query <NAME>
list
document
link
image
media
search <COMMAND>
option <OPTION...>
+
to set,
-
to unset, !
to toggle, and ~
to reset to its default. The
default options have wrap
enabled. Recognized options include:
wrap
case_insensitive
options
clear
reset
find {STRING}
rfind {STRING}
find
, but searches backwards in the document.next
find
or rfind
command.prev
next
, but searches in the opposite direction from the last find
or rfind
command.security <SCHEME> <COMMAND> <OPTION>
Controls security options for a scheme. Recognized commands include:
get
true
if the option is set for the scheme, false
otherwise.set
unset
(WebKit1 only)
Supported options include ("scheme" here is used as "content referenced with this scheme"):
local
no_access
display_isolated
secure
cors_enabled
empty_document
inspector <COMMAND>
show
close
coord <X> <Y>
node <NODE>
(WebKit1 >= 1.3.17) (Unimplemented)
js <CONTEXT> <file|string> <VALUE>
file
is given, the value is interpreted as a path
to a file to run, otherwise the value is executed as JavaScript code.
Currently supported contexts include:
uzbl
uzbl
context. This context does not (currently)
have access to the page's contents.clean
frame
page
spawn <COMMAND> [ARGUMENT...]
(WILL CHANGE)
Spawn a command on the system with the given arguments. This ignore the
stdout of the command. Will become spawn async
in the future. The first
argument command may use the following format to support fallback
directories:
dir1:dir2:dir3:subpath
This will try @{dir1}@{subpath}
followed by @{dir2}@{subpath}and so on. The first file which exists is used. If none of them exist, it is used as the command verbatim and the
PATH` environment variable is used.
spawn_sync <COMMAND> [ARGUMENT...]
(DEPRECATED)
spawn async
in the future.spawn_sync_exec <COMMAND> [ARGUMENT...]
(DEPRECATED)
uzbl
commands. This will disappear in the future and the command should
communicate to uzbl
over either the FIFO or the socket.spawn_sh <COMMAND> [ARGUMENT...]
(DEPRECATED)
spawn @shell_cmd ...
.spawn_sh_sync <COMMAND> [ARGUMENT...]
(DEPRECATED)
spawn_sync @shell_cmd ...
.chain <COMMAND...>
include {PATH}
exit
uzbl
.set <NAME> {VALUE}
toggle <VARIABLE> [OPTION...]
0
or
1
in which case the other is set. If the variable does not exist, it is
set to 1
.print {STRING}
dump_config
uzbl
again or saved as a
config file.dump_config_as_events
VARIABLE_SET
events, which can be
handled by an event manager.event <NAME> [ARGUMENTS...]
request <NAME> <COOKIE> [ARGUMENTS...]
uzbl
since spawn_sync
is not usable to talk to the event manager.choose <NAME> <COOKIE> [ARGUMENTS...]
file_chooser_handler
and color_chooser_handler
where a result should be waited upon indefinitely. This will hang uzbl if
it is not replied to.
Uzbl
has a lot of internal variables and constants. You can get the values
(see the print
command), and for variables you can also change the value at
runtime. Some of the values can be passed at start up through command line
arguments, others need to be set by using commands (e.g., in the configuration
file).
Integer variables may be negative, boolean values should be either 0
or 1
.
Commands are variables intended to be executed as uzbl commands. All user
variables are treated as strings.
verbose
(integer) (default: 0)
uzbl
as it runs.frozen
(boolean) (default: 0)
print_events
(boolean) (default: 0)
handle_multi_button
(boolean) (default: 0)
uzbl
will intercept all double and triple clicks and the
page will not see them.fifo_dir
(string) (no default)
socket_dir
(string) (no default)
navigation_handler
(command) (no default)
USED
, the navigation
is ignored.request_handler
(command) (no default)
about:blank
.request
in WebKit1 as this is called synchronously and
will just pause uzbl-core
until the request
timeout occurs.download_handler
(command) (no default) (synchronous in WebKit1)
request
in WebKit1 as this is called synchronously and
will just pause uzbl-core
until the request
timeout occurs.mime_handler
(command) (no default) (WebKit1 only)
authentication_handler
(command) (no default) (WebKit1 only)
permission_handler
(command) (no default)
file_chooser_handler
(command) (no default) (WebKit >= 1.9.4)
shell_cmd
(string) (default: sh -c
)
spawn_sh
and sync_sh
commands as well as @()@
expansion.enable_builtin_auth
(boolean) (default: 0)
icon
(string) (no default)
uzbl
. Overrides icon_name
when set.icon_name
(string) (no default)
uzbl
. Overrides icon
when set.window_role
(string) (no default)
auto_resize_window
(boolean) (default: 0) (WebKit1 only)
show_status
(boolean) (default: 1)
status_top
(boolean) (default: 0)
status_format
(string) (default: <b>@[@TITLE]@</b> - @[@uri]@ - <span foreground="#bbb">@NAME</span>
)
status_format_right
(string) (no default)
status_background
(string) (no default)
title_format_long
(string (default: @keycmd @TITLE - Uzbl browser <@NAME> > @SELECTED_URI
)
title_format_short
(string (default: @TITLE - Uzbl browser <@NAME>
)
default_context_menu
(boolean) (default: 0)
print_backgrounds
(boolean) (default: 1)
proxy_url
(string) (no default) (WebKit1 only)
max_conns
(integer) (default: 100) (WebKit1 only)
max_conns_host
(integer) (default: 6) (WebKit1 only)
http_debug
(enumeration) (default: none
) (WebKit1 only)
none
minimal
headers
body
ssl_ca_file
(string) (no default) (WebKit1 only)
ssl_policy
(enumeration) (default: fail
)
ignore
fail
cache_model
(enumeration) (default: unknown
)
document_viewer
web_browser
document_browser
enable_private
(boolean) (default: 0)
UZBL_PRIVATE
environment variable for external plugins. DNS prefetching
is separate from this; see the enable_dns_prefetch
variable. It is
currently experimental in WebKitGtk itself.permissive
(boolean) (default: 0)
enable_private
is
0) if permission_handler
is either not set or returns an invalid value.enable_universal_file_access
(boolean) (default: 0) (WebKit1 only)
file
scheme will be allowed to
access all other content.enable_cross_file_access
(boolean) (default: 0) (WebKit1 only)
file
scheme will be allowed to
access other file
content.enable_hyperlink_auditing
(boolean) (default: 0)
<a ping>
will be allowed in WebKit.cookie_policy
(enumeration) (default: always
)
always
never
first_party
enable_dns_prefetch
(boolean) (default: 1) (WebKit >= 1.3.13)
display_insecure_content
(boolean) (default: 1) (WebKit1 >= 1.11.2)
run_insecure_content
(boolean) (default: 1) (WebKit1 >= 1.11.2)
maintain_history
(boolean) (default: 1) (WebKit1 only)
profile_js
(boolean) (default: 0) (WebKit1 only)
Console.profiles
variable in JavaScript.profile_timeline
(boolean) (default: 0) (WebKit1 only)
forward_keys
(boolean) (default: 0)
uzbl
will pass keypresses to WebKit.useragent
(string) (no default)
User-Agent
HTTP header. Setting this variable
does not update the useragent in JavaScript as seen by the
navigator.userAgent
variable.accept_languages
(string) (no default)
Accept-Language
HTTP header. In
WebKit1, if set to auto
, the list will be constructed from the system.zoom_level
(double) (default: 1.0)
zoom_step
(double) (default: 0.1)
zoom in
and zoom out
commands.
Must be greater than 0.zoom_text_only
(boolean) (default: 0)
caret_browsing
(boolean) (default: 0)
enable_frame_flattening
(boolean) (default: 0) (WebKit >= 1.3.5)
enable_smooth_scrolling
(boolean) (default: 0) (WebKit >= 1.9.0)
page_view_mode
(enumeration) (default: web
)
web
source
transparent
(boolean) (default: 0) (WebKit1 only)
window_view_mode
(enumeration) (default: windowed
) (WebKit1 >= 1.3.4)
windowed
floating
fullscreen
maximized
minimized
enable_fullscreen
(boolean) (default: 0) (WebKit >= 1.3.4)
editable
(boolean) (default: 0)
enable_scripts
(boolean) (default: 1)
javascript_windows
(boolean) (default: 0)
javascript_dom_paste
(boolean) (default: 0) (WebKit1 only)
javascript_clipboard
(boolean) (default: 0) (WebKit >= 1.3.0)
autoload_images
(boolean) (default: 1)
autoshrink_images
(boolean) (default: 1) (WebKit1 only)
use_image_orientation
(boolean) (default: 0) (WebKit1 only)
enable_spellcheck
(boolean) (default: 0)
spellcheck_languages
(string) (no default)
enable_spellcheck
to actually mean anything.resizable_text_areas
(boolean) (default: 1)
enable_spatial_navigation
(boolean) (default: 0)
editing_behavior
(enumeration) (default: unix
) (WebKit1 only)
mac
unix
windows
enable_tab_cycle
(boolean) (default: 1)
default_encoding
(string) (default: iso-8859-1
)
custom_encoding
(string) (no default)
enforce_96_dpi
(boolean) (default: 0) (WebKit1 only)
default_font_family
(string) (default: sans-serif
)
monospace_font_family
(string) (default: monospace
)
sans_serif_font_family
(string) (default: sans-serif
)
serif_font_family
(string) (default: serif
)
cursive_font_family
(string) (default: serif
)
fantasy_font_family
(string) (default: serif
)
Note: font sizes are in points.
minimum_font_size
(integer) (default: 5)
minimum_logical_font_size
(integer) (default: 5)
font_size
(integer) (default: 12)
monospace_size
(integer) (default: 10)
enable_plugins
(boolean) (default: 1)
enable_java_applet
(boolean) (default: 1)
applet
HTML tag which is not controlled by the enable_plugins
variable.enable_webgl
(boolean) (default: 0) (WebKit >= 1.3.14)
enable_webaudio
(boolean) (default: 0) (WebKit >= 1.7.5)
enable_3d_acceleration
(boolean) (default: 0) (WebKit1 >= 1.7.90)
enable_inline_media
(boolean) (default: 1) (WebKit >= 1.9.3)
require_click_to_play
(boolean) (default: 0) (WebKit >= 1.9.3)
enable_css_shaders
(boolean) (default: 0) (WebKit1 >= 1.11.1 and < 2.3.5)
enable_media_stream
(boolean) (default: 0) (WebKit1 >= 1.11.1)
enable_media_source
(boolean) (default: 0) (WebKit >= 2.3.3)
enable_database
(boolean) (default: 1)
enable_local_storage
(boolean) (default: 1)
enable_pagecache
(boolean) (default: 0)
enable_offline_app_cache
(boolean) (default: 1)
app_cache_size
(size) (default: [no quota]) (WebKit1 >= 1.3.13)
web_database_directory
(string) (default: $XDG_DATA_HOME/webkit/databases
) (WebKit1 only)
web_database_quota
(size) (default: 5242880) (WebKit1 only)
local_storage_path
(string) (default: $XDG_DATA_HOME/webkit/databases
) (WebKit1 >= 1.5.2)
localStorage
data.enable_site_workarounds
(boolean) (default: 0)
Constants may not be assigned to. When dumping variables using dump_config
,
they are written as comments.
inspected_uri
(string) (WebKit >= 1.3.17)
current_encoding
(string) (WebKit1 only)
geometry
(string)
uzbl
in
<width>x<height>+<xoffset>+<yoffset>
format.plugin_list
(string) (WebKit1 >= 1.3.8)
is_online
(boolean)
is_playing_audio
(boolean)
uri
(string)
embedded
(boolean)
uzbl
is embedded in another window, otherwise it is
stand-alone.WEBKIT_MAJOR
(integer)
WEBKIT_MINOR
(integer)
WEBKIT_MICRO
(integer)
WEBKIT_UA_MAJOR
(integer)
WEBKIT_UA_MINOR
(integer)
HAS_WEBKIT2
(boolean)
uzbl
is using WebKit2.ARCH_UZBL
(string)
uzbl
is compiled for.COMMIT
(string)
uzbl
at compiled time.TITLE
(string)
SELECTED_URI
(string)
NAME
(string)
uzbl
instance (defaults to the pid).PID
(integer)
uzbl
._
(string)
Variable expansion works similarly to shell interpreters (sh, bash, etc.). This means you can construct strings with uzbl variables in them and have uzbl replace the variable name with its contents.
In order to let uzbl know what to expand you'll need to prepend @ to the variable name:
print The variable \@show_status contains @show_status
The above example demonstrates two things:
\
is treated as escape character and will use the character immediately
following it literally this means \@show_status
will not expand to the
variable content but be rather printed as @show_status
@
will expand to its contentsAs in the shell you can use @{uzbl_var}
to denote the beginning/end of the
variable name in cases where it is not obvious what belongs to the name and
what not, e.g., print @{show_status}foobar
There are multiple constructs for more complex expansion.
@(+command arg1 arg2)@
spawn_sync command arg1 arg2
and is
replaced by the first line of its stdout.@(command arg1 arg2)@
spawn_sh_sync command arg1 arg2
and is
replaced by the first line of its stdout.@/+file/@
include file
and is replaced by its result.@/command arg1 arg2/@
command arg1 arg2
and is replaced by its
result.@*+javascript_file*@
js uzbl file javascript_file
and is
replaced by its result.@*javascript*@
js uzbl string javascript
and is replaced
by its result.@<+javascript_file>@
js page file javascript_file
and is
replaced by its result.@<javascript>@
js page string javascript
and is replaced
by its result.@[email protected]
js clean file javascript_file
and is
replaced by its result.@[email protected]
js clean string javascript
and is replaced
by its result.@[string]@
string
for XML entities. This is most useful when using
page-defined strings in the status_bar
variable.Uzbl has a JavaScript API available via the js uzbl
command. There is a
global uzbl
object can control uzbl
through two properties: variables
and
commands
. For example, to set the verbose
variable:
uzbl.variables.verbose = 1
To call the back
command:
uzbl.commands.back()
All arguments to commands be converted to strings, so {}
will appear to
commands as [object Object]
, not JavaScript objects.
Currently, access to the webpage is not available through the uzbl
context.
This is currently impossible with WebKit2 (since even uzbl
does not have
access to the page's JavaScript context) and crashes WebKit1.
The contents of the status bar can be customized by setting the status_format
variable. The contents of the window title can be customized by setting the
title_format_short
variable (which is used when the status bar is displayed)
and the title_format_long
variable (which is used when the status bar is not
displayed). Their values can be set using the expansion and substitution
techniques described above.
These variables are expanded in multiple stages; once when the variable is set, and again every time that the status bar or window title are updated. Expansions that should be evaluated on every update need to be escaped:
set title_format_short = @(date)@
# this expansion will be evaluated when the variable is set.
# the title will stay constant with the date that the variable was set.
set title_format_short = \@(date)\@
# this expansion will be evaluated when the window title is updated.
# the date in the title will change when you change pages, for example.
set title_format_short = \\\@(date)\\\@
# the title will stay constant as a literal "@(date)@"
The status_format
and status_format_right
variables can contain
Pango
markup . In these variables, expansions that might produce the characters <
,
&
or >
should be wrapped in @[]@
substitutions so that they don't
interfere with the status bar's markup; see the sample config for examples.
You can use external scripts with Uzbl the following ways:
uzbl
call them. These scripts are called "handlers" in the uzbl
config. These are typically used for policy requests so that behavior can be
controlled with external logic.uzbl
. You can bind keys with this. Examples:
add new bookmark, load new URL.xbindkeys
or your WM config to trigger scripts if uzbl
does not have focus.Scripts called by uzbl
(the commands starting with spawn
) have access to
the following environment variables:
$UZBL_CONFIG
uzbl
instance.$UZBL_PID
uzbl
instance.$UZBL_XID
$UZBL_FIFO
$UZBL_SOCKET
$UZBL_URI
$UZBL_TITLE
$UZBL_PRIVATE
enable_private
variable is non-zero, unset otherwise.Handler scripts (download_handler
, navigation_handler
, request_handler
,
mime_handler
, authentication_handler
, permission_handler
,
tls_error_handler
, file_chooser_handler
, and color_chooser_handler
) are
called with special arguments:
download handler
url
suggested_filename
content_type
total_size
destination_path
download
command. If it is present, this is the path that the file
should be saved to. A download handler using WebKit's internal downloader
can just echo this path and exit when this argument is present.navigation handler
uri
src_frame
dest_frame
type
link
form_submission
back_forward
reload
form_resubmission
other
unknown
button
modifiers
KEY_PRESS
and KEY_RELEASE
events.is_gesture
true
if the action was triggered by a gesture, false
otherwise.request handler
uri
can_display
can_display
, cant_display
, or unknown
to indicate whether
WebKit knows how to display the data given its MIME type (unknown
means
that uzbl
was unable to determine the answer).frame
redirect
mime handler
mime_type
disposition
authentication handler
host
realm
retry
retrying
or initial
depending on whether this request is a
retrial of a previous request.scheme
default
http_basic
http_digest
html_form
ntlm
negotiate
client_certificate_requested
server_trust_evaluation_requested
proxy
proxy
if a proxy is requesting authentication or origin
if a
remote server is.port
save
can_save
or cant_save
depending on whether WebKit itself can
save the credentials.permission handler
uri
action
geolocation
unknown
description
tls error handler
host
flags
unknown_ca
bad_identity
not_activated
expired
revoked
insecure
error
cert_info
file chooser handler
mode
multiple
or single
for whether a single file or multiple files
were requested.mimetypes
color chooser handler
region
WIDTHxHEIGHT+X+Y
format.As mentined before, the contents of the window title can be customized by
setting the title_format_short
variable and the title_format_long
variable
(see above to figure out when each of them is used). You can also set icon
variable to path of the icon file. Some advanced window managers can also take
WM_WINDOW_ROLE
in account, which can be set by modifying window_role
variable.
Uzbl does not automatically use the current page's favicon as its icon. This can, however, be done with external scripts.
Uzbl sets the UZBL_URI
property on its window which is always the uri of the
page loaded into uzbl, except for web inspector windows which does not have the
property.
Unlike commands, events are not handled in uzbl
itself, but are dispatched
asynchronously through a text stream on stdout
and/or through a socket.
You'll usually use uzbl
by connecting it to a so-called "event manager" (EM).
An EM is a privileged communicator with uzbl
. EM sockets are given on the
command line via the --connect-socket
argument. EM sockets receive requests
in addition to events. All sockets receive event output. Please be aware that
events contain sensitive information such as cookie data and keystrokes
(e.g., passwords).
An example EM is shipped with uzbl
called uzbl-event-manager
. See its
documentation for more.
Many of the features of larger browsers are intended to be implemented via an
EM. The EM receives all events and requests from uzbl
and can implement
history, keybindings, cookie management, and more. For more on the EM shipped
with uzbl
, see its documentation
Events are reported in the following format.
EVENT <NAME> <EVENT_NAME> {DETAILS}
Events are line-oriented, so newlines are not supported within events.
Requests use the following format:
REQUEST-<COOKIE> <REQUEST_NAME> [ARGUMENTS...]
Only EM sockets receive REQUEST lines. Currently, if a reply is not received
within one second from uzbl
sending a request, uzbl
will continue without a
reply. This is because the request blocks the GUI thread. Replies to a request
use the following format:
REPLY-<COOKIE> <REPLY>
If the cookie does not match the cookie from the request, uzbl
will ignore it.
Uzbl will report various events by default. All of these events are part of uzbl itself and will be emitted based on what is happening within uzbl-core.
NAVIGATION_STARTING <URI> <SRCFRAME> <DESTFRAME> <TYPE>
navigation_handler
for the types available.LOAD_START
LOAD_REDIRECTED <URI>
LOAD_COMMIT <URI>
LOAD_PROGRESS <PROGRESS>
LOAD_CANCELLED <URI>
LOAD_ERROR <URI> <CODE> <MESSAGE>
LOAD_FINISH <URI>
REQUEST_QUEUED <URI>
(WebKit1 only)
REQUEST_STARTING <URI>
REQUEST_FINISHED <URI>
KEY_PRESS <MODIFIERS> <KEY>
<REP>Button<VALUE>
which would be 2Button1
for a double click of the
main mouse button (rep is empty for single clicks). Multiple clicks usually
only show as a KEY_RELEASE
event due to GDK implementation details.KEY_RELEASE <MODIFIERS> <KEY>
MOD_PRESS <MODIFIERS> <MODIFIER>
MOD_RELEASE <MODIFIERS> <MODIFIER>
BUILTINS <COMMANDS>
uzbl
will emit this event with a JSON list of the names of
all commands it understands.COMMAND_ERROR <REASON>
uzbl
cannot execute a command.COMMAND_EXECUTED <NAME> [ARGS...]
FILE_INCLUDED <PATH>
FIFO_SET
uzbl
opens a communication FIFO.SOCKET_SET <PATH>
uzbl
opens a communication socket.INSTANCE_START <PID>
PLUG_CREATED <ID>
uzbl
is started in plug mode. The ID is for the Xembed socket.INSTANCE_EXIT <PID>
uzbl
quits. When this is sent, uzbl
has already stopped
listening on all sockets.VARIABLE_SET <NAME> <str|int|ull|double> {VALUE}
VARIABLE_SET
event to occur (e.g., any variable managed by WebKit behind
the scenes does not trigger this event).BLUR_ELEMENT <NAME>
(WebKit1 only)
FOCUS_ELEMENT <NAME>
(WebKit1 only)
LINK_HOVER <URI> <TITLE>
LINK_UNHOVER <URI>
FORM_ACTIVE <BUTTON>
ROOT_ACTIVE <BUTTON>
SCROLL_HORIZ <VALUE> <MIN> <MAX> <PAGE>
SCROLL_VERT <VALUE> <MIN> <MAX> <PAGE>
SCROLL_HORIZ
, but for the vertical scrollbar.TITLE_CHANGED <TITLE>
GEOMETRY_CHANGED <GEOMETRY>
WEBINSPECTOR <open|close>
REQ_NEW_WINDOW <URI>
CLOSE_WINDOW
uzbl
is closing its window.FOCUS_LOST
uzbl
loses the keyboard focus.FOCUS_GAINED
uzbl
gains the keyboard focus.DOWNLOAD_STARTED <DESTINATION>
DOWNLOAD_PROGRESS <DESTINATION> <PROGRESS>
DOWNLOAD_ERROR <DESTINATION> <REASON> <CODE> <MESSAGE>
DOWNLOAD_COMPLETE <DESTINATION>
ADD_COOKIE <DOMAIN> <PATH> <NAME> <VALUE> <SCHEME> <EXPIRATION>
DELETE_COOKIE <DOMAIN> <PATH> <NAME> <VALUE> <SCHEME> <EXPIRATION>
uzbl
is invoked as
uzbl-core [ARGUMENTS] [URI]
where arguments
and uri
are both optional. arguments
can be:
-v
, --verbose
verbose
to be non-zero.-n
, --named=NAME
-c
, --config=FILE
-
for stdin.-s
, --xembed-socket=SOCKETID
--connect-socket=CSOCKET
-p
, --print-events
print_events
to be non-zero.-g
, --geometry=GEOMETRY
geometry GEOMETRY
with the given value on startup. Ignored if uzbl
is
embedded.-V
, --version
--web-extensions-dir
--display=DISPLAY
--help
uzbl-core scheme://address
will work as you expect. If you don't provide the
scheme://
part, it will check if the argument is an existing file in the
filesystem, if it is, it will prepend file://
, if not, it will prepend
http://
.
Please report new issues to Uzbl's issues page on github