safari
The community/apps/safari
directory contains files that add support for the Safari browser to Talon.
The core logic is in safari.py
. This file defines a Talon module and context for Safari. It specifies that the module applies to the Safari app using its bundle identifiers. The UserActions
class defines the browser_open_address_in_new_tab()
action which opens the current address in a new tab. The BrowserActions
class defines several browser-specific actions, including:
address()
: Retrieves the current address from the address bar. It attempts to get the address via the accessibility API first, and falls back to AppleScript if that fails.bookmark_tabs()
: Raises aNotImplementedError
because Safari does not have a default shortcut.show_clear_cache()
: Raises aNotImplementedError
because Safari does not have a shortcut.reload_hard()
: Performs a hard reload usingcmd-alt-r
.show_downloads()
: Opens the downloads window usingcmd-alt-l
.show_extensions()
: Opens the extensions settings usingcmd-, tab:8 space
.
safari.talon
is a simple Talon file that applies the browser
and user.tabs
tags when Safari is the active application. These tags likely enable other parts of the Talon configuration.