Code Monkey home page Code Monkey logo

custom-finder-sidebar-icons's Introduction

Custom Finder Sidebar Icons

An Xcode project to set custom icons for folders in the Finder sidebar. Developer is a built-in icon, but Work and Ruminate are using the SF Symbols laptopcomputer and waveform respectively:

sidebar-example

This is a small Xcode project based on a combination of this Reddit post and this documentation about CFBundleSymbolName. For each custom icon and folder, you need to run a Finder Sync app (like Dropbox does) which allows the app to set custom sidebar icons, among other things.

Limitations

  • Folders inside Dropbox and Google Drive won't work. To make them work, create an alias to the folder and set that as the path in URLs
  • Your app name needs to be unique, hence the rename script. Attempting to run two apps of the same name causes weird issues.
  • To stop your icon app running, you need to delete the app or reboot.
  • All of this is very flaky. If it doesn't work, try cleaning the build folder in Xcode and rebuilding (Product > Clean Build Folder). As a last resort a reboot seemed to fix it on a few occasions.

Setup

Clone or download this repository and then run the following with your options filled in:

  • APPNAME is the name of your new app. This can be anything, I tend to do FolderNameIcon
  • PATH is the folder you want to have a custom icon for
  • SFSYMBOL is the SF Symbol you want to use, for example, flame.fill
# three arguments
bash rename.sh APPNAME PATH SFSYMBOL

# real example
bash rename.sh DownloadFolderIcon /Users/robb/Downloads flame.fill
  • Open DownloadFolderIcon.xcodeproj in Xcode, click Product from the main menu, then Archive then Distribute App > Custom > Copy App and save it somewhere on your computer
  • Open the folder you just saved and open the .app inside
  • Finally, you'll need to enable the extension in Settings > Privacy and Security > Extensions > Added Extensions. Look for DownloadFolderIcon in here. Sometimes it needs a toggle on/off a couple of times to work.

Assuming everything worked correctly, if you drag your selected folder to the sidebar you should see the SF Symbol you selected as the icon. You should also add your .app to Login Items (Settings > General > Login Items) so it runs on boot.

Using a custom SF Symbol

This does work, sometimes, but like all of this it's flaky.

  • Open the Media.xcassets and drag your custom SF symbol into the left panel - the icon should be visible on the right panel in three sizes
  • Change NameOfYourApp/info.plist icon entry to the name of your custom symbol
  • Rebuild and pray to your favourite deity

Further Info

You have to run an app for every different icon you want to use. So download/copy the repo again and follow the above steps.

If you want to use the same icon for multiple folders you can edit the URLs file by going to the .app in Finder, right click and choose Show Package Contents. Then open Contents/Plugins and do Show Package Contents on Extension.appex then the URLs file is inside Contents.

Screencasts

Standard SF Symbol

https://github.com/rknightuk/custom-finder-sidebar-icons/blob/main/SF%20Symbol.mp4

Custom SF Symbol

https://github.com/rknightuk/custom-finder-sidebar-icons/blob/main/SF%20Symbol%20Custom.mp4

Credits

custom-finder-sidebar-icons's People

Contributors

rknightuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.