Skip to content

Instantly share code, notes, and snippets.

@atika
Last active September 29, 2018 03:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atika/3e37fc06287b29a9e937 to your computer and use it in GitHub Desktop.
Save atika/3e37fc06287b29a9e937 to your computer and use it in GitHub Desktop.
Set the missing app category on OS X
#!/bin/bash
# Write category for an app
developer="public.app-category.developer-tools"
utilities="public.app-category.utilities"
productivity="public.app-category.productivity"
photography="public.app-category.photography"
video="public.app-category.video"
music="public.app-category.music"
social="public.app-category.social-networking"
design="public.app-category.graphics-design"
set_app_category()
{
category="$1"
apps_list="$2"
echo $apps_list | tr ',' '\n' | while read app; do
application="/Applications/$app.app"
if [ -a "$application" ]; then
echo "$application exist set category $category"
plist="$application/Contents/Info.plist"
sudo defaults write "$plist" LSApplicationCategoryType -string $category
sudo chown $USER:staff "$plist"
sudo chmod 744 "$plist"
sudo touch "$application"
else
echo "$application not found."
fi
done
}
set_app_category $developer 'RegExRX,Adobe Edge Inspect,Processing,Script Debugger,Arduino,Brackets Sprint 33,CocoaDialog,Fake,Fluid,Fritzing,MacGDBp,MoM'
set_app_category $utilities 'Shady,TeamViewer,Spark,Synology Assistant,Synology Cloud Station, Printer Pro Desktop,LineIn,BitTorrent Sync, MEGAsync, OnyX, DiskWave, DMGConverter,Dropbox,Android File Transfer'
set_app_category $productivity 'TextExpander, Google Drive, Google Translate'
set_app_category $photography 'Synology Photo Station Uploader,Canon Utilities/EOS Utility/EOS Utility'
set_app_category $music 'Radium, Audio Hijack Pro, Fender FUSE'
set_app_category $video 'HandBrake, VLC, Playback, XBMC, Plex Media Server'
set_app_category $design 'Google Web Designer'
@atika
Copy link
Author

atika commented Dec 10, 2014

Be careful using this script, it can corrupt your app, adapt and test for your own usage. Use it on app without category, some apps doesn't like modification of the bundle as applications from App Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment