nautilus
Nautilus File Manager Support
This directory provides Talon voice control integration for the GNOME Nautilus file manager, as well as its MATE desktop fork, Caja, on Linux. It standardizes generic file manager and tab-related commands so that users can interact with Nautilus using the same consistent voice commands they use across other file managers and browsers in their system.
The implementation consists of two core files that work together:
- nautilus.talon activates the appropriate context and capabilities.
- nautilus.py contains the application matcher definitions and implements the specific keystrokes needed to perform various actions.
Application Definition and Context
In nautilus.py, a Module is used to declare the target applications on Linux:
nautilus(using the executable name)Org.gnome.Nautilus(using the modern GNOME application identifier)Caja(the MATE file manager fork)
Once one of these applications gains focus, the Talon context defined in nautilus.py matches, and the rules in nautilus.talon are applied. This file tags the active window with:
user.tabs: Enables generic voice commands for tab navigation.user.file_manager: Enables generic voice commands for manipulating files, folders, and directories.
Action Implementations
To bridge Talon's generic commands to the application's actual interface, nautilus.py overrides several default action classes:
-
Tab Management (
appanduserclasses):tab_nextandtab_previousmap toctrl-pagedownandctrl-pageuprespectively.tab_jumpmaps toalt-<number>, allowing direct jumps to a specific tab.
-
Navigation & Folder Interaction (
userclass):go_backandgo_forwardtriggeralt-leftandalt-rightto traverse the folder history.file_manager_open_parentsendsalt-upto move up to the parent directory.file_manager_show_propertiesusesctrl-ito pull up the file/folder info dialog.file_manager_open_directoryfocuses the location bar usingctrl-l, types in a target path, and pressesenter.file_manager_new_foldersendsctrl-shift-nto create a new folder and inserts a folder name if one is dictated.
-
Terminal Integration:
- The
file_manager_terminal_hereaction highlights how Python and Talon APIs interact: it selects the address bar (ctrl-l), captures the current path into the clipboard usingclip.capture(), and then invokesui.launchto open a fresh instance ofgnome-terminalset directly to that working directory.
- The