Jump to content

luckman212

Member
  • Content Count

    118
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by luckman212

  1. @Macchio - @alfredpleb - @blizzrdof77 -- I found a bug that prevents certain keywords from appearing in the search results. Need to beef up the JSON parsing a bit but I should have it working in a day or 2. I'll definitely post an update soon!
  2. @alfredpleb Sorry for the delay on that. I haven't released PrefsPlus (yet) ... although I am continuing to use it and it's working well (for me). I'd like to share it. Would you mind testing it out to see if it works for you before I release it widely? I could send you a link via PM.
  3. Got it @Andrew - working great, thank you 🙂 — stay safe!
  4. Hi @Andrew do you think you'd consider this "always show LargeType verbatim" option at some point?
  5. @Andrew btw - I tried updating to prerelease 4.0.9.1143 to see if this was still there (and it is)
  6. Alfred 4.0.8.1135 macOS 10.15.3 This is just a small quirk I noticed the other day: If you have the Snippets feature page open but Alfred is not the active/focused App, you can still right click and get the context menu to appear, however any item selected from this menu will have no effect. It just vanishes into the ether.
  7. v 1.1.0 uploaded, changes the bulk mode from a keyword trigger to a script filter so it can do some additional error checking and grab max_clips by counting the # if images in the history.
  8. I uploaded v1.0.3 that has that change and 1 other small fix for bulk mode.
  9. Much appreciated. I have a few other things planned for this workflow, I'll definitely make that adjustment.
  10. Thanks for that @deanishe . Wonder what Apple will do now that python2 is deprecated, since they've been ripping stuff out of macOS with great enthusiasm.
  11. Just to clarify what I was asking about above with the List Comprehensions, I'm talking about this. Populating the list using List Comprehension items = [] with database(dbpath) as db: rows = db.execute("SELECT foo...) items = [{ "title": r[1], "arg": r[0] } for r in rows ] Populating the list using a loop and append (this is the current method used) items = [] with database(db_path) as db: rows = db.execute("SELECT bar...) for r in rows: if r[2] == None: (...do stuff...) else: (...do other stuff...) items.append({ "title": r[1], "arg": r[0] }) My question is, is there a way to use the List Comprehension method while still allowing for the if/then/else code to execute?
  12. Hey guys, Thought I'd share this little workflow. I found myself often needing to dump out the last N clipboard images from Alfred's history to disk. It was tedious before, find the right item, copy it back to the pasteboard, paste into Preview, save as PNG, give it a non-overlapping name, etc. So I created this to make it semi-automatic. Shouldn't need anything special, but please let me know if you run into any trouble. Feedback welcome! One thing for sure I would like some advice on is whether the Script Filter (Python) could be turned back into a List Comprehension which from what I've read is more efficient. I couldn't figure out how to do that and also dynamically update the database rows (e.g. converting "/" to " / " so that Alfred's word matching would match correctly, picking a nicer generic icon when app name==null etc). @deanishe if you have time I'm sure you know the answer to this... README & download: https://github.com/luckman212/alfredworkflows/blob/master/clipsaver_readme.md
  13. So, in 2020 with macOS 10.15 + Alfred4, is the canonical way to run python3 code in a Script Filter to use "External Script" with a shebang like `#!/usr/bin/env python3` ?
  14. This is an excellent idea! Another related thing on my wish list would be a dedicated "Notes" object, which ideally would be a resizable rectangle that could display text notes on the workflow editor area. Something like this:
  15. @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.
  16. @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?
  17. 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.
  18. 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.
  19. 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
  20. 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?
  21. 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
  22. ... or Cmd+Shift+4 and then hold the CTRL key while snapping, which also makes the output go to the clipboard
  23. Try: sudo -A xattr -w com.apple.metadata:kMDItemKeywords "( slack )" /Applications/Franz.app
×
×
  • Create New...