Jump to content

luckman212

Member
  • Posts

    379
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by luckman212

  1. Thanks for fixing! Looks like it works fine on 5.1.2133 🙂
  2. @Andrew This is great! Exactly what I was hoping for. Thank you! For reference, here's the URL I used (updated to the new scheme Andrew posted below) open 'alfredpreferences://navigateto/features>clipboard>{history}'
  3. One small thing I noticed: If you have multiple trigger keywords defined as "foo||bar", you can search "?bar" using Alfred and he will find the workflow, but typing "bar" in Alfred Preferences search does not find it (only finds "foo" or "foo||bar"). This is as of 5.1.2130.
  4. Wow - most underrated feature announcement ever-- This is great! Do you know if the keyword1||keyword2 would work in variable substitution mode? i.e. set myVar = "apple||banana" and then set keyword trigger to {var:myVar} ?
  5. @Casper + @vitor I posted some possibly interesting findings about this over on that github issue #4.
  6. It's ok. These are just nitpicks. There are 1001 ways to achieve the same goal in programming. That's part of the fun. In any case, the days of humans having to think about these things are numbered. With ChatGPT cranking out better code than I could ever hope to write, it appears my future is working in a coal mine, not in a comfortable chair critiquing Alfred workflows 😐
  7. @sepulchra Nice. One more small comment: in your example script, you define a query variable, but your script never uses it.
  8. Maybe I'm late to this party but, just in case: @sepulchra you don't need regex to extract a single piece of metadata as a plain string. You can use e.g. mdls -raw -name kMDItemFSCreatorCode /path/to/file
  9. For some reason I thought I could use a dynamic placeholder like {clipboard:0} in the Subtitle field of a List Filter. But, it doesn't work. Am I imagining that this ever worked? I know I could use a Script Filter, but this is for a very simple use case and I'd rather not have to write a whole script just to display this one bit of info.
  10. Hi @vitor ! The use case is I have a script that does some processing on recent files that are in the clipboard history. For the script filter to work, that feature needs to be enabled. I was able to figure out how to programmatically check for that, but to close the loop I'd like the "action" item from that script filter to directly open Alfred Prefs to the page so the user can enable the checkbox. Indeed, ?clipboard does take me to the correct place! But I was hoping the script could open this for the user automatically. I assume there's probably an undocumented URL scheme available, since I guess that might be how Alfred gets the separate Alfred Preferences.app to open directly to that specific page.
  11. Until there's a better way, I came up with this poor man's solution... 🤷 #!/usr/bin/env bash # quits Alfred Prefs (if open) and then opens it to the Features -> Clipboard tab bid='com.runningwithcrayons.Alfred-Preferences' osascript <<EOS &>/dev/null with timeout of 5 seconds tell application id "$bid" to quit end timeout EOS defaults write $bid lastFeature clipboard defaults write $bid lastTab features open -b $bid
  12. Is there any way to programmatically open Alfred's preferences app to specific areas? For example directly to the "Features → Clipboard History" section? Via URL Scheme perhaps?
  13. Nevermind—found it! Apparently he exports the following environment variable: alfred_preferences_localhash Still a mystery how it's generated, but it's one that won't necessarily keep me awake at night.
  14. I have a Python script contained in my Workflow that needs to know the state of the enabledFiles setting which is a Local preference, apparently stored at: <path-to-synced-prefs>/Alfred.alfredpreferences/preferences/local/<sha1-hash-of-???>/features/clipboard/prefs.plist I can't figure out how to reverse the hash/ID (sha1?) that identifies the local machine. I assume it's some combination of Machine SN#, name, type, etc. but I can't find documentation on that anywhere. Hoping someone can help...🙂
  15. @oorbx Nice idea. I already have another workflow that uses imagemagick to perform some operations like that, DPI conversions, resizing, adding borders. I'll eventually try to integrate them all together in a future version, but it wouldn't be ready for a little while.
  16. Somehow the wrong change got committed at some point while I was removing the Bash5'isms. I'll upload a v2.3.1 soon that fixes it...
  17. @oorbx Actually it seems some incorrect code slipped thru. Not sure what happened but I'm away from my Mac at the moment. I'll fix it asap, sorry
  18. No, I don't think it's the 13.3 beta. looking at the pastebin it seems you still have an old version of the workflow installed. Not sure why the in place upgrade didn't work, but why don't you go ahead and delete the entire workflow, download the latest one and reinstall it Let me know if that clears things up. @oorbx
  19. @oorbx Hmm. Can you please open your debug console, press "Clear" and then run the workflow all the way through, then copy & paste all the output to a pastebin?
  20. I just pushed v2.2.1 which should remove the bash5 dependency and also adopts Alfred 5's more friendly Configuration panel. @oorbx if you want to test & report back... thanks
  21. @evanfuchs Hmm, looks like you're on the builtin bash3 still. I didn't expect or plan for that. Bash3 doesn't know about ${var,,} to convert to lowercase. I could use tr '[:upper:]' '[:lower:] instead, but it's a little less efficient. Do you have Homebrew installed? brew install bash5 should get things working.
  22. @oorbx and @evanfuchs - Can you try the latest version of the workflow (2.1.4) that I just published? I think the problem may have been that I previously had not enabled the "Keep File Lists" option in my Alfred preferences. With that on, I see that copying images sometimes results in a "File: xxx" type which was not previously handled by my workflow. This is a first attempt at handling both types within the same script filter. Please let me know if it works for you.
  23. @oorbx What does your Debug console output look like in Alfred? Please post it- same steps that I was looking to see from Evan Fuchs above
×
×
  • Create New...