Missionary Posted August 1, 2022 Share Posted August 1, 2022 I love customizing my files and folders with icons. The problem is that when I search in Alfred, the icon file, which is supposed to be invisible, appears in the result. So how can I remove that icon image file from search ? Thanks in advance. Link to comment
andy4222 Posted August 2, 2022 Share Posted August 2, 2022 (edited) You could: 1. Read this thread which gives you options like File Filter. In File Filter, you can specific the type of files that show up in the search. Remember to create a global scope (or a directory scope if you want to limit the search to a directory) and specify the File Type to the types of files you want to see. 2. You could add the file you want to ignore to Spotlight's privacy and Alfred won't show it. (Alfred uses Spotlight indexing). 3. You could add `alfred:ignore` to the file's comments and Alfred will ignore it. I'd suggest going with approach 1, as it seems much more scalable. EDIT: Another approach would be to hide the icon files. I don't think Alfred shows hidden files in the search result by default. You could just write a shell script (or find one on stackoverflow) that scans all your directories and hides the `.ico` files. This is pretty easy too. You could hook it up to a workflow and trigger it manually when needed. Edited August 2, 2022 by andy4222 Link to comment
vitor Posted August 2, 2022 Share Posted August 2, 2022 @Missionary From your screenshots, you’re not searching for icons but navigating to them. When using Alfred’s File Navigation, all files show up regardless of hidden status or other settings, same as if you’d list them in a terminal. But I do see how that Icon resource fork can be annoying and listing it isn’t particularly useful. I’ll open a ticket internally for discussion. Link to comment
vitor Posted August 23, 2022 Share Posted August 23, 2022 In Alfred 5.0.2 Pre-release (2071), the Icon resource forks are now hidden during File Navigation. The behaviour can be brought back by running in a Terminal: defaults write com.runningwithcrayons.Alfred fsShowFolderIconFiles 1 Link to comment
Missionary Posted August 24, 2022 Author Share Posted August 24, 2022 (edited) On 8/1/2022 at 11:36 PM, andy4222 said: You could: 1. Read this thread which gives you options like File Filter. In File Filter, you can specific the type of files that show up in the search. Remember to create a global scope (or a directory scope if you want to limit the search to a directory) and specify the File Type to the types of files you want to see. 2. You could add the file you want to ignore to Spotlight's privacy and Alfred won't show it. (Alfred uses Spotlight indexing). 3. You could add `alfred:ignore` to the file's comments and Alfred will ignore it. I'd suggest going with approach 1, as it seems much more scalable. EDIT: Another approach would be to hide the icon files. I don't think Alfred shows hidden files in the search result by default. You could just write a shell script (or find one on stackoverflow) that scans all your directories and hides the `.ico` files. This is pretty easy too. You could hook it up to a workflow and trigger it manually when needed. On 8/2/2022 at 10:08 AM, vitor said: @Missionary From your screenshots, you’re not searching for icons but navigating to them. When using Alfred’s File Navigation, all files show up regardless of hidden status or other settings, same as if you’d list them in a terminal. But I do see how that Icon resource fork can be annoying and listing it isn’t particularly useful. I’ll open a ticket internally for discussion. Well, I agreed with @vitor. I would like to navigate to the folder without seeing the `icon` file. All the 3 proposed methods do not work. 1. I prefer navigating so I don't have to recall the content in a folder 2. Spotlight's privacy can only include folder not file 3. `alfred:ignore` does not work 4. The script could be easy for you but I'm non-programmer so it's hard for me. Could you please share the script ? Thanks. 4 hours ago, vitor said: In Alfred 5.0.2 Pre-release (2071), the Icon resource forks are now hidden during File Navigation. The behaviour can be brought back by running in a Terminal: defaults write com.runningwithcrayons.Alfred fsShowFolderIconFiles 1 Well, I can't wait to see it. Edited August 24, 2022 by Missionary Link to comment
vitor Posted August 24, 2022 Share Posted August 24, 2022 1 minute ago, Missionary said: Well, I can't wait to see it. You can either wait for 5.0.2 to be out of pre-release, or test it now by going to Alfred Preferences → Update and changing to check for pre-releases. Link to comment
Missionary Posted August 24, 2022 Author Share Posted August 24, 2022 5 minutes ago, vitor said: You can either wait for 5.0.2 to be out of pre-release, or test it now by going to Alfred Preferences → Update and changing to check for pre-releases. Wow, I never know that! Big Thank You!! 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