Merge pull request #1162 from kaimingguo/refresh-launchpad

Add reset launchpad layout function
pull/1165/head
Nils Winkler 2018-03-20 03:54:14 -04:00 committed by GitHub
commit f3439c7370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -98,5 +98,18 @@ function prevcurl() {
curl "$*" | open -fa $PREVIEW curl "$*" | open -fa $PREVIEW
} }
function refresh-launchpad() {
about 'Reset launchpad layout in macOS'
example '$ refresh-launchpad'
group 'osx'
if [ $(uname) = "Darwin" ];then
defaults write com.apple.dock ResetLaunchPad -bool TRUE
killall Dock
else
echo "Sorry, this only works on Mac OS X"
fi
}
# Make this backwards compatible # Make this backwards compatible
alias pcurl='prevcurl' alias pcurl='prevcurl'