Jump to content

luckman212

Member
  • Posts

    382
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by luckman212

  1. Alfred 5.1.3 [2174] Bit of an odd question, but I noticed today that when Script Filters are triggered via a Hotkey, they appear with the workflow's icon at the top right, like this: But, the same Script Filter, triggered via its own keyword, is missing the icon (or shows Alfred's hat if configured in Theme settings) I was wondering if this was intentional, and is there any way to manually control whether the icon appears or not in the Script Filter configuration itself? It would be nice to actually have it display the icon in certain cases.
  2. This workflow is staggeringly useful 🏆 I agree with @pontus that Alfred should "bake this in" to his core functionality.
  3. That was indeed super helpful @vitor I think I've done it. But if you wouldn't mind terribly, I'd appreciate if you could test v0.0.4 which should be codesigned + notarised. https://github.com/luckman212/alfred-get-deeplink-to-object/releases/tag/0.0.4
  4. Oh shoot. Well that sounds a lot slower. I have an active Developer ID so I can sign the binary and upload a new version. Will do that now... Also, I think I tried installing using the Xcode Python3.9 that gets installed at /usr/bin/python3, something like /usr/bin/python3 -m pip install --isolated --target=./lib pyobjc but I seem to remember that failing too for some reason. I expect it's due to https://xkcd.com/1987/ So I will try to make the Swift method smoother.
  5. I thought this workflow might be useful to some (for sure it's a small group!) - so posting it here. It copies a "deeplink" to a specific workflow object, which is a link that uses the alfredpreferences:// URI scheme to open the Workflow Editor directly to a specific Workflow, with a specific Object highlighted. This might be useful to developers, or anyone really, for keeping notes or internal documentation about specific Workflows you're working on. See README for details on how to use... Requires Python3 + Alfred 5.1+ https://github.com/luckman212/alfred-get-deeplink-to-objec
  6. Thanks again @vitor I struggled for a while with how to bundle the pyobjc dependency along with the workflow, e.g. in a ./lib directory. But, it seems that it's bound tightly to the exact Python version installed. Which could be 3.9, 3.10, 3.11... I gave up and just replaced the whole thing with a small Swift program to read the data I needed from the OS Pasteboard. This is probably faster too, and so no longer requires pyobjc at all 🎉 https://github.com/luckman212/alfred-get-deeplink-to-object https://www.alfredforum.com/topic/18390-get-currently-edited-workflow-uri/?do=findComment&comment=108605
  7. Ok, I see your points. I'll rethink the best way to do this. I wanted a form of output that allows the user to copy a bit of text for pasting into a Terminal. Plus I spent so much time making this silly thing 😊 I guess I could use the "Terminal Command" workflow object to open a new Terminal and display some text there.
  8. I was wondering if there was a URI scheme e.g. alfredpreferences://openDebugger that could be called from within a running workflow to open the debugger, for example to alert the user about some error that has occurred. If there isn't such a thing, please consider this a feature request!
  9. In case it's useful to anyone, I created a small workflow / Python script that composes an alfredpreferences:// URI that links to the last object whose config you copied (⌘C from Workflow Editor). The default trigger is a hotkey ⇧⌘C while in Alfred Preferences. Here it is: https://github.com/luckman212/alfred-get-deeplink-to-object update: I just uploaded v0.0.3 of this workflow, that removes the external dependency on pyobjc. Makes it more portable, let me know if anyone gives this a try!
  10. Alfred 5.1.2 (2145) macOS 13.5 (22G74) I think I've written in about this a long time ago, but for the life of me I can't find the thread now. So... I occasionally have a problem where Alfred will hang (beachball) either when clicking on his Hat, or when results are about to be shown in his popup window. The beachball will persist for 15-20 seconds and eventually control will return, but he will beachball again if reactivated. The conditions to trigger this are not certain, but I am pretty sure this only happens when I am remotely controlling my Mac. I think it could be related to Universal Clipboard, because it seems like what's happening is Alfred is waiting for the OS to respond with the clipboard contents from a remote Mac, which for whatever reason never arrives, so he hangs. This was happening to me repeatedly a few days ago and I managed to capture 2 spindumps and 2 process samples from Activity Monitor. Below is a screenshot as well. Not sure if those contain any private info so I'd rather not post them here. Can I send them in via private message etc?
  11. Want to add one FR follow-on to this thread: It would be a nice quality of life addition if, when triggering Alfred to open his Preferences by typing Cmd⌘+comma, he would open directly to whichever workflow was responsible for generating the selected result. For example, if I have a workflow with a script filter that generates a list of recently copied images, it would be excellent if pressing ⌘+, would jump right into that workflow's editor, with the script filter object highlighted.
  12. Nice! Yep indeed, encoding the >'s as %3E worked, I can now print an Alfred URI in iTerm and jump right to the Workflow with a single click. Neat.
  13. Thanks @vitor for those! I edited my post above when I found the URI scheme, in this case I was looking for a way to display a clickable link in my Terminal that directly opened the workflow. Alas, iTerm doesn't seem to like the `>` characters. Maybe I need to URL encode them.
  14. Happens to me once in a while too. Haven't been able to pin it down, but I think this has something to do with Universal Clipboard because it happens most often when I am switching between devices or copy/pasting while remotely controlling my Mac Mini from my laptop etc. Seems like Alfred is hanging waiting to receive the clipboard contents from the other machine. Next time it happens I'll try to sample too.
  15. Is there a URI scheme for this? I see you can use, e.g. open alfredpreferences://navigateto/workflows But I couldn't figure out how to "reveal" or jump directly to a specific workflow by it's bundle ID or UUID... edit: nevermind ! I re-read the thread and found the info I was looking for! 🏆 open 'alfredpreferences://navigateto/workflows>workflow>user.workflow.F24C147F-7520-433E-99C4-EE677C831A95'
  16. Alright, thank you for the help & explanation @Andrew and @vitor I understand now. The only suggestion I might leave you with is this: If the "with space" option relates to the arg rather than the keyword, I think it would make more sense to place the checkbox to the right of the popup. So it would read (left to right) in a way that better describes the behaviour. E.g. "Keyword totp — argument required with space" Instead of "Keyword totp with space, argument required"
  17. Ok thanks @vitor I need to spend more time wrapping my head around this. I can't believe I've been using Alfred for 5 years now and just now coming to understand how this worked. Guess I never paid much attention to it. Still think it would be very nice to have a global option (even a hidden defaults write com.runningwithcrayons.Alfred alternate_withspace_handling -bool TRUE would be fine)
  18. @vitor You're right (of course 🙂), I tested & the behavior is the same going back even as far as Alfred 4.7.1306. I can't imagine how I never noticed this! But it raises a question. Consider the following situation: ScriptFilter 1: - trigger keyword: `app` - with space ScriptFilter 2: - trigger keyword: `appstore` - with space - Alfred filters results - needs to be able to run with no args How can Alfred be configured such that: - You want to run the `appstore` script - do not trigger `app` script to run as you are typing `a-p-p-s..` - do not trigger `app` to run with `store` as a parameter - still be able to run `app` without any args to show all results Here's another test workflow to play around with this: https://github.com/luckman212/alfredworkflows/raw/master/sftest2.alfredworkflow In general, I don't understand why enabling the checkbox "with space" would not prevent Alfred from running the script UNTIL a space is typed. This seems wholly counterintuitive. @Andrew regarding what you said above: would you consider changing this behavior, or at least making a global option to NOT run the scripts until the user types the space? For me, some of my scripts return lots of results, so what ends up happening is the results I'm looking for get "pushed down" or cluttered with unintended Script Filter results. (Not to mention, sometimes there are wasted API calls because scripts are firing when they shouldn't be)
  19. @vitor can you please test the attached workflow and let me know if you believe that the behavior of the .sf3* keywords is correct/expected? I feel that since the script filter is configured to require a space, that it should NOT be running the script in this position: Download Workflow: sftest.alfredworkflow
  20. I don't know. I am totally confused. Sorry if I am chasing my tail. I will do some more testing.
  21. Ok. I could be going crazy, but- has this always been the behavior? I have a number of script filters and I never remember them behaving this way. Now I have to go back and change my scripts to parse the ' ' (space) arg as if it were an empty arg. I am 99% sure I never set my script filters up this way before... edit: I just scrolled through and fiddled with ~a dozen workflows and I am now even more sure that something has changed... edit2: for sure all of my script filters where "Alfred filters results" was enabled are now semi-broken. I don't see anything in the change logs but @Andrew was something tweaked on this? The problems, as I see it currently: 1) If script filter options are changed to "Arg required" (without space) as Vitor suggested, scripts need to be adjusted to automatically parse/trim a single space and process as if "no args" were supplied. 2) There's now seemingly no way to have a Script Filter where "Alfred filters results" is checked, a parameter is NOT required, and also require the user to have a space after the keyword. In my mind, a SF set up as the screenshot below should NOT run until a space is entered at the end of the keyword... and yet, it does...
  22. @Andrew Hmm. Maybe I mis-understand these options then. Here's what I "want" not sure if there's a way to make Alfred behave like this: - Do not run script filter until & unless there's a space after the keyword - When script does run, don't require an argument (but do pass an arg if it's supplied) - If keyword is "sn" and I type "sn " (space after) then script should run passing empty arg (``) or no arg. (Either would be fine!) What currently happens if I set it to "Argument required" is: - Script does not run with just "sn " (makes sense) - I have to type 2 spaces to get the script to run with an empty arg.
  23. Alfred 5.1.1-2138 I have a bunch of Script Filters that have the "with space" checkbox enabled. Not sure when it started, but I noticed that the Script Filters are running even when I don't have the space after the trigger keyword. Screenshot examples below. Am I doing something wrong here or is this a bug?
×
×
  • Create New...