Skip to content

Instantly share code, notes, and snippets.

@Timber232
Created October 23, 2014 02:25
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 Timber232/a5140542ee543b14b5e1 to your computer and use it in GitHub Desktop.
Save Timber232/a5140542ee543b14b5e1 to your computer and use it in GitHub Desktop.
Fix Google Drive menu icon in OS X Yosemite dark mode.
#!/bin/bash
resource_path="/Applications/Google Drive.app/Contents/Resources/";
bak=".bak";
normal_inverse="mac-normal-inverse.png";
normal_inverse_2x="mac-normal-inverse@2x.png";
normal="mac-normal.png";
normal_2x="mac-normal@2x.png";
# Clear the screen
clear
# Check if Google Drive is installed
if [ -d "$resource_path" ]; then
echo "Google Drive is installed."
echo "[1] Dark mode"
echo "[2] Light mode"
printf "Enter your input: "
read user_input
echo "--------------------------"
if [ $user_input == 1 ]; then
# Create back up before making the change
cp "$resource_path$normal_inverse" "$resource_path$normal_inverse$bak"
cp "$resource_path$normal_inverse_2x" "$resource_path$normal_inverse_2x$bak"
cp "$resource_path$normal" "$resource_path$normal$bak"
cp "$resource_path$normal_2x" "$resource_path$normal_2x$bak"
# Make the switch
mv "$resource_path$normal_inverse" "$resource_path$normal"
mv "$resource_path$normal_inverse_2x" "$resource_path$normal_2x"
cp "$resource_path$normal_inverse$bak" "$resource_path$normal_inverse"
cp "$resource_path$normal_inverse_2x$bak" "$resource_path$normal_inverse_2x"
echo "Success! Google Drive is now in Dark Mode.";
echo "Restart Google Drive to see changes."
else
if [ -f "$resource_path$normal_inverse$bak" ]; then
mv "$resource_path$normal_inverse$bak" "$resource_path$normal_inverse"
mv "$resource_path$normal_inverse_2x$bak" "$resource_path$normal_inverse_2x"
mv "$resource_path$normal$bak" "$resource_path$normal"
mv "$resource_path$normal_2x$bak" "$resource_path$normal_2x"
echo "Success! Google Drive is now in Light Mode.";
echo "Restart Google Drive to see changes."
else
echo "You're already in light mode."
fi
fi
else
echo "Google Drive is NOT installed"
echo "Download the app: CMD + Double Click -> https://tools.google.com/dlpage/drive#eula"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment