Skip to content

slack

The community/apps/slack directory contains files that provide Talon voice control for the Slack application. It includes platform-specific configurations for macOS, Windows, and Linux.

The core logic for identifying and activating the Slack application is in slack.py. This file defines the application context for Slack, specifying its names and bundle identifiers across different operating systems. It also provides a basic line_insert_down action for all platforms.

The remaining files in this directory define actions and commands specific to each operating system. slack_win.py and slack_mac.py contain Python code that define actions based on the user action class to manipulate Slack. slack_win.talon and slack_mac.talon provide the voice commands that will trigger those actions.

Here is a summary of the files and how they work together:

  • slack.py: This file defines the application context for Slack and provides a basic line_insert_down action.

  • slack_win.py: Defines the user action class for Windows and Linux, providing actions to navigate workspaces, channels, and messaging features. These actions are invoked by voice commands in slack_win.talon.

  • slack_mac.talon: Contains Talon commands for macOS, utilizing the user actions defined in slack_mac.py, and also defines many more commands, such as for formatting, calls, and sidebar navigation. It defines a messaging tag for use in other files.

  • slack_win.talon: Contains Talon commands for Windows and Linux, utilizing the user actions defined in slack_win.py. It is similar to slack_mac.talon and defines a messaging tag for use in other files.

  • slack_mac.py: Defines the user action class for macOS, providing actions to navigate workspaces, channels, and messaging features. These actions are invoked by voice commands in slack_mac.talon.

In summary, these files provide a complete set of tools to control Slack through voice commands on macOS, Windows, and Linux. The .py files define the actions, while the .talon files provide the voice commands to trigger those actions. The messaging tag is used in both the slack_win.talon and slack_mac.talon files, indicating that many of the commands are related to messaging.