Jump to content

luckman212

Member
  • Posts

    395
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by luckman212

  1. I'd like to suggest a feature: - Allow Universal Actions to appear or not based on a regex pattern match. This would be better than just "Text" or "URL". My Universal Actions list is pretty long and unwieldy. There are easily 30-40 items when I call up the menu. Yes I know latching brings the most used ones to the top, and I know I can filter them by typing a few letters. But sometimes my brain works at very low capacity. Having it limited by regex would make Universal Actions a lot nicer! related tweet: https://twitter.com/luckman212/status/1532802001620414464
  2. I think I found a little bug. Alfred 4.6.6.1303 / macOS 12.4 I have a few script filters that I explicitly do NOT want to show up as Universal Actions. So, I uncheck said box from the Workflow Editor. Great. Now, if you go in to that object and make any changes (clicking Save) ~poof~ the checkbox has silently re-enabled itself. Here's a video repro... https://user-images.githubusercontent.com/1992842/171930928-15bd72ce-386e-4965-a03c-4998b6013e18.mp4 I know Alfred 5 is coming, but hoping this might be fixed before then. 🙏
  3. Thanks @vitor -- I ended up down a rabbit hole but came out the other end with a solution. At first I was trying to compile a custom build of sqlite with the SQLITE_ENABLE_UPDATE_DELETE_LIMIT flag enabled, but that dead-ended. Then I learned that every sqlite db has a hidden unique column called rowid that I was able to hack into the .py script below. It works well enough for me. Maybe useful to someone else, so I'm posting it here. https://gist.github.com/luckman212/2d87efeb09cce7058ea42eee846effa3
  4. Nope... not true, sometimes >1 entry have the same timestamp: We really need a unique primary_key in this table...
  5. I'm trying to do some manual things with Alfred's clipboard db. I notice there seems to be no primary key in the table structure? Is that correct? How can I safely delete the "most recent" entry? Also, why is dataHash always null? thanks
  6. Hi @Andrew any more thoughts here? We're all the way up to 4.6 now and still can't match words inside parentheses () ... this includes snippets names as well which bit me today as I was looking for something. I hope you're still considering some improvement here, thanks
  7. Moved this to its own repo and updated slightly to v2.0.4 see original post...
  8. Alfred 4.6.5 [1298] macOS 12.3.1 I am growing old and feeble minded. I often add kMDItemKeywords to jog my memory and speed up app searches based on function. E.g. there's a useful app called OmniDiskSweeper to find out what's eating your disk space. I use osxmetadata to add 3 Spotlight keywords: [ 'disk', 'space', 'analyze' ] to aid finding this app when I need it: It works when I type "disk space" in Spotlight: also when I use mdfind from Terminal: but not from Alfred: unless I put a literal comma (,) But not in the reverse order: Here are my prefs: Is this a bug or just a limitation that can't be worked around? thank you
  9. Thanks @deanishe - sure of course I think I chose a bad example keyword ("limit")—probably should have used "window_height" or something. The idea is not to truncate or change the results at all, but merely to control the height of Alfred's window to show fewer or more results at one time. So altering the list prior to outputting JSON would not be the same thing. I have a workflow that displays news articles from a feed, and for example I'd like to show 20 articles in Alfred before I have to scroll. It's currently not possible since there's a max limit of 9 in the GUI. Even if it allowed me to set the height to 20, I would not want this in most cases. But for a couple of workflows it would be useful to have. Hope that explains it better?
  10. Sometimes I would like to show fewer (or more) results from a script filter (with scrollbar). Since this is currently an all-or-nothing setting (with an odd maximum of 9) I am proposing adding a way to expose the limit per-script, something like: { "rerun": 1, "limit": 12, "items": [ ... ] } Thank you @Andrew
  11. Does anyone know if there are any other circumstances that could cause this pop-up to appear? I don't have any workflows that require Python2 anymore, but still occasionally see this pop up on my 12.2.1 system. It usually happens when I first call up Alfred after a cold boot, and I usually have to completely quit and re-launch him to get things working again.
  12. Do you have a workflow called "search notes"? and a script filter inside that triggers on keyword "n"? Script filters run without pressing "enter". I have had similar errors, usually after rebooting especially after OS upgrades.
  13. @vitor is correct. I want to programmatically go to a specific object. Hope this will be possible some day!
  14. I thought maybe I would be able to use AppleScript for this but I couldn't find anything in Alfred's dictionary to make it happen.
  15. As my workflow library grows and becomes more complex, I find myself using the search feature to find objects more often. I wanted to know if it was possible to trigger this action from the workflow itself (same thing as executing "?epoch" from Alfred). I would like to e.g. take the output from a script filter which in this case could be the word "epoch" and directly have Alfred Preferences open with the object highlighted with those purple lines as it is below: E.g.
  16. Just want to add a final note, that as clever as @vitor's solution is, it would still be a nice feature to have a native and more portable way to do this directly via a JSON directive without abusing the uid field. So the FR still stands.
  17. @vitor So simple and works brilliantly! Thank you again for the help. I learned quite a few things today.
  18. Ah, wow I didn't know that! Ok that should indeed work then (passing variables) I will give it a shot! 🙂
  19. Thanks @vitor for your always inspiring and clever solutions. But, I think in this case, it wouldn't work for me, because I am not using rerun. I am talking about typing in Alfred's box, which causes the script filter to re-execute completely. I guess I could store the uidSeed on disk somewhere and check if its mtime is >5 sec old or something but that seems about as clunky as what I've come up with before. I can share my workflow if you want, it's called "border" and allows you to pick images from your clipboard history and apply borders & shadows (uses ImageMagick under the hood) of various sizes and colors to them...
  20. related threads/comments: https://www.alfredforum.com/topic/16760-selecting-a-result-while-rerunning-a-script-filter/?do=findComment&comment=86031 https://www.alfredforum.com/topic/16297-way-to-sort-keyword-trigger-matches-before-matched-applications-default-results/
  21. Problem: I have some script filters where I wish the items to be listed in the precise order they were output by the script. BUT, I also want to maintain the selected/highlighted item even when changing the arguments in Alfred's input box. Currently, to do that you must set a uid: within your JSON (ref.). The problem with this is, as soon as you action your first item from that script, the next time you invoke it, that item is floated to the top. So, catch-22. My "Poor Man's Solution" I wrote this small script that wipes out Alfred's knowledge for a specific script filter object after actioning. This works, but feels like a pretty ugly and inefficient hack. Call the script after your script filter using bash and pass as a paramter the name of your script filter object e.g. #!/usr/bin/env bash nohup "alfred_reset_knowledge.sh" "MyFancyScriptFilter" & *nb: requires: jq and plist2json.py #!/usr/bin/env bash [ -n "$1" ] || exit # obtain object ID KDB="$HOME/Library/Application Support/Alfred/Databases/knowledge.alfdb" mapfile -t objIds < <( plist2json.py info.plist | jq -r --arg name "$1" 'objects.objects | map(select( .type=="alfred.workflow.input.scriptfilter" and .config.keyword==$name ))[] | .uid') if (( ${#objIds[@]} > 0 )); then # short pause to allow Alfred to upate SQLite db sleep 1 for oId in "${objIds[@]}"; do #reset knowledge echo "resetting knowledge for object $oId" 1>&2 sqlite3 "$KDB" "DELETE FROM 'latching' WHERE item LIKE \"${oId}%\";" sqlite3 "$KDB" "DELETE FROM 'knowledge' WHERE item LIKE \"${oId}.%\" AND hidden IS NOT 1;" done fi Wish: - a parameter we could use within the script filter JSON to indicate to Alfred NOT to update the knowledge db when actioning this item (or the entire script). E.g. single item: { "uid": "foo123", "title": "Foo", "arg": "123", "knowledge": false <== } entire script filter: { "rerun" : 1, "knowledge": false, <== "items": [ ... ] }
×
×
  • Create New...