Skip to content

Instantly share code, notes, and snippets.

@kimus
Created May 29, 2015 23:00
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 kimus/0f1fd08a07b8544629c2 to your computer and use it in GitHub Desktop.
Save kimus/0f1fd08a07b8544629c2 to your computer and use it in GitHub Desktop.
Fix Google Photos Backup icons on Mac OS X Yosemite dark menu bar
#!/bin/bash
# REQUIREMENTS:
# brew install imagemagick
#
function switch_files {
mv $1.png $1-original.png
convert -negate $1-original.png $1.png
}
RUNNING=`ps aux | grep '/Google Photos Backup' | grep -v grep | wc -l | bc`
if [ "$RUNNING" = "1" ]; then
killall 'Google Photos Backup'
while [ "$RUNNING" = "1" ]; do
sleep 1
RUNNING=`ps aux | grep '/Google Photos Backup' | grep -v grep | wc -l | bc`
done
fi
sleep 3
cd '/Applications/Google Photos Backup.app/Contents/Resources/'
FILES=`ls Uploader_*`
for FILE in $FILES
do
switch_files $(basename $FILE .png)
done
open '/Applications/Google Photos Backup.app'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment