Skip to content

are_you_sure

The are_you_sure plugin provides a way to require confirmation before executing a potentially destructive action. It displays a message to the user with "Yes I am sure" and "Cancel" buttons.

The core logic is implemented in are_you_sure.py. This file defines the ConfirmationState class which manages the state of the confirmation dialog, including the message, the actions to be performed on confirmation or cancellation, and the display of the ImGUI window. The actions.user.are_you_sure_set_on_confirmation_action action sets the confirmation message and callbacks, and displays the dialog. The actions.user.are_you_sure_confirm action performs the registered action, and the actions.user.are_you_sure_cancel action cancels the registered action. The ImGUI window is defined in the gui function.

The are_you_sure.talon file contains the Talon commands that trigger the confirm and cancel actions in the are_you_sure dialog. It activates when the user.are_you_sure tag is active.

The README.md file describes how to use the are_you_sure plugin, provides a simple example, and links to the source code. The example demonstrates how to use the actions.user.are_you_sure_set_on_confirmation_action to prompt a user before calling the app.notify action.