Jump to content

Espresso

Member
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Espresso

  1. I am looking for a way to access and interact with Menu Bar App menus. For example, I use the app AltTab which lives in my menubar. I would like a way to access AltTabs preferences using Alfred. To do this with a mouse would mean clicking on the AltTab menubar icon, and the Preferences. I tried using the Menu Bar Search workflow from Benzi, however this only allows me to interact with my current applications menu items (menus on the top-left) rather than menu bar apps in the top-right. If there does not exist a workflow for accomplishing this, does anyone know of a non-Alfred way to accomplish this? Thanks.
  2. Let's say I have a Script Filter that yields three items [1, 2, 3]. How would I set an Action Modifier for only item 1. That is, if I hold ⌘ and hover over item 1 I want to see some action, but if I hold ⌘ and hover over items 2 or 3 I do not want to see any action. Thanks
  3. I am working on a workflow that allows users to search through a list of Unicode icons. The most likely results are then returned to Alfred so that they may be displayed. The problem I am having is figuring out how to display the Unicode icons in Alfred. For instance, I see the following: When I return this JSON [ { uid: '1F5B1', title: 'computer mouse', subtitle: '1F5B1', arg: '1F5B1', autocomplete: 'computer mouse', icon: '🖱️' }, { uid: '1F5A8', title: 'printer', subtitle: '1F5A8', arg: '1F5A8', autocomplete: 'printer', icon: '🖨️' }, { uid: '1F50B', title: 'battery', subtitle: '1F50B', arg: '1F50B', autocomplete: 'battery', icon: '🔋' }, { uid: '2328', title: 'keyboard', subtitle: '2328', arg: '2328', autocomplete: 'keyboard', icon: '⌨️' } ] So my question is, how do I display the unicode icon in Alfred? Thank you in advance!
  4. @vitor Would it be possible to offer both? Perhaps have the current Alfred icon as the default, and then in preferences have an option to change the icon to the square one if the user wants?
  5. @deanishe Great suggestion on using the workflows cache instead! I didn't realize that was an option, thanks! @Mr Pennyworth Thank you so much for the explanation. I would never have thought of structuring the workflow like that, but can see that these tricks will come in handy in future projects! Everything now works exactly as I had hoped for.
  6. I am trying to create a Gif Search workflow. I know others exist, but I wanted the practice. The idea I am going for is the following. User types "gif" followed by a query. When they are satisfied with their query, they press enter and the results are displayed. The user can now hover over a result and press Enter a second time to copy the Gif url to the clipboard. The user can also search using a different query by simply modifying the text in the Alfred search bar and then pressing Enter to refresh the results. For example, if they initially typed "gif dog", then that text will still be in the search bar, and they can now change it to "gif dog happy" and press Enter to get new results. The reason for the user needing to press enter after to trigger the script is so the API is not being hit for each new keystroke (I don't want to make API calls for "d", then "do", then "dog", only for "dog"). So far, I have achieved the following (best seen by looking at the workflow linked below): User types "gif" followed by a query. When they are satisfied with their query, they press enter (handled by an Alfred Keyword element). Output from Keyword element is passed to an Args & Vars element. Here the users query is assigned to a variable called "search". Next, an external python script (giphy.py) is run via a Script Filter. This filter grabs the value in the search variable and makes an API call to Giphy. It then downloads thumbnail images of the Gifs if they are not already downloaded and stored in the users Cache directory. Finally, it outputs the results to Alfred as a JSON object. Once the results of the API call are displayed as a list, you can preview the Gifs by pressing Shift and you can copy a link to the Gif by pressing Enter. Great! Now for the problems / questions I have: After the users initial query, the Alfred search bar is cleared. I would like the previous text of "gif dog" to remain in the search bar. If the user types something else into the search bar, the results of the first text are filtered. Instead, what I want is for all results to remain displayed to the user as the new text/query is typed. When the user presses enter after typing a new query, the results are refreshed. Here is the workflow I have come up with so far. Any suggestions are greatly appreciated. Thanks!
×
×
  • Create New...