Jump to content

brapstallion

Member
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brapstallion's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. my command to evoke Alfred is cmd-space, naturally cmd-space-space would be the next easiest thing to remember/use to activate a workflow seeing as my finger is already on the spacebar and i’m not required to remember a different key command. i suspect Alfred already knows this because quick find is preconfigured to activate when pressing the spacebar. I want to override this precondition and use spacebar to activate my own workflow seeing as i don’t use quick find.
  2. hey, I'm not sure I understand what you're saying. I tried adding `'` as the keyword for a script filter, but I still need to activate by pressing cmd space space space.
  3. Curious, is it possible to trigger a workflow using [spacebar] as a keyword? I've always wanted to assign my own workflow to the cmd-space-space combo that Quick Search offers, but I can't seem to get it to work as seamlessly. Here are my steps to reproduce, what am I doing wrong? 1. First I enable Quick File Search Then I create a basic workflow with `'` as a the keyword Then I activate alfred with cmd space, press space again and I'm presented with Quick Search and my workflow. Is it possible to configure this so that the workflow "Spacebar trigger" activates immediately when I enter the keyword instead of presenting me with the option to quick search too? Right now if I want to drill right in to the "Spacebar trigger" workflow I need to press cmd-space-space-down-enter instead of a simple cmd-space-space
  4. ah ok. this is what the debugger says; [20:24:45.590] test[Script Filter] Queuing argument ' ' [20:24:45.636] test[Script Filter] Script with argv ' ' finished [20:24:45.640] test[Script Filter] <?xml version='1.0'?><items> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20all' valid='yes'><title>All</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj1' valid='yes'><title>Project 1</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj2' valid='yes'><title>Project 2</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj3' valid='yes'><title>Project 3</title></item> </items> [20:24:45.641] WARNING: test[Script Filter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 23.)'. Row 2, Col 60: 'EntityRef: expecting ';'' in XML: <?xml version='1.0'?><items> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20all' valid='yes'><title>All</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj1' valid='yes'><title>Project 1</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj2' valid='yes'><title>Project 2</title></item> <item arg='obsidian://advanced-uri?vault=Deadbone&workspace=projects%20proj3' valid='yes'><title>Project 3</title></item> </items>
  5. I've added Victor's code to a script filter and configured it by changing to the path "${HOME)/Desktop/Research.md" to one containing my own list of Markdown formatted links. The file is are formatted like so: - [Google](https://google.ca) - [Alfred](https://alfredforum.com) When running the workflow using this configuration, I expect it to read the markdown file, parse content between [ ] for script filter item titles, and parse content between ( ) for script filter item arguments. When selecting a script filter item, the argument "https://alfredforum.com" is passed to an Open URL object and the alfred forum is opened in my browser. This is the expected behaviour. When using the same setup but changing markdown list to contain uri schemes like "[Home](obsidian://advanced-uri?vault=Obsidian&workspace=home)" instead of web links like "[Alfred](https://alfredforum.com)" the workflow does not behave as expected. Instead, no items are shown in alfred's script filter. Is that clearer?
  6. Thanks a lot for this! I use it often. How might I go about modifying it so that it works with uri schemes instead of http links? Running it as is on links like the one below doesn't seem to show them as expected. - [Home](obsidian://advanced-uri?vault=Obsidian&workspace=home) - [Projects](obsidian://advanced-uri?vault=Obsidian&workspace=projects) - [Work](obsidian://advanced-uri?vault=Obsidian&workspace=work) Running it with standard weblinks works fine though - [Google](https://google.ca) - [Alfred](https://alfredforum.com) Any thoughts?
  7. Hi. I'm a novice programmer and need some help improving a script filter based workflow. I appreciate any guidance users can give. My workflow is a simple cmd-tab-like window switcher for yabai. The script queries all open windows via yabai and then builds the json to filter with jq. The filtered argument is then sent to the script yco-switch-focus which switches the window. /usr/local/bin/yabai -m query --windows | /usr/local/bin/jq '{ "items": [ .[] | .id as $theID | .pid as $thePID | .space as $theSpace | .app as $theApp | .title as $theTitle | { "uid": $theID, "type": "default", "title": $theTitle, "subtitle": $theApp, "arg": $theApp, "icon": { "type": "fileicon", "path": ("~/Applications/"+$theApp+".app") }, match: $theApp } ] }' The workflow works, but there are areas that can be improved. Hopefully I can implement these with a little help from the community here. Improvements: 1) Adding a fallback element to script filter results that I can use to trigger other Alfred workflows. I found this thread and think it provides a solution, but I don't quite understand how to make it work with my script filter structure. 2) Faster results when calling the script filter. There seems to be a slight delay in populating the script filter that I don't see in other workflows. I'm not sure if this is caused by the Yabai query or if faster workflows use some sort of cache to speed things up. If that's the case, I'm not sure how to implement a similar solution. 3) Sorting results based on usage. Since this is a window switcher, I often use it to jump back and forth between recently used windows. Right now, the recently selected windows sometimes show up at the bottom of the results. I'm not sure how to get them to the top of the list. 4) Combine multiple variables into the argument that I can split when selected and use for advanced functions. Yabai can query a lot of useful information, such as window id, screen id, space id, etc, which I don't currently use because the app name is the only thing associated with the argument. I have experimented by setting arg to $theApp,$id which failed. I suspect this is an easy fix, but I'm just ignorant of how to write it out properly. What do you think? Does anyone feel able to help me out? I've managed to stumble my way in the dark this far. Looking for a bit of light to guide my path to the finish line! Thanks in advance. Workflow: https://www.icloud.com/iclouddrive/0j5gwYB_TDtr5PauhT6vecA7Q#Switcher
  8. I like having Alfred index a local folder of web shortcuts - mainly to web apps like slack, gmail , etc. This is handy because I can use finder tags to create categories and adding a new file is a simple drag and drop from DEVONthink. Only problem is Alfred seems to display the system default icon for all .webloc files, despite adding custom icons to the .webloc via finder cmd i. How can I get Alfred to display a custom icon I've assigned to a file? I've managed to hack something close by converting .webloc into .app files via Automator. This works ok, but seems like an unnecessary added step to an otherwise streamlined workflow.
×
×
  • Create New...