Skip to content

andrewzirkel/sidebartool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Sidebartool

A command line tool to manage the Finder Sidebar

Requires OSX 10.11

#Build Clone the repository.
Use xcodebuild install on command line in Project directory to build.

#Usage Usage: sidebartool list
Usage: sidebartool remove "item"    Sidebar Item Title, ie. "domain-AirDrop", "All My Files", etc
Usage: sidebartool add "item"          User homedir for Users Home Directory or Folder Name, ie. Music

#Usage as a login item This is how I use this tool with a Launch Agent that kicks off a script at first login:
Here is the Launch Agent:
Replace MYORG and PATHTO with your info.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>org.MYORG.sidebarFavorites</string>
  	<key>LimitLoadToSessionType</key>
  	<array>
    		<string>Aqua</string>
  	</array>
	<key>ProgramArguments</key>
	<array>
		<string>/PATHTO/sidebarFavorites.sh</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>KeepAlive</key>
	<true/>
	<key>LaunchOnlyOnce</key>
	<true/>
</dict>
</plist>

Here is the script:
#!/bin/bash

flagfile="$HOME/.sidebarFavoritesDone"

if [ ! -e $flagfile ]; then
/usr/local/bin/sidebartool remove domain-airdrop
/usr/local/bin/sidebartool remove "All My Files"
/usr/local/bin/sidebartool remove "Documents"
/usr/local/bin/sidebartool add homedir

touch $flagfile
fi

exit 0

About

A command line tool to managed the Finder Sidebar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published