pixelgeek Posted April 15, 2023 Share Posted April 15, 2023 Hi all I have a few Workflows that use a Script Filter. I have the icon showing for the results but I am still a touch confused about how the `type` options work. The documentation says: Quote Use type to alter the behaviour of path. With "type": "fileicon", Alfred will get the file icon for the specified path. With "type": "filetype", you can get the icon of a specific file, for example "path": "public.png". So in this instance I am unsure what "file icon for the specified path" means. The filetype code sample just points to `~/Desktop` as an example without an explanation. So how exactly does filetype work? Link to comment
zeitlings Posted April 15, 2023 Share Posted April 15, 2023 The filetype refers to the Uniform Type Identifier of a given file. "Desktop", for example, has the UTType public.folder. Some file main.swift has the UTType public.swift-source, etc. MacOS will bring up a generic icon associated with that "filetype", which should be fast. You can look up UTTypes in the Terminal if you'd like: mdls -name kMDItemContentType -raw ~/Desktop 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