Skip to content

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 (app and user classes):

    • tab_next and tab_previous map to ctrl-pagedown and ctrl-pageup respectively.
    • tab_jump maps to alt-<number>, allowing direct jumps to a specific tab.
  • Navigation & Folder Interaction (user class):

    • go_back and go_forward trigger alt-left and alt-right to traverse the folder history.
    • file_manager_open_parent sends alt-up to move up to the parent directory.
    • file_manager_show_properties uses ctrl-i to pull up the file/folder info dialog.
    • file_manager_open_directory focuses the location bar using ctrl-l, types in a target path, and presses enter.
    • file_manager_new_folder sends ctrl-shift-n to create a new folder and inserts a folder name if one is dictated.
  • Terminal Integration:

    • The file_manager_terminal_here action highlights how Python and Talon APIs interact: it selects the address bar (ctrl-l), captures the current path into the clipboard using clip.capture(), and then invokes ui.launch to open a fresh instance of gnome-terminal set directly to that working directory.