Code Monkey home page Code Monkey logo

alfred-maestro's People

Contributors

iansinnott avatar maltsev avatar mpco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-maestro's Issues

Apple Silicon support

This is the only Alfred workflow I use daily that doesn't work on Big Sur on my M1 Mac mini.

When run and watching status in the Alfred Debugger, I get a segmentation fault in "Alfred-maestro":

[08:15:58.863] Alfred Maestro[Script Filter] Queuing argument ''
[08:15:58.953] Alfred Maestro[Script Filter] Script with argv '' finished
[08:15:58.957] ERROR: Alfred Maestro[Script Filter] Code 139: /Users/tbrown/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/88A3D907-9F16-491E-86A7-634FC4ACA163: line 1: 39585 Segmentation fault: 11 ./alfred-maestro "$1"
[08:16:10.713] Logging Stopped.
[08:24:56.025] Logging Started...
[08:25:06.217] Alfred Maestro[Script Filter] Queuing argument ''
[08:25:06.309] Alfred Maestro[Script Filter] Script with argv '' finished
[08:25:06.314] ERROR: Alfred Maestro[Script Filter] Code 139: /Users/tbrown/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/8B2B22BA-40FB-48C3-9048-C3A4CE2D8A37: line 1: 40663 Segmentation fault: 11 ./alfred-maestro "$1"
[08:25:07.546] Alfred Maestro[Script Filter] Queuing argument 'd'
[08:25:07.667] Alfred Maestro[Script Filter] Script with argv 'd' finished
[08:25:07.674] ERROR: Alfred Maestro[Script Filter] Code 139: /Users/tbrown/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/8B2B22BA-40FB-48C3-9048-C3A4CE2D8A37: line 1: 40665 Segmentation fault: 11 ./alfred-maestro "$1"

Since Alfred-maestro is an x86 executable, this is running under Rosetta. I have just upgraded to macOS 11.1, which purports to have some upgrades to Rosetta, but it still doesn't work. If I run Alfred-maestro from the command line using arch -x86_64 ./alfred_maestro in Terminal I also get a segmentation fault.

The scripts in the workflow directory work properly and find my Keyboard Maestro macros.

Any help or suggestions?

show hotkey triggers in the subtext of each macro

Right now the subfields are currently quite useless as they just repeat the text from the main field. These ones :

2016-11-30 at 15 18

I wish instead it would show the hotkey trigger that is used for this macro. These ones :

2016-11-30 at 15 20

This would be absolutely phenomenal to have.

Search for macro by UUID?

I use a lot of iOS shortcuts to trigger KM macros, via "open url" kmtrigger://macro=DHD773-99IU-6D44-893D-XXXXXXXX

Later when I want to modify one of those macros, I glance at shortcuts, see the UUID, and search KM by the last few digits. Any way to implement in this shortcut?

Possible to enable result caching to improve speed.

The macro in KM usually doesn't change that often, I am wondering for the next update is it possible to add "cache result" to improve the speed. Sometimes when I type too fast, the tiny lag cause triggering the wrong macro. Thanks for the great work, this is my most used Alfred workflow. :)

open km alfred prompt to show macros only scoped to current active window

Would it be possible to do?

For example, I am in Safari, I trigger a script filter and it will only show me macros that are scoped to this application as well as global macros I have made.

Here is what I mean :

2016-09-19 at 18 16

I just want macros shown from this group and the global ones that I have.

This would be very useful for me. Thank you.

NSXML Parse Error

I also posted this on the Alfred Forums. When I load Alfred and start typing "KM" I see the "do KM" command very briefly and then it disappears. Looking in the console I see this error from the moments I attempt to use the plugin:

12/4/13 5:55:17.479 PM Alfred 2[378]: [ERROR] Script XML Parse Error occured Error Domain=NSXMLParserErrorDomain Code=4 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)" UserInfo=0x60000027f500 {NSXMLParserErrorColumn=1, NSXMLParserErrorLineNumber=1, NSXMLParserErrorMessage=Document is empty
}

How to pass arguments to a keyboard maestro macro?

Hey Ian,

I don't know if this is documented somewhere, but is it possible to use alfred maestro to pass arguments into a keyboard maestro macro.

Meaning I could type 'km drive taxes' and then run a keyboard maestro macro that supplies 'taxes' or '$@' into my macro as a query param to google.com or use those variables however I want.

I would love to see an example of that if that’s possible.

Thanks so much.

Open the macro in Keyboard Maestro editor

It would be really awesome if you could open the macro in the KM editor for editing instead of running the macro. Perhaps do it with a modifier key users can set.

I can help add this but I am not very familiar with PHP.

Big Sur

Hi, anyone got this working in Big Sur at all ?

Have it working in Catalina following the advice in #25 but no luck with Big Sur.

Is it broken or just more macOS permission issues ?

Thanks

Search through a list of recently ran macros

Not sure if KM provides the list but I believe it should.

It would be great if we could search through a list of recently ran macros, sorted by the last time they were fired off (most recent top).

Not picking up macros in scoped folders

I just installed the workflow, everything seems to work just fine. But when adding a new macro it just will not show up in the results. Do I need to clear some sort of cache?

Alfred Maestro v2 Meta Issue

Let's figure out what new changes would be helpful in the next version! This lib has been exactly what I myself needed for a while now so I haven't given a whole lot of thought to possible improvements. But @nikitavoloboev has made some good suggestions in the past and I think aggregating all suggestions together here will help bring them to fruition.

IMPORTANT NOTE: The feasibility of any of these features depends entirely on the KM scripting API. So some features might actually be impossible to implement without changes to KM itself.

So, with that said, let's talk features. Here are some ideas that have been raised in the past:

  • #12 Open the macro in Keyboard Maestro editor
  • #10 Show the folder where the macro is in in Subtitle
  • #8 Show hotkey triggers in the subtext of each macro

Furthermore, I wrote this lib a long time ago when PHP was my primary language but that has since changed and probably hinders contributions to this library. So, I'm considering a full rewrite in either Python or JavaScript (Sidenote: this whole lib is less than 200 lines of code, so a full rewrite shouldn't be too onerous).

I'm interested in feedback on all of this and if anyone has ideas on other features that would make this lib more useful please add them!

Find easy way to install workflow during development

Currently during the development, I use a custom make command to copy the executable to the workflow directory to test it. This works well, but since the Alfred workflows directory might have a different path on other developer's machine my command won't be really useful for them.

We could use alfred CLI tool and its link command for that (thanks @nikitavoloboev for the suggestion!).

Another solution is to find a way to determine a path of the Alfred workflows directory. Then my script could be used by other developers. Though, by now I've found no easy way to determine the path.

Publish workflow to Packal

Packal is a directory of Alfred workflows. It'd good to submit alfred-maestro to it, so more people find out about it and start using it.

@iansinnott would you prefer to submit it to your own account or let me do that?

KM Workflow only finding *Global Macros*

I'm using your lovely Alfred Workflow for KM but it's only finding Global Macros. Am I doing it right?

OS X 10.9
Keyboard Maestro 6.3
PHP = ? (how do I find out?)

[SUGGESTIONS] Create a (better) Fallback Search than mine

Details

I'd like to conveniently call Keyboard Maestro macro by name as default fallback. My current implementation is adding a Fallback Search trigger and connecting it to Script Filter like this:
Screen Shot 2021-01-21 at 01 33 31

However, I'd like to trigger the closest match when I hit the KM fallback option, if possible.

I have no experience in Go, with little experience with AppleScript. Open to discussion, and might help if I can.

Search through KM macro groups to go to

Below script would jump to Global Macro Group in KM:

try
	set macroGroupName to "Global Macro Group"
	
	tell application "Keyboard Maestro"
		
		if macro group macroGroupName exists then
			select macro group macroGroupName
		else
			error "Cannot select macro group " & macroGroupName & " — it is missing!"
		end if
		
	end tell
	
on error e number n
	set e to e & return & return & "Num: " & n
	if n  -128 then
		try
			tell application (path to frontmost application as text) to set ddButton to button returned of ¬
				(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
					default button "OK" giving up after 30)
			if ddButton = "Copy Error Message" then set the clipboard to e
		end try
	end if
end try

try
	
	tell application "System Events"
		tell application process "Keyboard Maestro"
			tell window "Keyboard Maestro Editor"
				tell scroll area 2 of splitter group 1 of group 1
					set focused to true
				end tell
			end tell
		end tell
	end tell
	
on error e number n
	set e to e & return & return & "Num: " & n
	if n  -128 then
		try
			tell application (path to frontmost application as text) to set ddButton to button returned of ¬
				(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
					default button "OK" giving up after 30)
			if ddButton = "Copy Error Message" then set the clipboard to e
		end try
	end if
end try

------------------------------------------------------------------------------

We need to get a list of KM groups and then search through them like we do with macros. On activate, we should jump to the list.

Show the macro group the macro is in

I would like to see the macro groups that the macros I am searching are placed in. I know subtext is currently being used to show active hotkey triggers. Perhaps we could also add the macro group in there as prefix?

i.e. It would show: 2Do: ⌘↵ on a task that is placed in 2Do group with ⌘↵ as hotkey trigger.

What do you think?

Custom Macros Not Showing

Hello,

When using your Alfred workflow, I am unable to pull up my custom macros. Only the default macros show up.

Possible issues:

  1. I am syncing my macros via a dropbox folder.
  2. These macros are app-specific. Even when I summon Alfred from within the app, the macros do not show.

Thanks for your help!

Not working

  • running Mavericks and php 5.4.17 (preinstalled; I don't know how to upgrade it)
  • downloaded and installed ("just double click the .alfredworkflow file")
  • I invoke "km" in Alfred and … nothing happens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.