brave
The community/apps/brave
directory contains files that provide Talon voice control for the Brave browser.
The file brave.talon
defines the application tag for the Brave browser. It sets the browser
and user.tabs
tags, which are used by other Talon scripts to apply browser-specific commands and tab-related commands, respectively.
The file brave.py
defines the application context and custom actions for Brave. It defines the app using multiple formats to handle the differences between platforms and app names. The UserActions
class contains a custom tab_close_wrapper
action that adds a short sleep before closing a tab. The BrowserActions
class contains a show_extensions
action that opens a new tab and navigates to brave://extensions
, which is the URL for the extensions management page.
These two files work together to enable basic Brave browser control. The .talon
file tags the application, allowing the .py
file to use the ctx.matches
to apply the contained action implementations.