Jump to content

How to trigger a Workflow when I switch to a different app?


Recommended Posts

I have different input methods.

 

Is there a way to automatically switch the input method when i focus on different app?

 

For example, when i open iTerm2, the input method should be "com.apple.keylayout.ABC (ABC)", and when i open chrome, the input method should be "com.sogou.inputmethod.sogou.pinyin (搜狗拼音)"

 

I already have a tool to change the input method, It's a binary executable file.

The problem is that i need to execute the binary tool at the right time.

 

Can alfred help me to trigger a workflow to execute this tool?

None of the triggers seemed to meet my needs.

image.png.927ec74f2c78502139bfcfb5e5410915.png

 

macOS Monterey 12.5.1

Alfred 5.0.2

Edited by victordong
Link to comment
On 9/9/2022 at 12:50 AM, vitor said:

Alfred, by design, needs to be explicitly called. What you can do is have a Workflow which will open/focus the app and run your executable to change the input.

I wrote a script. It's running in the background and run my executable to change the input when i open/focus the app.
Anyway,Thank you for your advice!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...