unlink Posted July 15, 2022 Share Posted July 15, 2022 I just purchased Bartender 4 and found out they have a spotlight type search to search your menu bar items. I wonder if this can be integrated with Alfred, but could not find anything. Is there a workflow for that? Link to comment
Stephen_C Posted July 15, 2022 Share Posted July 15, 2022 Bartender 4 supports AppleScript and, in very crude terms, you could include something like this in a workflow to trigger the Bartender quick search window: tell application "Bartender 4" quick search end tell That is pretty basic but it may give you enough of an idea to develop something better! Stephen Link to comment
rextender Posted July 15, 2022 Share Posted July 15, 2022 With just a little more detail: Set up a workflow with "Run Script" action, choosing: Language: /usr/bin/osascript (AppleScript) "with input as {query}" running instances "Sequentially" script: tell application "Bartender 4" quick search with "{query}" end tell I hooked mine up to a Keyword action with keyword: "bar" JJJJ and Terminal 2 Link to comment
unlink Posted July 17, 2022 Author Share Posted July 17, 2022 thanks y'all I put this into a workflow. You can find it on packal and github mfractal 1 Link to comment
Anthony Accioly Posted September 27, 2023 Share Posted September 27, 2023 (edited) On 7/15/2022 at 9:08 PM, Stephen_C said: Bartender 4 supports AppleScript and, in very crude terms, you could include something like this in a workflow to trigger the Bartender quick search window: tell application "Bartender 4" quick search end tell To make it work with Alfred 5 just change the application string: tell application "Bartender 5" quick search with "{query}" end tell On 7/17/2022 at 5:55 PM, unlink said: I put this into a workflow. You can find it on packal and github PR with the update for Bartender 5 + optional query argument: https://github.com/BlkPingu/bartender-search/pull/3 Edited September 27, 2023 by Anthony Accioly mfractal 1 Link to comment
mfractal Posted October 4, 2023 Share Posted October 4, 2023 On 7/17/2022 at 1:55 PM, unlink said: thanks y'all I put this into a workflow. You can find it on packal and github thanks, very useful. Link to comment
Pelby Posted October 17, 2023 Share Posted October 17, 2023 Could someone please briefly explain which Workflow elements I'd use to run this script that @Anthony Accioly has kindly published? I'm new to creating workflows in Alfred, so thanks in advance for your help. Ps. I've checked the Github docs and don't think the answer is there (I'm sure it's probably obvious for those more experienced 🙏 ) On 9/27/2023 at 6:52 PM, Anthony Accioly said: tell application "Bartender 5" quick search with "{query}" end tell Link to comment
Stephen_C Posted October 17, 2023 Share Posted October 17, 2023 Set up a keyword like this (as an example): Link that to a Run Script action set up like this: Note that I've assumed because you've referred to Bartender 5 that it's Bartender 5 (rather than Bartender 4) that you wish to search. Stephen Link to comment
vitor Posted October 17, 2023 Share Posted October 17, 2023 Always prefer with input as argv over with input as {query}. Plus, like Alfred, Bartender seems to change its name but keep the bundle identifier so use that instead for future-proofing. The code will be: on run argv tell application id "com.surteesstudios.Bartender" to quick search with item 1 of argv end run That is untested, and based on the previous comments. 1 hour ago, Pelby said: I'm new to creating workflows in Alfred See the Getting Started Guide for an interactive tutorial on making workflows. Link to comment
Stephen_C Posted October 17, 2023 Share Posted October 17, 2023 (edited) Purely as a matter of personal preference, for others reading this thread, I prefer a hotkey or keyword (with no argument or space) linked to this: tell application id "com.surteesstudios.Bartender" to quick search Your hotkey or keyword then simply opens the Bartender quick search dialog (with the advantage you can immediately see a list of menu bar items and, if you wish, can search them). I appreciate others may prefer the alternative, of course. Edit: That applies only to Bartender 5, of course—which has the quick search dlalog. Stephen Edited October 17, 2023 by Stephen_C vitor 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now