Skip to content

Instantly share code, notes, and snippets.

@visnup
Created August 29, 2009 03:07
Show Gist options
  • Save visnup/177371 to your computer and use it in GitHub Desktop.
Save visnup/177371 to your computer and use it in GitHub Desktop.
change my webkit icon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<dict>
<key>Label</key>
<string>com.visnup.icons.chrome</string>
<key>LowPriorityIO</key>
<true/>
<key>Program</key>
<string>/Users/visnup/Play/webkit_icon/icon.sh</string>
<key>ProgramArguments</key>
<array>
<string>Google Chrome</string>
<string>app</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Applications/Google Chrome.app</string>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<dict>
<key>Label</key>
<string>com.visnup.icons.webkit</string>
<key>LowPriorityIO</key>
<true/>
<key>Program</key>
<string>/Users/visnup/Play/webkit_icon/icon.sh</string>
<key>ProgramArguments</key>
<array>
<string>WebKit</string>
<string>webkit</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Applications/WebKit.app</string>
</array>
</dict>
</plist>
#!/bin/bash
name=${1:-WebKit}
icns=${2:-webkit}
dir=$(dirname $0)
icon="$dir/$name.icns"
app_dir="/Applications/$name.app/Contents/Resources"
app_backup="$app_dir/$icns.icns.backup"
app_icon="$app_dir/$icns.icns"
[ -e $app_backup ] || mv $app_icon $app_backup
cp $icon $app_icon
touch $app_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment