phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Sending events to Phoenix

Open sheki opened this issue 9 years ago • 6 comments

I would like to tirgger Phoenix events via and API / library.

This way I can trigger Phoenix actions via "Alfred" or some other tool instead of relying on keyboard shortcuts. ( I am bad at remembering).

Is this a valid feature request or out of scope for this project ? I can look into an implementation if there is consensus.

sheki avatar Sep 20 '16 18:09 sheki

If there’s a simple way of integrating this to the current Event API, then perhaps. For example by using NSDistributedNotificationCenter. (I personally haven’t used launchers, so I’m not that familiar how they interoperate between apps.) I would rather not add too much complexity to keep the project simple.

kasper avatar Sep 21 '16 04:09 kasper

I've thought about the same thing, for example changing phoenix layouts and behaviour based on other system events than what is available, or generally passing any information to phoenix. This could be emulated somewhat through tasks (by polling) though.

mafredri avatar Sep 24 '16 07:09 mafredri

Adding support for new system events is certainly possibly, if there’s a clear use case for it.

kasper avatar Sep 24 '16 07:09 kasper

Could be implemented along with #53.

kasper avatar Nov 26 '16 16:11 kasper

If anyone else is looking for a cheeky solution i have right now. Just set your phoenix script up with a hotkey, and then trigger the hotkey via osascript in the terminal

osascript -e 'tell application "System Events" to keystroke "l" using {command down, option down}'

can turn that into a bash alias if your want it even easier by adding this to your .zshrc or .bashrc

alias triggerPhoenixHotkey='osascript -e "tell application \"System Events\" to keystroke \"l\" using {command down, option down}"'

WybeBosch avatar Oct 25 '23 17:10 WybeBosch