Skip to content

Commit

Permalink
Update README and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kcrawford committed Jul 16, 2016
1 parent 9a485a6 commit 356070e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

dockutil is a command line utility for managing Mac OS X dock items.
It is currently written in Python and makes use of plistlib module included in Mac OS X.
- Compatible with Mac OS X 10.9.x thru 10.10 (use 1.x version for older
- Compatible with Mac OS X 10.9.x thru 10.11 (use 1.x version for older
OSes)
- Add, List, Move, Find, Remove Dock Items
- Supports Applications, Folders, Stacks, URLs.
Expand All @@ -14,6 +14,10 @@ It is currently written in Python and makes use of plistlib module included in M

**CHANGELOG**

Version 2.0.4
- Allow removal by app bundle identifier (credit to Yoann Gini)
- Bug fixes for plist quoting (credit to VitosX)

Version 2.0.3
- Wait for dock to be setup by Apple before modifying (useful for first login scripts)

Expand Down Expand Up @@ -62,67 +66,65 @@ Version 1.1

usage: dockutil -h
usage: dockutil --add <path to item> | <url> [--label <label>] [ folder_options ] [ position_options ] [ plist_location_specification ] [--no-restart]
usage: dockutil --remove <dock item label> | all [ plist_location_specification ] [--no-restart]
usage: dockutil --remove <dock item label> | <app bundle id> | all [ plist_location_specification ] [--no-restart]
usage: dockutil --move <dock item label> position_options [ plist_location_specification ]
usage: dockutil --find <dock item label> [ plist_location_specification ]
usage: dockutil --list [ plist_location_specification ]
usage: dockutil --version

position_options:
--replacing <dock item label name> replaces the item with the given dock label or adds the item to the end if item to replace is not found
--position [ index_number | beginning | end | middle ] inserts the item at a fixed position: can be an position by index number or keyword
--after <dock item label name> inserts the item immediately after the given dock label or at the end if the item is not found
--before <dock item label name> inserts the item immediately before the given dock label or at the end if the item is not found
--section [ apps | others ] specifies whether the item should be added to the apps or others section

plist_location_specifications:
<path to a specific plist> default is the dock plist for current user
<path to a home directory>
--allhomes attempts to locate all home directories and perform the operation on each of them
--homeloc overrides the default /Users location for home directories

folder_options:
--view [grid|fan|list|automatic] stack view option
--display [folder|stack] how to display a folder's icon
--sort [name|dateadded|datemodified|datecreated|kind] sets sorting option for a folder view

Examples:
The following adds TextEdit.app to the end of the current user's dock:
dockutil --add /Applications/TextEdit.app

The following replaces Time Machine with TextEdit.app in the current user's dock:
dockutil --add /Applications/TextEdit.app --replacing 'Time Machine'

The following adds TextEdit.app after the item Time Machine in every user's dock on that machine:
dockutil --add /Applications/TextEdit.app --after 'Time Machine' --allhomes

The following adds ~/Downloads as a grid stack displayed as a folder for every user's dock on that machine:
dockutil --add '~/Downloads' --view grid --display folder --allhomes

The following adds a url dock item after the Downloads dock item for every user's dock on that machine:
dockutil --add vnc://miniserver.local --label 'Mini VNC' --after Downloads --allhomes

The following removes System Preferences from every user's dock on that machine:
dockutil --remove 'System Preferences' --allhomes

The following moves System Preferences to the second slot on every user's dock on that machine:
dockutil --move 'System Preferences' --position 2 --allhomes

The following finds any instance of iTunes in the specified home directory's dock:
dockutil --find iTunes /Users/jsmith

The following lists all dock items for all home directories at homeloc in the form: item<tab>path<tab><section>tab<plist>
dockutil --list --homeloc /Volumes/RAID/Homes --allhomes

The following adds Firefox after Safari in the Default User Template without restarting the Dock
dockutil --add /Applications/Firefox.app --after Safari --no-restart '/System/Library/User Template/English.lproj'


Notes:
When specifying a relative path like ~/Documents with the --allhomes option, ~/Documents must be quoted like '~/Documents' to get the item relative to each home

Bugs:
Names containing special characters like accent marks will fail



**LIMITATIONS AND DEPENDENCIES**
Expand Down
3 changes: 0 additions & 3 deletions scripts/dockutil
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ Examples:
Notes:
When specifying a relative path like ~/Documents with the --allhomes option, ~/Documents must be quoted like '~/Documents' to get the item relative to each home
Bugs:
Names containing special characters like accent marks will fail
Contact:
Send bug reports and comments to kcrwfrd at gmail.
Expand Down

0 comments on commit 356070e

Please sign in to comment.