Check if Google Drive is paused

Other than relying on Found Image, is there a way (maybe via shell / AppleScript / Javascript?) to check if Google Drive is paused or syncing?

For context:
Besides my external disks that I use for backups, I have this macro that I run when I make important changes to my files and that macro creates a folder with the current date in multiple places (iCloud, Google Drive, a secondary internal disk - YES, I'm hyper paranoid when it comes to losing my files...).

Then when I leave the studio, I pause Google Drive so if by any chance, something super weird happens to my computer and it starts deleting files while I'm away, the files that are remotely saved in Google Drive, are not affected, because it's not syncing.

I have a macro that clicks the menu bar to pause/resume the syncing process, but I would like to add a few extra options based on whether it's already paused or already syncing. Is this possible, other than relying on Found Image?

I don't use Google stuff, but the next time it's synching, open Activity Monitor and search for processes that contain the word Google. Then, when it's not synching, do the same. Any differences?

If there's a difference in the two lists, a macro could run a Terminal command to determine if it's synching or not.


I see how that could be an option, but I just tested it and:
1 - Syncing or paused, there is no difference in the amount of processes using the word Google. It's all the same number of processes before and after.
2 - The first time I ran it, 3 of them were working (the %CPU and CPU Time columns were displaying different values constantly) while it was syncing and stopped when I paused, but the second time I tested it, none of them changed.
3 - It seems that the app adds a lot of the same processes:

I tried to track which ones were changing, but it seems to be random...

I was sort of afraid of that. A few other approaches, none of which are particularly elegant…

  • lsof can show network activity, but I don't know if you can identify Google Drive traffic in its output.
  • netstat shows network activity, but as above, I don't know if you can identify Google Drive traffic in its output.
  • There's a command line interface available for Google Drive: gdrive. Apparently it offers start/stop sync from the command line. If so, then maybe it would run until done, which would make it easy to tell when it's finished?

Sorry I don't have any better ideas.


I think I will either stick to doing it "manually" or include a Found Image action.
For now it seems to be easier and faster for me to implement for such a simple thing.

I guess at this point I'm so used to having everything as automated and as fast as possible, that it becomes too much. And the amount of time I spend trying to figure out a way to automated it, is the time I could spend just doing it manually haha

Those options you suggested all require me to learn something new again, then it doesn't work for some reason, then I have to come back and try to figure it out... [repeat]

It's better to leave it as is. I already made it work with AppleScript, which I'm proud of, now I just need to add a Found Image action and "close this case" :wink:

Thanks for your time and help!! :muscle:

1 Like