Jump to content

luckman212

Member
  • Posts

    386
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by luckman212

  1. @gingerbeardman Hey ๐Ÿ‘‹ Happy Friday! I wasn't referring to your workflow actually. I was talking about Red Sweater's Usable Keychain Scripting (download).
  2. By Jove you've done it! Thanks again for this ๐ŸŽ‰ P.S. to anyone else who happened to download the test workflow above, I noticed a bug in it this morning- $RANDOM is 16-bit only (0-32767) so the jibberish output only contains words beginning with the letters {a,b,c}. Pretty boring. Newer versions of Bash support $SRANDOM which is 32-bit, so changing the shebang to #!/usr/local/bin/bash and RANDOM to SRANDOM will "fix" it. Also, swapping in gnu-sed for the built in macOS sed speeds up the loop by a factor of 2 for me. Here's an updated version in case anyone cares: LargeType Odd Wrapping_v0.0.2.alfredworkflow (use brew install bash gsed to satisfy the requirements...)
  3. Thank you @Andrew ! Yes that's going to be very useful indeed. Much appreciated. Question: will it accept "0" as the wrap parameter? (disable wrapping completely). That would be nice- in case of a very long line, it could just disappear into the right edge of the largetype boundary.
  4. Is anyone else having this problem? Sometimes I feel like this xkcd https://xkcd.com/979
  5. Thanks Vitor. I'll try to present some better info. For now, I'm experimenting with accomplishing this using Hammerspoon, seems that might be more efficient.
  6. In case anyone wants to really get nuts with fine-tuned URL scheme management, I suggest checking out Finicky. It's up on GitHub: https://github.com/johnste/finicky It lets you route URLs to different apps using rule-based logic. So you could make URLs containing *.google.com open in Chrome, and still keep Firefox as your default browser (example).
  7. I'm trying to make a universal hotkey workflow that will "un-minimize" an app's windows- the ones with those pesky diamonds next to them e.g. No matter what I've tried, it's failing to work. I spent a good 3 hrs on this today and basically got nowhere. Here's a snippet of code that (mostly) works when run from Script Editor, but it fails miserably when put inside an Alfred osascript of NSAppleScript object: tell application (path to frontmost application as text) try set miniaturized of windows to false end try try set collapsed of windows to false end try try set minimized of windows to false end try end tell This works (again, in Script Editor only...) with Safari, Chrome, Messages.app, Apple Remote Desktop, Calendar, Contacts, and others. It does NOT work for Finder.app, Sublime Text (and probably a bunch of others). Anyone know of a way to do this? Even if it only works 90% of the time? Right now I am stuck at 0.
  8. @jdfwarrior or @vehovmar I know it's been many years... did you ever find a solution?
  9. macOS 11.2 Alfred 4.3.1.1214 I have some workflows that dump columnar text into LargeType. For some reason, the wrapping gets crazy sometimes. Long lines, especially ones containing many spaces end up with soft line breaks all over the place. I think pictures are worth 1000 words here, so here are a few as well as a workflow that you can download to replicate these: LargeType Odd Wrapping.alfredworkflow The workflow trigger is keyword "jibber" It generates 10 lines of random text, in 2 columns It accepts an optional parameter in the format #words:separator. e.g "5:=" Default is 8 words, with space as the delimiter The first column contains the words, the 2nd column is the md5 hash of those words Output is passed on to LargeType (and copied to the clipboard) This produces the following output: Since the text has also been copied to the clipboard, you can paste into Sublime Text etc to verify that is was correctly formatted prior to being displayed by Alfred. Using 4 words or less produces clean output for some reason: Using 5+ words (`jibber 5`) triggers the wrapping problem for me: Using `_` as a separator to join the words (`jibber 8:_`) reduces the problem somewhat (with the exception of the FIRST line for some reason) These are my general LargeType feature settings (font=SF Mono however I have tried other proportional as well as monospace fonts and while the sizing changes a bit, overall the bug is still reproducible regardless of font) @Andrew hoping you can have a look. Thank you!
  10. I was troubleshooting hotkeys today and realized you can type ?hotkey into Alfred to query for hotkey triggers. Neat. BUT, the filtering seems to be based on the Title and Subtitle only (they hotkey itself is not included) so e.g. this won't work: Is it possible to query using ?hotkey for the key itself (maybe a feature request...)
  11. Alfred 4.3 (1205) - Big Sur 11.1 Title might be hard to understand, but here are quick repro steps: 1. make sure 'Show latest query if within 5 minutes' is enabled 2. call up Alfred's search window 3. type in e.g. "Utility" and highlight Disk Utility.app 4. Press โŒ˜C (Copy Path) result: it works, the pasteboard has '/System/Applications/Utilities/Disk Utility.app' now 5. press your Alfred hotkey again to call up his window 6. choose another result, e.g. AirPort Utility.app 7. Press โŒ˜C BUG: result: nothing happens... window is not dismissed, pasteboard does not get the path 8. add a '.' (dot) or any other character to the search field 9. Press โŒ˜C -- it will work now...
  12. @Vero Happy new year ๐ŸŽ‰ Do you think there's any shot at this request making it to the drawing board?
  13. @vitor Thanks - no I'm not using AppleScript, I'm using osxmetadata (Python) like this: /usr/local/bin/osxmetadata --set com.apple.metadata:kMDItemFinderComment 'Alfred:ignore' "$1" Simulating keystrokes is a little clunky for my taste. Hope that there will be a more robust way to trigger this via script in the future.
  14. Hello & happy holidays all ๐ŸŽ„ I'm trying to find out, is there a way to trigger the action below via a script/action/Terminal command etc? I have a workflow that adds the "Alfred:ignore" Finder comment to exclude items from Alfred's resultsโ€”the only problem is, it doesn't take effect until this cache is reloaded. So it'd be nice if the script could force this to happen. Is there a way?
  15. Is this a widespread issue? I was holding off for a bit on installing 11.1 on my main Mac (just a lowly old Intel Mac Mini). I'd be dead in the water without Alfred so I may wait it out a bit longer since I've got no major issues on 11.0.1.
  16. @vitor I'm currently playing with osxmetadata and it's pretty robust. It's Python, so fits nicely within an Alfred workflow, and can be imported as a library within an existing Python script / script filter, or run directly as a CLI from the shell. Besides Finder Comments, it can manipulate other types of metadata too, like tags, keywords, etc. It also supports JSON output, which is always nice. One way to install... brew install pipx pipx ensurepath pipx install osxmetadata If you have virtualenv set up, you can do it that way too (probably better) mkvirtualenv osxmetadata pip install osxmetadata ln -s $(which osxmetadata) /usr/local/bin deactivate To use... osxmetadata --set findercomment "This is a comment" /path/to/file osxmetadata --get findercomment --json /path/to/file
  17. Thank you again @Andrew for taking your time to look at this probably quite uncommon edge case! (and thanks to @Mr Pennyworth and @deanishe too) I stubbornly did not want to change my keyword trigger or add a full-stop to it. In the end I settled on this workaround, based on some good suggestions in this thread: 1. I added Alfred:ignore (just learned about this trick!) to TextSniper's Finder comments, which causes it to be excluded it from Alfred's default results: 2. I inserted a 'textsniper' entry at the bottom of the ocr List Filter and wired it up to a Launch Apps action, along with a generic keyword so I can still type TextSniper in Alfred and launch it, if desired: results: For now this works fine, but of course is a bit convoluted and gets rather unwieldy as the number of edge cases grow.
  18. @Andrew Right, ok, so when I set the list filter to Argument Required, then after a few times hitting <enter> on it (which does nothing)... yes the workflow now surfaces to the top... but to get to any of the list filter items, of course I have to put a space ("ocr ")... Agree that this doesn't really feel like a "bug" since I understand that list/script filter results don't get individually latched, but if you're open to considering making any changes to this behavior, may I suggest something along the lines of my comment above? (whereby the list object can specify that its results should be prioritized over other results). I don't know how difficult that would be under the hood of course...
  19. @Andrew Thanks for this explanation (Yes I do have latching enabled btw). I see I can get Alfred to put the "ocr" keyword (which is a simple list filter) result at the top if I action it a few times on "oc" - as you said. But, the list items don't appear until I hit <Enter> on the list filter's entry point. If I then execute the workflow, wait a couple of seconds and then hit my Alfred hotkey again, the word "ocr" is there and TextSniper.app is once again at the very top. So again, it seems like when there's an exact keyword match on an Application's Spotlight kMDItemKeywords, Alfred prioritizes it above all others. Not sure if that's intentional, a bug, or just a shortcoming.
  20. @Mr Pennyworth I just nuked my entire knowledge db to test this, and tried a few rounds of typing "ocr" followed by โŒ˜2. No effect, TextSniper.app is still ranked in the #1 spot even after 30-40 rounds of banging on my keyboard. To answer your question, the way I use the ocr keyword is, typing the exact phrase "ocr" followed by hitting <ENTER> (it was previously the first item in the results). After installing TextSniper, I now type "ocr" followed by the โ†“down arrow key and then <ENTER>
  21. @Mr Pennyworth Hmm, to be honest no, I didn't verify that. It's just that I rarely use TextSniper, and I use the "ocr" keyword quite a lot, so I assumed if Alfred was ranking TextSniper higher, then it must highly (or exclusively) prioritize App results over workflow results. I'll do a few more tests and poke at the sqlite3 db as you suggested.
  22. @Mr Pennyworth Thanks but this isn't about Alfred's knowledge/latching. It's simply that Alfred currently puts matching applications above all other results, regardless of their implied or learned order.
×
×
  • Create New...