Skip to content

mintty

The community/apps/mintty directory contains configuration for the Mintty terminal application on Windows.

The primary file in this directory is mintty_win.py. This file defines a Talon context that is active when the application name is "Terminal" or "mintty.exe" on Windows. It adds several tags to the context: terminal, user.generic_unix_shell, user.file_manager, user.git, and user.kubectl. This suggests that this configuration is intended to provide a common set of actions for use when using Mintty as a terminal emulator or file manager.

The file defines a setting cygpath that is used to convert between Cygwin paths and Windows paths. The get_win_path function uses this setting to call the cygpath.exe to perform the conversion. This is likely used to allow talon scripts to interact with the Windows filesystem using its native paths. This is important because the paths used in the terminal emulator itself are often different from Windows paths.

The EditActions class remaps some of the common editing actions. This includes paste which is mapped to shift-insert and copy which is mapped to ctrl-insert. delete_line is mapped to ctrl-u.

The UserActions class defines a number of user actions:

  • file_manager_open_parent: Inserts the command to change to the parent directory.
  • file_manager_current_path: Attempts to return the current path based on the window title by calling get_win_path.
  • file_manager_show_properties: This action is present, but does nothing in this context.
  • file_manager_open_directory: Inserts the command to open a specific directory.
  • file_manager_select_directory: Inserts the specified directory path.
  • file_manager_new_folder: Inserts the command to create a new folder.
  • file_manager_open_file: Inserts the command to open a file
  • file_manager_select_file: Inserts the specified file path.
  • file_manager_open_volume: Opens a directory by calling the file_manager_open_directory user action.
  • terminal_list_directories: Inserts the command to list the current directory.
  • terminal_list_all_directories: Inserts the command to list all the directories, including hidden ones.
  • terminal_change_directory: Inserts the command to change to a specific directory.
  • terminal_change_directory_root: Inserts the command to change to the root directory.
  • terminal_clear_screen: Clears the terminal screen.
  • terminal_run_last: Re-runs the last command.
  • terminal_kill_all: Sends a cancel signal to the terminal.

Together, these actions provide a common way of interacting with the Mintty terminal as a command line interface, and as a way to navigate the file system.