Jump to content

Pa7trickStar

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Pa7trickStar

  1. File Type Search

    Alfred 5 workflow, which allows a filtered search for files of the selected file type.

     

    Usage

    Search for a file type via the ft keyword.

    image.thumb.png.1c42c44508bab6698fe5516e9683cc91.png

     

    Press to select the file type.

    image.thumb.png.7347ce4c3e781dc8be46644cddc25211.png

     

    Then search for a file with the set file type.

    image.thumb.png.68a90e18276ab440f25eb303344b0303.png

    : Open the file.

    +: Reveal in Finder.

     

    Setup

    1. Download latest release of File Type Search.alfredworkflow.

    2. Install into Alfred by double-click.

    3. Enjoy 😉

     

    Configuration

    image.png.37496c9dbc1ea9bed1d9c6bfeeeada26.png

    Keyword

    The keyword used to tauch the worfklow.

     

    Interval for reloading system uti database

    MacOS maintains a system wide database with Uniform Type Identifier (UTI) like `public.jpeg`. Some UTI are managed by the system/ Apple, some are registered by installed software. When triggering the workflow with the keyword, all identifiers are loaded into Alfred. Since the process of getting the systems uti database is pretty slow, this workflow will create a json file with the necessary information when the workflow is used for the first time. When the json database is deleted or the `Interval for reloading system uti database` is passed, the workflow will create a new json file.

     

    Acknowledgements

    This Workflow is heavily inspired by the Simple Folder Search and Dynamic File Search respectively.

    The workflow icon is also based on these workflows.

    There is an example for creating a workflow which only searches *.pdf files in the Alfred docs. However, the file type would be static then.

    This workflow combines the both concepts so the file type can be set dynamically when using the workflow.

    There is a similar workflow by Stephen_C, which lists all files with a given extension in a given folder. The files are not searchable though.

     

    TODO

    - Find a way to select multiple file types before searching.

    - Insert option to select a folder as search scope.

    - Optimize database download.

     

    GitHub Repository

    Source

  2. maybe you could create a workflow which uses key combos to change the profile in the meantime...

     

    Something like a List Filter as trigger (which has to be populated manually since Safari offering an api) to select the profile.

    Then you could use a keyboard combo to open a new window in the given profile.  With ⌘ + ⌥ + ⇧ + <number> where 0 is your personal profile and 1 to x are the other profiles you can open a new window in a specific profile.

     

    Maybe looking at something like the OpenIn app (haven't tested it myself) might help too.

  3. Alfred 5.1 [2134]
    macOS 13.3.1 (a) (22E772610a)
     

     

    I created a workflow with a ScriptFilter as input. The script in said ScriptFilter outputs a json like this:

    {
        "items": [
            {
                "arg": "redacted",
                "autocomplete": "redacted",
                "icon": {
                    "path": "./media/vpn-connected.png",
                    "type": "filetype"
                },
                "subtitle": "VPN:com.tunnelblick.macos (Connected)",
                "title": "redacted"
            }
          ]
    }

    This output is formatted according to this article: alfredapp.com/help. All items are listed correctly but the icons don't show up.

     

    Solution: Despite the documentation it will work fine when "filetype" in

    "type": "filetype"

    is replaced by anything. For example "png", "" or "file" will work.

     

    In contrast

    "type": "fileicon"

    works exactly as advertised in the documentation.

     

    I guess this is not really a bug in Alfred 5 but a wrong/ unclear help-article.

×
×
  • Create New...