Weaver

Your Web, Your Way

Weaver is user friendly web browser, but it's selective about who it calls a friend.

Weaver's friends like customizing their tools, know how to write scripts, and enjoy finding ways to make their favorite tools work together.

Weaver is a web browser controlled primarily by commands over a unix socket.

Weaver acts as both the server and the client for the socket allowing you to use the same command to start the socket server and to send commands.

Weaver is designed to not step on other utility's toes. Weaver is not a window manager, you should already have one of those. Weaver is not an adblocker, you have one already at /etc/hosts. Weaver is not a shortcut manager, you can make one with a couple lines of shell script (or use the provided example). Weaver is designed to play well with others.

Weaver examples frequently use dmenu for user input. This is for exmaple purposes only. A wide range of text input programs could be used similarly including interrobang, rofi, or - of course - your shell. It's entirely up to you. You can even control weaver on your media center PC from your laptop by sending commands over ssh.

Running

weaver

With no arguments, weaver starts the server to listen for connections.

weaver <cmd> [args ...]

With arguments, weaver sends commands to a running weaver server.

Commands

Commands are either global or sent to target window.

Global Commands:

These commands can be used anytime a weaver server is running regardless of whether there are any open and / or targeted windows.

quit Close all windows and shut down the server
exit Alias for 'quit'
ping Return 'Pong' if the server is running
help [command] Display help message; show help for any command given as an argument
open-window <url> Open the provided url in a new window
open-hidden <url> Open the provided url in a hidden (unmapped) window
list-titles List the titles of all open weaver windows
list-urls List the urls of all open weaver windows
list-info List information about all open weaver windows; see 'window-info'
list-windows Alias for 'list-info'
target-index <n> Target the n-th window from 'list-windows'
target-title <match> Target first window containing 'match' in the title
target-url <match> Target first window containing 'match' in the url
target Alias for target-index
downloads Show progress of active downloads

Window commands

Weaver tracks a pointer to the current target window for window commands. Whenever a weaver window receives the input focus it automatically becomes the target window. This will remain the target window even after losing focus so long as the window remains open and another weaver window has not been set as the target. You can set a target window with the target-* family of commands (coming soon) - setting the target does not raise of focus the window but only defines it as the recipient for subsequent window commands.

open <url> Open the provided url in the current active window
close Close the current active window
delete Alias for 'close'
reload [skip-cache] Reload the current page; if any argument is provided, the reload bypasses the cache
find-next [phrase] Set the search term to 'phrase' if provided; Find the next occurrence of the search term
find-prev [phrase] Set the search term to 'phrase' if provided; Find the previous occurrence of the search term
find-clear Clear the search term and any highlighting
find Alias for 'find-next'
window-title Return the title of the currently active window
window-url Return the url of the currently active window
window-info Return information about the currently active window: at present info=title+TAB+url
window-xid Return the X11 window id of the active window as a hex string
title Alias for 'window-title'
url Alias for 'window-url'
info Alias for 'window-info'
scroll-to <y> [x] Scroll to 'y' pts vertically, and (optionally) 'x' pts horizontally
scroll-by <y> [x] Scroll by 'y' pts vertically, and (optionally) 'x' pts horizontally
scroll-top Scroll to the top of the page
scroll-bottom Scroll to the bottom of the page
zoom-to <factor> Zoom to scale 'factor'
zoom-by <factor> Zoom by scale 'factor' relative to the current zoom level
history-start Go to the first page in the history
history-end Go to the last page in the history
history-forward Go forward one page in the history
history-back Go back one page in the history
back Alias for 'history-back'
forward Alias for 'history-forward'
js-run <script> Run the provided javascript in the target window
js-result-ready Return 'true' if a result is available from the last javascript call; otherwise returns an empty string
js-result Return the last result from javascript; may provide incorrect results if 'js-result-ready' is not 'true'
window-xid Return the X11 window id of the active window as a hex string

Todo

  1. Code cleanup:
    • Sort Qt includes into .h vs .cpp as most appropriate
    • Determine and implement reasonable sorting of functions in .cpp files (they're a total mess right now)
    • Add comments on likely user-modifiable compile-time options (e.g., UserAgent, etc)
  2. Other TODO items have moved to the ticket tracker - feel free to submit bugs or feature requests there