Trigger Conditions

Starting with BTT 3.860, every trigger does have advanced trigger conditions. If a trigger is triggered, BTT will evaluate these conditions and only if they are fulfilled it will execute the trigger's assigned actions.

Example: Use one gesture for all your window snapping needs

This example makes use of the "percent_x_hovered_win_btm_left / percent_y_hovered_win_btm_left" variable to execute different actions depending on the location of the mouse in the hovered window:

Details on how to set this up: https://community.folivora.ai/t/using-one-gesture-for-all-your-window-management/28336

Another example: use the number of fingers touching the trackpad to execute different functionality: https://community.folivora.ai/t/use-number-of-fingers-touching-the-trackpad-as-modifier-for-keyboard-shortcuts/28272


How to Setup Trigger Conditions


Available Variables

Currently the following variables are available and can be used in conditions:

Information about UI elements

  • visible_window_list

    • This lets you check for specific windows. You can see the list of currently visible windows by clicking the "Visible Windows Viewer" button on the top right. Afterwards you can use the "contains" condition to check whether the list contains a specific window.
  • hovered_element_details

    • This gives information about the currently hovered UI element. You can view the current information by pressing the "UI Element Viewer. You can use the "contains" condition to check if the details shown in the "UI Element Viewer" contain a specific text.
  • focused_element_details.
  • color_under_cursor
    • The hex color of the pixel at the cursor location

Mouse Buttons

  • left_mouse_down
  • middle_mouse_down
  • right_mouse_down

Touches

  • fingers_touching_trackpad
  • thumb_recognized
    • If a thumb has been recognized on the trackpad, this will be one. Otherwise 0
  • thumb_x_percent
  • thumb_y_percent
  • fingers_touching_magic_mouse

Mouse Position (from Top Left Corner:)

  • mouse_position_x
  • mouse_position_y
  • mouse_pos_percent_x
  • mouse_pos_percent_y

Mouse position in active window:

  • dist_x_active_win_top_left
  • dist_y_active_win_top_left

  • dist_x_active_win_top_right
  • dist_y_active_win_top_right

  • dist_x_active_win_btm_left
  • dist_y_active_win_btm_left

  • dist_x_active_win_btm_right
  • dist_y_active_win_btm_right

  • percent_x_active_win_btm_left
  • percent_y_active_win_btm_left

  • percent_x_hovered_win_btm_left
  • percent_y_hovered_win_btm_left

Frame of screen with mouse:

  • mouse_screen_x
  • mouse_screen_y
  • mouse_screen_width
  • mouse_screen_height

Frame of screen with focused window:

  • focused_screen_x
  • focused_screen_y
  • focused_screen_width
  • focused_screen_height

Variables:

  • BTTLastTriggeredAction
  • BTTLastTriggeredUUID
  • BTTLastTriggerTime
  • BTTActiveAppBundleIdentifier

  • Any custom variable you define can also be used.

results matching ""

    No results matching ""