{"id":13439200,"url":"https://github.com/uzbl/uzbl","last_synced_at":"2025-03-20T07:32:29.789Z","repository":{"id":551623,"uuid":"182032","full_name":"uzbl/uzbl","owner":"uzbl","description":"A web browser that adheres to the unix philosophy.","archived":false,"fork":false,"pushed_at":"2018-12-28T17:45:28.000Z","size":7358,"stargazers_count":1023,"open_issues_count":72,"forks_count":155,"subscribers_count":53,"default_branch":"master","last_synced_at":"2024-10-28T01:11:58.829Z","etag":null,"topics":["browser","unix-philosophy","uzbl","webkit"],"latest_commit_sha":null,"homepage":"http://www.uzbl.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uzbl.png","metadata":{"files":{"readme":"README.event-manager.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-04-21T19:07:47.000Z","updated_at":"2024-09-20T11:00:05.000Z","dependencies_parsed_at":"2022-07-04T23:00:59.523Z","dependency_job_id":null,"html_url":"https://github.com/uzbl/uzbl","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbl%2Fuzbl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbl%2Fuzbl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbl%2Fuzbl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbl%2Fuzbl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uzbl","download_url":"https://codeload.github.com/uzbl/uzbl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244570948,"owners_count":20474151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","unix-philosophy","uzbl","webkit"],"created_at":"2024-07-31T03:01:11.921Z","updated_at":"2025-03-20T07:32:24.770Z","avatar_url":"https://github.com/uzbl.png","language":"C","funding_links":[],"categories":["C","Desktop (GUI)"],"sub_categories":[],"readme":"# Event Manager\n\nThe default event manager provided with uzbl ships with behavior to help create\na \"standard\" browser experience. The base plugins which are shipped handle\nthings as fundumental as keyboard bindings, cookie preservation, providing a\nprogress bar for loading, and more.\n\nThe event manager accepts the following command line arguments:\n\n* `-c`, `--config` `CONFIG`\n  - Specifies the configuration file. Defaults to\n    `$XDG_CONFIG_HOME/uzbl/event-manager.conf`\n* `-s`, `--server-socket` `SOCKET`\n  - The location of the socket the event manager will create for uzbl instances\n    to connect to. Defaults to `$XDG_CACHE_HOME/uzbl/event_daemon`.\n* `-p`, `--pid-file` `FILE`\n  - The location of the pid file for use when the event manager is restarted or\n    stopped. Defaults to the socket's location with a `.pid` extension.\n* `-o`, `--log-file` `FILE`\n  - The log file to write to. Defaults to the socket's location with a `.log`\n    extension.\n* `-n`, `--no-daemon`\n  - Run in the foreground instead of forking into the background.\n* `-a`, `--auto-close`\n  - Shutdown the event manager when the last uzbl instance disconnects.\n* `-v`, `--verbose`\n  - Increases verbosity. May be specified multiple times.\n* `-q`, `--quiet-events`\n  - Turns off printing of events to stdout.\n\n## bind\n\nThe `bind` plugin implements keybindings via the following events:\n\n* `MODE_BIND \u003cmodespec\u003e \u003cbindspec\u003e = \u003ccommandspec\u003e`\n  - Adds a binding to the `\u003cmodespec\u003e` modes to execute `\u003ccommandspec\u003e`. See\n    below for details on what each means.\n* `BIND \u003cbindspec\u003e = \u003ccommand\u003e`\n  - Deprecated alias for `MODE_BIND global \u003cbind\u003e = \u003ccommandspec\u003e`.\n* `MODE_CHANGED \u003cmode\u003e`\n  - Changes the expected mode for keybindings. Also clears the current bind\n    parsing state.\n\nThe plugin stores the current mode in the `@mode` variable. Writes to this\nvariable are ignored; use the `MODE_CHANGED` event instead.\n\n### modespec\n\nA `modespec` is a comma-separated list of modes. Special modes include `global`\nwhich is active in all contexts, and `stack` which is used during multi-key\nparsing. In addition, an `-` may prefix a mode to exclude it during that mode\n(when combined with `global`). For example, `global,-insert` will activate the\nbinding for every mode except for `insert`. Modes may be selected using the\n`MODE_CHANGED` event.\n\n### bindspec\n\nA `bindspec` represents the series of keys which must be pressed to trigger a\ncommand. A `bindspec` may use the following characters to change the behavior\nof the binding to disambiguate bindings or to prompt for strings to use in the\ncommand:\n\n* `_`: The command will only be invoked after confirmation (return or enter).\n  Any text is matched and available to the command via the expansion rules.\n  These may be chained to ask for multiple values. May be prefixed with a\n  `promptspec` to change the prompt text.\n* `*`: The command will be invoked for each additional character. Any text is\n  matched and available to the command via the expansion rules.\n* `!`: The command will only be invoked after confirmation. This may be used to\n  allow bindings which are prefixes of others (e.g., bind `x` when `xx` is also\n  bound).\n* Any other character: The command will be invoked upon matching.\n\nBindings may be prefixed with modifiers which apply to the entire keybinding\n(up to a `_`). Modifier order does matter and when combined will only match if\nthe modifiers are given in alphabetical order.\n\n* `Ctrl`\n* `Mod1` (`Alt`)\n* `Mod5` (`RightAlt`)\n* `Shift`\n\nMouse buttons are represented as `\u003cXButtonY\u003e` where `X` is the number of\npresses for multiple clicks (i.e., `2` for a double click) and `Y` is the\nbutton number. Common button values are `1` for a left click, `2` for a middle\nclick, and `3` for a right click.\n\n### promptspec\n\nA prompt text may be specified for the `_` control character. It may use any of\nthe following specifications:\n\n* `\u003cprompt:\u003e`: Sets `@keycmd_prompt` to `prompt:`.\n* `\u003cprompt:value\u003e`: Sets `@keycmd_prompt` to `prompt:` and `@keycmd` to\n  `value`.\n* `\u003cprompt!command\u003e`: Sets `@keycmd_prompt` to `prompt` and executes `command`.\n\nIf `prompt`, `value`, or `command` contains spaces, it may be quoted. `prompt`\nmay also be an empty string.\n\n### commandspec\n\nThe command is an uzbl command which may use format string replacement:\n\n* `%s`: The string as given.\n* `%r`: The string, escaped and quoted for uzbl. The specifics of escaping has\n       changed to only be one level in all cases.\n* `%1`: The first prompt value or argument as parsed by uzbl (space-separated).\n* `%2`: The first prompt value or argument as parsed by uzbl (space-separated).\n* `%n`: The `n`th prompt value or argument as parsed by uzbl (space-separated).\n\n### Examples\n\n* `event MODE_BIND command o_ = uri %s`: In `command` mode, typing\n  `ouzbl.org\u003cEnter\u003e`, executes `uri uzbl.org`.\n* `event MODE_BIND command \u003cCtrl\u003exy = exit`: In `command` mode, pressing\n  `\u003cCtrl\u003ex` followed by `\u003cCtrl\u003ey` will exit uzbl. Releasing `\u003cCtrl\u003e` cancels\n  the binding.\n* `event MODE_BIND global /* = search find %s`: In `global` mode, pressing `/`\n  followed by any text will incrementally search for the text. Pressing\n  `\u003cEnter\u003e` will end the search.\n* `event MODE_BIND global \u003cCtrl\u003e/\u003csearch:\u003e_ = search find %s`: In `global`\n  mode, pressing `\u003cCtrl\u003e/` followed by any text followed by `\u003cEnter\u003e` will\n  search for the text.\n\n## completion\n\nProvides tab-completion in `command` mode. It completes variable names and\ncommand names. It uses the following commands:\n\n* `START_COMPLETION`\n  - Sets `@completion_list` to a space-separated list of span elements\n    containing potential values (or empty if there are fewer than two matches).\n    The matching portion uses `@hint_style` for that section.\n* `STOP_COMPLETION`\n  - Clears `@completion_list`.\n\n## config\n\nProvides a view into uzbl's current configuration values to other plugins. It\nuses the `CONFIG_CHANGED` event to indicate when a variable's value has\nchanged:\n\n* `CONFIG_CHANGED \u003cname\u003e \u003cvalue\u003e`\n  - Sent when the variable `name` has been set to a new value.\n\n## cookies\n\nProvides persistence of cookie data between uzbl instances. Provides the\nfollowing event listeners:\n\n* `BLACKLIST_COOKIE \u003ccookiespec\u003e`\n  - Blacklists matching cookies. Due to the way uzbl works, the cookies are\n    deleted after adding rather than blocked in the first place.\n* `WHITELIST_COOKIE \u003ccookiespec\u003e`\n  - Whitelists matching cookies.\n\nIf not `WHITELIST_COOKIE` rules are added, all cookies, not matching a\n`BLACKLIST_COOKIE` rule will be allowed. Cookies which match a\n`BLACKLIST_COOKIE` will always be denied.\n\nThere are multiple backends for cookie storage:\n\n* `null`\n* `memory`\n* `text`\n\nThe `null` store does not remember any cookies between sessions. The `memory`\nstore only stores cookies in the current instance. The `file` store uses a file\nusing the Mozilla cookie format to preserve cookies.\n\nCookies are stored in the following files (in decreasing precedence):\n\n* `$UZBL_COOKIE_FILE`\n* `$XDG_DATA_HOME/uzbl/cookies.txt`\n* `$HOME/.local/share/uzbl/cookies.txt`\n\nSession cookies are stored in the following files (in decreasing precedence):\n\n* `$UZBL_SESSION_COOKIE_FILE`\n* `$XDG_DATA_HOME/uzbl/session-cookies.txt`\n* `$HOME/.local/share/uzbl/session-cookies.txt`\n\nThese paths are determined at the daemon's startup, not on a per-uzbl basis.\n\nThe backend and paths may be configured in the configuration file:\n\n```ini\n[cookies]\nglobal.type = text\nglobal.path = \u003cdefault global cookie path\u003e\nsession.type = text\nsession.path = \u003cdefault session cookie path\u003e\n```\n\nAny cookies added or removed in one instance are shared with or deleted from\nall other instances sharing the same event manager.\n\n### cookiespec\n\nA `cookiespec` is an argument list of keyworded regular expressions. The\nsupported keywords:\n\n* `domain`: The domain name of the cookie source.\n* `path`: The path the cookie applies to.\n* `name`: The name of the cookie.\n* `value`: The content of the cookie.\n* `scheme`: Whether the cookie is for `http` or `https`. May end in `Only` if\n  it is specific to that scheme.\n* `expires`: The Unix timestamp of when the cookie expires.\n\nAs an example, `event WHITELIST_COOKIE domain 'github\\.com$'` would allow any\ncookie set by `github.com` (as well as any subdomains).\n\n## downloads\n\nWatches for download-related events and fills in `@downloads` with path and\nprogress information.\n\n## history\n\nProvides a readline-like history for the `command`-mode prompt. Uses the\nfollowing events:\n\n* `HISTORY_PREV`\n  - Selects the previous history item matching the current search.\n* `HISTORY_NEXT`\n  - Selects the next history item matching the current search.\n* `HISTORY_SEARCH`\n  - Sets the history search string and triggers `HISTORY_PREV`.\n\n## keycmd\n\nManages a prompt for use in the status bar. Uses the following events:\n\n* `APPEND_KEYCMD \u003ckeycmd\u003e`\n  - Appends to the current keycmd state.\n* `IGNORE_KEY \u003cglob\u003e`\n  - Ignores keys matching the glob. May be used to filter out keys such as\n    `\u003cShift\u003e` from the display (since it is implicit based on the character).\n* `INJECT_KEYCMD \u003ckeycmd\u003e`\n  - Inserts `keycmd` into the current keycmd at the current cursor position.\n* `KEYCMD_BACKSPACE`\n  - Removes the character at the cursor position.\n* `KEYCMD_DELETE`\n  - Removes the character after the cursor position.\n* `KEYCMD_EXEC_CURRENT`\n  - Requests execution of the current command.\n* `KEYCMD_STRIP_WORD [separators]`\n  - Deletes a word from the current cursor position using `separators` to\n    define word boundaries. Acts like `delete-word` in editors or shells. By\n    default, only a space character is considered a word separator.\n* `KEYCMD_CLEAR`\n  - Clear the current keycmd state.\n* `MODMAP \u003cold\u003e \u003cnew\u003e`\n  - Replaces `old` with `new` for modifiers. For example, it may be used to\n    rename `\u003cControl\u003e` to `\u003cCtrl\u003e`.\n* `SET_CURSOR_POS \u003cposition\u003e`\n  - Sets the current cursor position. Negative numbers are relative to the end\n    of the string. May also be the literal `-` or `+` to move the cursor\n    relative to its current position.\n* `SET_KEYCMD \u003ckeycmd\u003e`\n  - Sets the current keycmd state.\n\nThe following events are used as notification for actions:\n\n* `MODCMD_UPDATE \u003cmodstate\u003e \u003ckey\u003e`\n  - ???\n* `KEYCMD_UPDATE \u003cmodstate\u003e \u003ckey\u003e`\n  - ???\n* `NEW_KEY_IGNORE \u003cglob\u003e`\n  - Sent when a key glob is ignored.\n* `KEYCMD_CLEARED`\n  - Sent to indicate the `@keycmd` variable has been cleared.\n* `MODCMD_CLEARED`\n  - Sent to indicate the `@modcmd` variable has been cleared.\n* `KEYCMD_EXEC \u003cmodcmd\u003e \u003ckeycmd\u003e`\n  - Sent to indicate that execution of a command has been requested.\n* `NEW_MODMAP \u003cold\u003e \u003cnew\u003e`\n  - Sent to notify that a new modifier mapping has been added.\n\n### Configuration\n\nThe `@modcmd_updates` and `@keycmd_events` may be set to `0` to disable\nupdating the `@modcmd` and `@keycmd` variables. The `@keycmd` variable is HTML\nmarkup using `@cursor_style` to indicate the current cursor position.\n\n## mode\n\nImplements a modal interface for uzbl. Uses the following events:\n\n* `MODE_CONFIG \u003cmode\u003e \u003cvariable\u003e \u003cvalue\u003e`\n  - When `mode` is entered, sets `variable` to `value`.\n* `MODE_CONFIRM \u003cmode\u003e`\n  - Used internally.\n\nThe following events are used as notification for actions:\n\n* `MODE_CHANGED \u003cmode\u003e`\n  - Sent when a mode change is complete.\n\nThe plugin also manages the following variables:\n\n- `@mode`: The current mode.\n- `@default_mode`: The mode to use if `@mode` is ever set to the empty string.\n\n## on\\_event\n\nImplements event chaining and reactions. Uses the following events:\n\n* `ON_EVENT \u003cevent\u003e \u003ccommandspec\u003e`\n  - Registers `command` to be executed when an event named `event` is seen. The\n    command may be formatted using the arguments the original event received.\n\n## on\\_set\n\nImplements reactions to variable set events. Uses the following events:\n\n* `ON_SET \u003cglob\u003e \u003ccommandspec\u003e`\n  - When a variable matching `glob` is set to a new value, execute `command`\n    with the new value as an argument.\n\n## progress\\_bar\n\nImplements a progress bar for page loading. Uses the following variables:\n\n* `@progress.format`: The format string for the `@progress.output` variable.\n  Defaults to `[%d\u003e%p]%c`.\n* `@progress.done`: The character to use for filling the `done` section of the\n  progress bar. Defaults to `=`.\n* `@progress.pending`: The character to use for filling the `pending` section\n  of the progress bar. Defaults to ` ` (space).\n* `@progress.spinner`: The characters to use for the spinner. Defaults to\n  `-\\|/`.\n* `@progress.sprites`: The characters to use for the sprite. Defaults to\n  `loading`.\n* `@progress.width`: The width of the progress bar. Defaults to 8.\n\nThe current progress output is \n\n### Progress format\n\n* `%d`: The `done` character repeated to fill its space within the progress\n  bar.\n* `%p`: The `pending` character repeated to fill its space within the progress\n  bar.\n* `%s`: Current spinner character.\n* `%r`: Current sprite character.\n* `%c`: The percentage complete (with `%`).\n* `%i`: The percentage complete as an integer.\n* `%o`: The percentage pending as an integer.\n* `%t`: The percentage pending (with `%`).\n* `%%`: A literal `%`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzbl%2Fuzbl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuzbl%2Fuzbl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzbl%2Fuzbl/lists"}