Created
November 6, 2014 01:42
-
-
Save gboudreau/fcbe40d55787cfec38b3 to your computer and use it in GitHub Desktop.
Fix Google Drive menuBar icon for dark mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function switch_files { | |
mv $1.png $1.tmp.png | |
mv $1-inverse.png $1.png | |
mv $1.tmp.png $1-inverse.png | |
mv [email protected] [email protected] | |
mv [email protected] [email protected] | |
mv [email protected] [email protected] | |
} | |
RUNNING=`ps aux | grep '/Google Drive' | grep -v grep | wc -l | bc` | |
if [ "$RUNNING" = "1" ]; then | |
killall 'Google Drive' | |
while [ "$RUNNING" = "1" ]; do | |
sleep 1 | |
RUNNING=`ps aux | grep '/Google Drive' | grep -v grep | wc -l | bc` | |
done | |
fi | |
sleep 3 | |
cd '/Applications/Google Drive.app/Contents/Resources/' | |
switch_files mac-animate1 | |
switch_files mac-animate2 | |
switch_files mac-animate3 | |
switch_files mac-animate4 | |
switch_files mac-animate5 | |
switch_files mac-animate6 | |
switch_files mac-animate7 | |
switch_files mac-animate8 | |
switch_files mac-error | |
switch_files mac-inactive | |
switch_files mac-normal | |
switch_files mac-paused | |
open '/Applications/Google Drive.app' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script doesn't seem to work anymore. I've assigned chmod +x, and tried running with and without sudo. It executes, but doesn't change any icons. When I check the folder there are no tmp.png images either and their last modified date remains unchanged. I can't find the bug, maybe you can?