firefox
The community/apps/firefox
directory contains files that add support for the Firefox browser to Talon. This includes defining the application context, and implementing actions for controlling the browser.
The core logic is in these files:
* firefox.py
: This file defines the application context for Firefox, matching different operating systems and Firefox variants. It also defines the firefox_bookmarks_sidebar
and firefox_history_sidebar
actions, which are implemented differently per operating system. It also contains some generic browser actions, such as focus_page
which focuses the address bar and triggers the find dialog, and go_home
.
* firefox_win_linux.py
: This file defines actions specific to Windows and Linux, including firefox_bookmarks_sidebar
, firefox_history_sidebar
, focus_address
, open_private_window
, show_downloads
, show_extensions
, and show_history
. It leverages the actions.key
function to send keyboard shortcuts for these actions.
* firefox_mac.py
: This file defines actions specific to macOS, including firefox_bookmarks_sidebar
, firefox_history_sidebar
, bookmarks
, open_private_window
, show_downloads
, and show_extensions
. Similar to firefox_win_linux.py
, it leverages actions.key
to send keyboard shortcuts for these actions.
The file firefox.talon
provides the voice commands to trigger the actions defined in the Python files. It defines voice commands such as "tab search" and "sidebar bookmarks" to interact with the browser. These commands use the browser.focus_address
and user.firefox_bookmarks_sidebar
actions.
These files work together by first defining the Firefox application context and then defining operating system-specific implementations for browser actions. The .talon
file then binds voice commands to these actions.