From e44414affde4e5497386ce398cc2c40356c4e466 Mon Sep 17 00:00:00 2001 From: keis Date: Mon, 28 Feb 2011 22:03:26 +0100 Subject: add clear_cookies command --- README | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README') diff --git a/README b/README index 3ac9a28..6709bf5 100644 --- a/README +++ b/README @@ -260,6 +260,8 @@ The following commands are recognized: * 'delete_cookie [ ]` - Deletes a matching cookie from the cookie jar. scheme and expire time is currently not considered when matching. +* 'clear_cookies` + - Clears all cookies from the cookie jar ### VARIABLES AND CONSTANTS -- cgit v1.2.3 From ba7117ab362062f7cb0abdf6d0ee212f42d580ae Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 26 Mar 2011 14:36:25 -0400 Subject: Update README for KEYCMD_STRIP_WORD event --- README | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README') diff --git a/README b/README index 3ac9a28..5ef791a 100644 --- a/README +++ b/README @@ -762,6 +762,8 @@ Events/requests which the EM and its plugins listens for keycmd. * `KEYCMD_STRIP_WORD`: Removes the last word from the keycmd, similar to readline `^W`. + - `request KEYCMD_STRIP_WORD `: The `` argument is a list of + characters that are considered to separate words. * `KEYCMD_EXEC_CURRENT`: (tries to) execute whatever is in the keycmd. * `SET_KEYCMD`: Allow setting of the keycmd externally. - `request SET_KEYCMD `: Set the keycmd to ``. -- cgit v1.2.3 From a3154b72aa2b3e3ad02178cab9049546d769bb67 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Tue, 12 Apr 2011 22:44:39 -0600 Subject: document the download command and the change to download_handler's arguments --- README | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'README') diff --git a/README b/README index 6709bf5..cfc9a87 100644 --- a/README +++ b/README @@ -257,11 +257,14 @@ The following commands are recognized: - Show the WebInspector * `add_cookie ` - Adds a new cookie to the cookie jar -* 'delete_cookie [ ]` - - Deletes a matching cookie from the cookie jar. scheme and expire time - is currently not considered when matching. -* 'clear_cookies` - - Clears all cookies from the cookie jar +* `delete_cookie [ ]` + - Deletes a matching cookie from the cookie jar. scheme and expire time + is currently not considered when matching. +* `clear_cookies` + - Clears all cookies from the cookie jar +* `download []` + - Starts a download using the given uri. A destination file path can be given + to specify where the download should be written to. ### VARIABLES AND CONSTANTS @@ -506,9 +509,15 @@ Handler scripts (`download_handler`, `cookie_handler`, `scheme_handler` and * download handler - `$1 url`: The URL of the item to be downloaded. - - `$2 suggested_filename`: A filename suggested by the server or based on the URL. + - `$2 suggested_filename`: A filename suggested by the server or based on the + URL. - `$3 content_type`: The mimetype of the file to be downloaded. - - `$4 total_size`: The size of the file to be downloaded in bytes. This may be inaccurate. + - `$4 total_size`: The size of the file to be downloaded in bytes. This may be + inaccurate. + - `$5 destination_path`: This is only present if the download was started + explicitly using the `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. * cookie handler -- cgit v1.2.3 From 05b7422a9fcbb1cadf1beaff5ec0cea8b5b7a828 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 14 Apr 2011 00:22:49 -0400 Subject: Update documentation --- README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'README') diff --git a/README b/README index 6709bf5..431694e 100644 --- a/README +++ b/README @@ -104,7 +104,7 @@ There are several interfaces to interact with Uzbl: When `uzbl` forks a new instance (eg "open in new window") it will use the same command line arguments (eg the same `--config `), except `--uri` and -`--name`. If you made changes to the configuration at runtime, these are not +`--named`. If you made changes to the configuration at runtime, these are not passed on to the child. #### Uzbl-browser @@ -258,8 +258,8 @@ The following commands are recognized: * `add_cookie ` - Adds a new cookie to the cookie jar * 'delete_cookie [ ]` - - Deletes a matching cookie from the cookie jar. scheme and expire time - is currently not considered when matching. + - Deletes a matching cookie from the cookie jar. scheme and expire time + is currently not considered when matching. * 'clear_cookies` - Clears all cookies from the cookie jar @@ -793,7 +793,7 @@ where `arguments` and `uri` are both optional. `arguments` can be: * `-u`, `--uri=URI`: URI to load at startup. Equivalent to `uzbl ` or `set uri = URI` after `uzbl` has launched. * `-v`, `--verbose`: Whether to print all messages or just errors. -* `-n`, `--name=NAME`: Name of the current instance (defaults to Xorg window +* `-n`, `--named=NAME`: Name of the current instance (defaults to Xorg window id or random for GtkSocket mode). * `-c`, `--config=FILE`: Path to config file or `-` for stdin. * `-s`, `--socket=SOCKET`: Xembed socket ID. -- cgit v1.2.3 From 354d530231cb06fb8aa046b1a6442586aec8847f Mon Sep 17 00:00:00 2001 From: keis Date: Mon, 14 Mar 2011 20:53:31 +0100 Subject: keycmd comments and docs --- README | 12 ++++++------ docs/README.uzbl-event-manager | 27 ++++++++++++++++++++++++--- examples/data/plugins/keycmd.py | 13 +++++-------- 3 files changed, 35 insertions(+), 17 deletions(-) (limited to 'README') diff --git a/README b/README index c5d353b..08c6356 100644 --- a/README +++ b/README @@ -677,10 +677,14 @@ Events have this format: `uri`. * `EVENT [uzbl_instance_name] LINK_UNHOVER uri`: The mouse leaves the link `uri`. -* `EVENT [uzbl_instance_name] KEY_PRESS key_name`: The key (or mouse button) +* `EVENT [uzbl_instance_name] KEY_PRESS 'mod_state' key_name`: The key (or mouse button) `key_name` is pressed. -* `EVENT [uzbl_instance_name] KEY_RELEASE key_name`: The key (or mouse button) +* `EVENT [uzbl_instance_name] KEY_RELEASE 'mod_state' key_name`: The key (or mouse button) `key_name` is released. +* `EVENT [uzbl_instance_name] MOD_PRESS 'mod_state' mod_name`: A key mapped to + `mod_name` is pressed. +* `EVENT [uzbl_instance_name] MOD_RELEASE 'mod_state' mod_name`: A key mapped to + `mod_name` is released. * `EVENT [uzbl_instance_name] SELECTION_CHANGED selected_text`: When text is selected in the `uzbl` window. * `EVENT [uzbl_instance_name] NEW_WINDOW uri`: Request to creation of new `uzbl` window, @@ -758,10 +762,6 @@ Events/requests which the EM and its plugins listens for when the `` key or button is pressed. * `IGNORE_KEY`: Ignore a key pattern, specified by ``. - `request IGNORE_KEY ` -* `MODKEY_ADDITION`: Create a compound modkey from multiple individual keys. - - `request MODKEY_ADDITION `: The modkey - `` is considered pressed when all of ``, ``, and - `` are pressed. * `TOGGLE_MODES` - `request TOGGLE_MODES ... ` * `APPEND_KEYCMD`: Append a string to the current keycmd. diff --git a/docs/README.uzbl-event-manager b/docs/README.uzbl-event-manager index 23e185c..da26847 100644 --- a/docs/README.uzbl-event-manager +++ b/docs/README.uzbl-event-manager @@ -26,15 +26,36 @@ MODE_CHANGE ### keycmd.py ### - Tracks the currently entered command -- Connects To: FOCUS_GAINED, FOCUS_LOST, KEY_PRESS, KEY_RELEASE, (APPEND_KEYCMD, +- Connects To: KEY_PRESS, KEY_RELEASE, MOD_PRESS, MOD_RELEASE, (APPEND_KEYCMD, IGNORE_KEY, INJECT_KEYCMD, KEYCMD_BACKSPACE, KEYCMD_DELETE, - KEYCMD_EXEC_CURRENT, KEYCMD_STRIP_WORD, MODKEY_ADDITION, MODMAP, + KEYCMD_EXEC_CURRENT, KEYCMD_STRIP_WORD, KEYCMD_CLEAR, MODMAP, SET_CURSOR_POS, SET_KEYCMD) -- Emits: KEYCMD_UPDATE, KEYCMD_EXEC, MODCMD_UPDATE, MODCMD_EXEC +- Emits: KEYCMD_UPDATE, KEYCMD_EXEC, MODCMD_UPDATE, MODCMD_EXEC, KEYCMD_CLEARED + MODCMD_CLEARED Maintains a command line that is manipulated by simple keypresses and a number of events. +APPEND_KEYCMD + Appends `str` to the end of the keycmd + +INJECT_KEYCMD + Inserts `str` at the cursor position + +KEYCMD_BACKSPACE + Removes the character at the cursor position in the keycmd + +KEYCMD_DELETE + Removes the character after the cursor position in the keycmd + +KEYCMD_EXEC_CURRENT + Raise a KEYCMD_EXEC with the current keylet and then clear the keycmd + +KEYCMD_STRIP_WORD [] + Removes the last word from the keycmd, similar to readline ^W + +KEYCMD_CLEAR + Clears the keycmd and raises KEYCMD_CLEARED ### bind.py ### - Provides support for key bindings diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py index 952fbac..99f92af 100644 --- a/examples/data/plugins/keycmd.py +++ b/examples/data/plugins/keycmd.py @@ -228,11 +228,10 @@ def key_press(uzbl, key): '''Handle KEY_PRESS events. Things done by this function include: 1. Ignore all shift key presses (shift can be detected by capital chars) - 3. In non-modcmd mode: + 2. In non-modcmd mode: a. append char to keycmd - 4. If not in modcmd mode and a modkey was pressed set modcmd mode. - 5. If in modcmd mode the pressed key is added to the held keys list. - 6. Keycmd is updated and events raised if anything is changed.''' + 3. If not in modcmd mode and a modkey was pressed set modcmd mode. + 4. Keycmd is updated and events raised if anything is changed.''' k = uzbl.keylet modstate, key = parse_key_event(uzbl, key) @@ -270,10 +269,8 @@ def key_press(uzbl, key): def key_release(uzbl, key): '''Respond to KEY_RELEASE event. Things done by this function include: - 1. Remove the key from the keylet held list. - 2. If in a mod-command then raise a MODCMD_EXEC. - 3. Check if any modkey is held, if so set modcmd mode. - 4. Update the keycmd uzbl variable if anything changed.''' + 1. If in a mod-command then raise a MODCMD_EXEC. + 2. Update the keycmd uzbl variable if anything changed.''' k = uzbl.keylet modstate, key = parse_key_event(uzbl, key) modstate = set([m for m in modstate if not k.key_ignored(m)]) -- cgit v1.2.3