Skip to content

Python module for programmatically editing the Favorites entries of the Finder sidebar.

License

Notifications You must be signed in to change notification settings

Ajordat/finder-sidebar-editor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finder Sidebar Editor

PyPI PyPI - Downloads PyPI - License

GitHub issues GitHub pull requests

Python module for easily adding, removing, and moving favorites on the Finder sidebar in the context of the logged in user.

Based on the work by robperc in robperc/FinderSidebarEditor.

Installation

Install the PyPI package using pip:

pip install finder-sidebar-editor

Example usage

from finder_sidebar_editor import FinderSidebar                # Import the module

sidebar = FinderSidebar()                                      # Create a Finder sidebar instance to act on.

sidebar.remove("All My Files")                                 # Remove 'All My Files' favorite from sidebar
sidebar.remove("iCloud")                                       # Remove 'iCloud' favorite from sidebar
sidebar.add("/Library")                                        # Add '/Library' favorite to sidebar
sidebar.add("/SomeShare", uri="smb://shares")                  # Mount 'smb://shares/SomeShare' to '/Volumes/SomeShare' and add as favorite to sidebar
sidebar.add("/SomeOtherShare", uri="afp://username:pw@server") # Mount pw protected 'afp://server/SomeOtherShare' to '/Volumes/SomeOtherShare' and add as favorite to sidebar
sidebar.move("Library", "Applications")                        # Move 'Library' favorite to slot just below 'Applications'

About

Python module for programmatically editing the Favorites entries of the Finder sidebar.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%