
ตั้งแต่ upgrade macbook มาเป็น Yosemite ก็ต้องรำคาญกับ icon ของ Google Drive บน menu bar สีดำ เพราะสีมันกลืนกัน ดูยาก
ใครอยากเปลี่ยนให้มันดูง่ายๆ ทำตามได้เลยครับ :)
อ่อ script นี้จะใช้งานได้ มีข้อแม้ว่า Google Drive.app ต้องติดตั้งไว้ที่ folder Applications
สร้างไฟล์ fix-google-drive-dark-mode-icons.sh เนื้อหาตามข้างล่าง ไว้ที่ ~/Desktop
ถ้าคุ้นเคยกับการใช้ shell script กันอยู่แล้ว คุณจะไว้ที่ไหนก็ได้ ตั้งชื่อไฟล์ว่าอะไรก็ได้ ;)
#!/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 $1@2x.png $1@2x.tmp.png
mv $1-inverse@2x.png $1@2x.png
mv $1@2x.tmp.png $1-inverse@2x.png
}
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'
เสร็จแล้ว เปิด Terminal
$ chmod +x ~/Desktop/fix-google-drive-dark-mode-icons.sh
$ ~/Desktop/fix-google-drive-dark-mode-icons.sh
เมื่อ execute script แล้ว รอสักครู่ เมื่อ prompt return กลับมาเป็นอันเสร็จ
ขอบคุณ คุณ gboudreau จาก reddit
ไม่มีความคิดเห็น :
แสดงความคิดเห็น