Jump to content

luckman212

Member
  • Content Count

    103
  • Joined

  • Last visited

Everything posted by luckman212

  1. @dburr as you rightly concluded, if Spotlight doesn't show the apps, Alfred isn't going to be able to either. Sounds like something's majorly hosed with your Spotlight db. I'd follow Apple TN HT201716 for getting that rebuilt, or try `sudo mdutil -Ea` from Terminal.
  2. @Acidham really slick workflow! I love this. The quicklook popup in Markdown is pretty cool, but I don't have a good QL markdown plugin, so it just renders as plaintext. Got any suggestions?
  3. Thanks @deanishe - I figured I wasn't the only one who would want something like this. Maybe @Andrew would consider making this info more accessible somehow, expose an API or something. Anyway, @Acidham's workflow is neat. I'll keep an eye on it.
  4. I found a hacky way of doing it... based on research from these links: https://brettterpstra.com/2012/08/05/quick-tip-checking-for-modifier-keys-in-shell-scripts/ https://macscripter.net/viewtopic.php?id=29456 https://stackoverflow.com/questions/7514280/get-modifier-keys-which-have-been-pressed-while-starting-an-app-applescript I ran some timing tests, using Python vs. external compiled (Xcode11) CLI tool vs. AppleScript—Cached AppleScript running from a NSAppleScript object was the fastest and requires no external dependencies, so that wins for now. I think this still should be a native option in Alfred (branch from Contact Actions based on modifier keys) but for now, this achieves the goal: NSAppleScript use framework "Foundation" use framework "AppKit" on alfred_script(q) set cMod to current application's class "NSEvent"'s modifierFlags() set s to (cMod div 131072 mod 2 is 1) set outStr to (s & "|" & q) as text return outStr end alfred_script This will pass along a string into {query} in the format bool | arg I then use Split Arg to Vars object to put the bool ("true" or "false") flag of the SHIFT key state into a workflow argument, which is later used in the conditional to branch accordingly.
  5. Before I go too far down a rabbit hole, I came here for a sanity check... What I'm after is to be able to programmatically generate a list of all defined hotkeys across my entire workflows collection. I briefly looked at iterating though each Info.plist from the Alfred.alfredpreferences/workflows/user.workflow.{UUID}/info.plist and trying to parse out the details using some XML tools... but that seems like a medium sized undertaking and if there's any other simpler or more reliable way I'd love to hear about it! Thanks guys
  6. Thanks @Andrew I ended up using a pipe instead but — since this tab char would be invisible, wouldn't it be more sensible to use things like \t or \n for readability?
  7. I'm trying to split my {query} into separate vars based on the [TAB] delimiter (usually represented in regex by "\t") I want to use the new Split Argument to Variables Utility workflow object for this: It doesn't seem to work. Works fine with other delims such as comma and pipe("|") Is there a way to do this, is this a bug, or am I "doing it wrong" ? Thanks
  8. ... or Cmd+Shift+4 and then hold the CTRL key while snapping, which also makes the output go to the clipboard
  9. Try: sudo -A xattr -w com.apple.metadata:kMDItemKeywords "( slack )" /Applications/Franz.app
  10. Kind of feels hacky but I was able to figure out how to do this using a Script Filter object instead: Is this the "right way" to do it?
  11. I think I've found out what's going on here. Seems Apple's added yet another layer of obfuscation here with a compressed Assets.car file, which can only be read by specialized tools. Here are a few links I found about this: Reverse engineering the .car file format (compiled Asset Catalogs) steventroughtonsmith/cartool: Export images from OS X / iOS .car CoreUI archives iphone - Analysing Assets.car file in iOS - Stack Overflow insidegui/AssetCatalogTinkerer: An app that lets you open .car files and browse/extract their images. I was able to use this beta version of Asset Catalog Tinkerer to extract PNG icons from inside those archives. So now I've got a workflow (I'm dubbing it "Preferences Plus"—will post it shortly) that shows all Prefs, with their proper icons, and uses JSON Script Filter to match on the keyword metadata as well (similar to searching in the System Preferences search box...)
  12. I would like to set up a Keyword trigger and have the Title be dynamically constructed from the workflow name. I am aware of the script environment variable `$alfred_workflow_name` —and this works fine from a Bash script, AppleScript etc. But, are these variables not available to the workflow itself? (outside of a script). E.g. the setup below does not produce any value:
  13. @Andrew 4.0.7 fixed the problem! I don't really see any noticeable delay (but I am on a 6-core i7 Mac Mini 2018 so it's possible older machines might). I'm happy with this fix!
  14. Interesting workflow. @vitor's version above works for me too. One caveat I noticed though was that pbcopy seems to choke on data streams with certain encodings. Not sure exactly what's going on but e.g. I have a file that is UTF-16 Unicode - this completely fails to be read in properly by pbcopy (I just get 3 bytes). Has nothing to do with Alfred or the workflow. So, that may be causing you occasional issues @Bhishan
  15. I have a custom Contact Action defined so I can trigger a workflow when I select Phone#s in Alfred. Works great! One thing is, I recently added a List Filter to the workflow so I can choose whether to DIAL (via my Asterisk based PBX) or TEXT (iMessage) the selected number. This also works great. However—99% of the time, I just want to DIAL and skip the List Filter step. It would be great if there was the ability to choose a different branch by holding a modifier like <SHIFT> (similar to what exists on Keyword or Script Filter objects). Is this possible to do any other way, or could this maybe added to an upcoming Alfred version? (if so please move this to Feature requests...)
  16. @Andrew Thanks, well that sounds interesting but if it's really a Catalina bug and you think performance will suffer due to that workaround, I could try filing a bug w/ Apple. Does it matter that I'm using a File Filter (keyword "c") to search Contacts in Alfred? (link) instead of having Contacts enabled for Default results?
  17. Sorry to bring this up again, but I am not 100% sure this is just a Catalina bug anymore. The problem is back where Alfred has stopped updating the contact metadata even though I have edited the info in Spotlight. It definitely could be a Catalina bug but- is there any way you could look into it @Vero or @Andrew ? e.g. I just edited the phone# type for this contact, and Spotlight shows the correct value ("work") yet Alfred still shows "home": Quitting & re-launching Alfred gets it to immediately show the correct value. Hmm.
  18. Some related links... https://apple.stackexchange.com/questions/375509/why-are-some-system-preferences-icons-generic-in-macos-10-15-catalina https://www.alfredforum.com/topic/13997-system-preferences-icons-mystery-10151/
  19. My AskDifferent post (updated 11/21/19): Why are some System Preferences icons “Generic” in macOS 10.15 Catalina? (also found this related discussion here on the forums): https://www.alfredforum.com/topic/13785-missing-icon-for-apple-id-preference-pane/
  20. Thanks @vitor Will do. I'll post to AskDifferent and link back here with any news. I agree that 10.15 is one of the worst (buggiest) releases ever. It truly is Apple's "Vista"...
  21. Catalina 10.15.1 Alfred 4.0.6 b1124 Something weird is going on with Icons for a few of the built-in System Preference prefPanes. For example, "Bluetooth" or "Internet Accounts". When I search Spotlight for these, the proper icon is displayed. But, in Alfred, only a generic icon is shown: vs and vs I notice even in Finder, the generic icons are shown: Only Spotlight and the System Preferences.app itself seem capable of showing the right icon. I opened the Contents folder of the prefPane bundle to investigate. It seems like Info.plist contained within specifies icons via keys such as "NSPrefPaneIconFile" and "CFBundleIconFile" but even in that case, the file referenced doesn't seem to exist on the filesystem anywhere that I can find. E.g. for Bluetooth, NSPrefPaneIconFile = "BluetoothAqua.png" —but that file doesn't exist. Similarly, Internet Accounts specifies "InternetAccountsIcons.icns" and "InternetAccountsIcon40.png" as icons, but these are nowhere to be found: What's going on here? I know this isn't really a bug in Alfred but it started with 10.15 and I wonder if anyone knows about these generic icons or where the resources are coming from...
  22. So, I noticed this was only happening on 1 of my Macs, not the other. I couldn't figure it out so I threw the sledgehammer at it: blew out the Spotlight index and rebuilt it. I also trashed the contents of ~/Library/Application Support/AddressBook/ and let that rebuild. After all that, Contact metadata are working normally again. Did not have to reboot (or even log out for that matter). Chalking this one up to (yet another) Catalina bug. Sorry for the false alarm on Alfred! 🙃
×
×
  • Create New...