Jump to content

Benzi

Member
  • Posts

    146
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by Benzi

  1. @vitor and team - thanks for getting the workflow up on the gallery! 🙂

     

    Have a question on new versions: If I were to update my workflow to say `2.1` and create a new release on GitHub, what steps are needed so that the gallery picks up the change?

  2. v1.6 - per app configuration

    You can now specify custom configuration settings to fine tune menu listings for at an app level. Type ms into Alfred to get started.

    Here's the settings.txt config I use:

    # always show disabled menu items
    appFilters {
      app: "BibDesk"
      showDisabledMenuItems: true
    }
    
    # for Safari, ignore the History and Bookmarks
    # menus since loading it take a lot of time
    appFilters {
        app: "Safari"
        ignoreMenuPaths {
            path: "History"
        }
        ignoreMenuPaths {
            path: "Bookmarks"
        }
    }
    
    # For Finder alone, show the Apple menu entries,
    # and ignore any recent entries listed in the 
    # Apple > Recent Items menu
    appFilters {
        app: "Finder"
        showAppleMenu: true
        ignoreMenuPaths {
            path: "Apple"
            path: "Recent Items"
        }
    }

     

  3. @cands 

     

    BibDesk (programatically) reports all menus items under "Copy As..." to be inactive and disabled always. This is the reason why menu search is not able to pick up the sub menu items.

     

    One workaround possible to to display all menu items (enabled or not) - but this means that if a menu item is truly disabled, actioning that from Alfred will not have any effect, and you will not be able to know beforehand if the item is indeed disabled or not. The workflow will blindly list all available menu item entries.

     

    If you download and update the workflow to version 1.5.4, I have included some environment variables to control the default menu listing. In your case, because of BibDesk, you may want to set the value of "-show-disabled" to true

     

    590087dd67715_ScreenShot2017-04-26at5_10_06PM.png.43a9488595abda61a0935b7a49e6899a.png

    590087e9d4281_ScreenShot2017-04-26at5_10_16PM.png.afeee4667f67ae170ca42a2f230262d9.png

     

     

    Note that this will affect all menus across all apps. I'll attempt to come up with a better solution, but not very hopeful at the moment.

  4. 1 hour ago, cands said:

    I also experienced one case where not all menu items were found, using the app BibDesk. The old menu bar search workflow, as part of the workflow "Key Clue" finds some menu items that are not shown by this new workflow (showing "No menu items"), e.g. the items that are subcommands to the "Copy As" item. Sorry but I did not have time to go through steps B-D outlined above (I have the latest version so step E is done) now, but wanted to quickly inform you about this.

     

    @cands

     

    Thanks for reporting this. I have downloaded BibDesk (Version 1.6.10 (4171)) and can reproduce the issue with the Copy As... menu.

     

    I'll try to see if I can figure out why this is happening.

  5. @dunkaroo 

     

    ALSO

     

    You need to have text selected in the app for the Copy to show up / and something pasteable in the clipboard for Paste to appear.

     

    This is because the menu search only searches and displays actionable menu items. You cannot copy if nothing is selected.

  6. @dunkaroo That's a bit odd. 

     

    edit - see my post after this one as well

     

    Troubleshooting

     

    A - What gets displayed when you type in "m copy" into Alfred? Is it 'No menu items'?


    B - Can you access Alfred's cache folder? In my case it is 

    /Users/benzi/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.folded-paper.menu-bar-search/

    You will need to change that path with your username. In the cache folder, two files will be created for every app once you trigger Menu Search for that app. For example, for TextEdit, it would be: 

    1. com.apple.TextEdit.items.txt
    2. com.apple.TextEdit.txt

    Can you check if these files get created and if so share me the contents of these two text files? For this step, the Script Filter must have the default settings.

     

    C - If you can edit the workflow, change the Script Filter command to the following, one option at a time and see if it makes any difference:

    # option 1
    ./menu -query "{query}"
    
    # option 2
    ./menu -async -query "{query}"

    D - Delete all files from your cache folder and try again

    E - Try downloading the latest version (see below) and see if it makes any difference.

     

     

    Ignoring Apple menu items

     

    If you re-download and install v1.4.4, I have included a new option to ignore the Apple menu items. You need to edit your workflow manually include this setting as it is not switched on by default. Open up the Script Filter, and change:

    ./menu -async -cache 10 -query "{query}"

    to

    ./menu -async -cache 10 -no-apple-menu -query "{query}"

    This should prevent apple menu items from showing up.

  7.  

    v1.2 - Fully native menu clicking, removed AppleScript based solution

    Well, I removed the AppleScript part of the workflow that automates the actual menu clicking, and replaced it with native code. (This is slightly faster, but not perceptibly so.)

     

    Also, @targumanu's suggestion to terminate previous script for the run behaviour is now the default setting.

  8. 4 hours ago, raguay.customct said:

    Thanks. It is working now. What framework are you using for the automation. I love that it is getting services too!

     

    Nothing out of the ordinary - just the default AX... accessibility stuff from Apple.  

     

    PS: The code is included in the workflow (also Github); mostly a port of @ctwise's objC code into Swift.

  9. 11 hours ago, raguay.customct said:

    You need to recompile using static linking. It's requiring a dynalib that I don't have:

     

    Code 6: dyld: Library not loaded: @rpath/libswiftAppKit.dylib

      Referenced from: /Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.85FE278A-FF20-4A2A-919E-8DE7DC7D1C62/./menu

      Reason: image not found

     

    I updated the workflow - could you re-download and check if possible?

     

  10. 58f5bbf703fc8_ScreenShot2017-04-18at12_39_32PM.png.6407a7a501d033462c2e363e9b709a59.png

     

     

    I have re-implemented ctwise's excellent implementation of the Menu Search workflow in Swift.

     

    This version is ever so slightly faster (at least on my machine :)) - YMMV.

     

    Requires OSX 10.7+

     

    ↓ Download


    Refer Github README page for up-to-date information.

    Usage

    Type m in Alfred to list menu bar items for front most application You can filter menu items by name, or do a fuzzy search.

    E.g

    • m new tab will match the menu item New Tab
    • m cw will match the menu item Close Window

     

    Setup

    Note that Accessibility must be enabled for Alfred in order for this to work correctly.

     

    For example, in macOS Sierra, this is configured using the Security and Privacy preference pane, under the Privacy tab with the Accessibility section selected. Alfred must be included in the list of apps allowed to control your computer. This step is required for the workflow to generate the list of menu items, and also click on a specific menu item. 

     

    Here's a snapshot of what the preference pane might look like in macOS Sierra.

     

    59057e636ca17_ScreenShot2017-04-30at11_26_16AM.png.fa2fd040b690744132ac9ab77c87a0a7.png

     

  11. Streaks

    streaks.gif.f0d8901cb1f8e9003a9f46a1a3f17ead.gif

    \streaks2.gif.69567ea7ad0ca5646c627eb9ccc03951.gif

    streaks3.gif.8b2f35eb2302ee37e54f68838f3237fe.gif

     

    Streaks is a task list workflow for maintaining task streaks. A streak is the number of days a task has been active. 

     

    Download

     

    It can be used as todo list that helps you to maintain a desired habit, or to keep track of outstanding ideas.

    The keyword to activate the workflow is streaks. Once activated, you will be show your Today List - this is a set of tasks that are active for today.

     

    today.png.54bdedf7ba7afe0c51499cc603c3f5b9.png

    Usage

    Type streaks into Alfred to activate the workflow.

    You will be presented with the Today List.

    The general format of a task is 'task name #tags @schedule' where tags and schedule are optional.

    You can type in text in the Today List, which allows you to create new tasks or search for existing ones.

     

    You can also modify existing tasks by selecting them from the Today List view.

     

    gym.png.75035c82e1086133c244f8bb3c4edfa8.png

    Example use cases

    Tracking Orders

    I just ordered a keyboard from Amazon, and I add in a task.

     

    keyboard #orders #pending

     

    This is an example of a daily task whose streak is automatically incremented every day. 

    Such tasks will always appear in your Today List

    Gym Days

    I decided to start going to the gym on specific days of the week.

     

    go to gym @tu,th,sa

     

    This is an example of a tracked task that requires you to confirm the task every scheduled day. In this example, go to gym will appear in your Today List every Tuesday, Thursday and Saturday.

     

    Streaks for scheduled tasks will only be incremented when you confirm them.

    If you missed to confirm a scheduled task, you can restart the streak by resetting it.

  12. Hi Benzi - would it be possible to amend this so that when you select the computer battery, you get all the info from your first battery workflow (cycle count , health etc)?

     

    As a start, I have updated this workflow to display more information as is - so no need for the other workflow. I'll see what more I can add to this, meantime though go ahead and download the latest version and try it out.

×
×
  • Create New...