Maybe possible to show sync status from OS file browser?

I had a thought about a simple way to show sync status from a file browser, by just having a script that polls syncthing for sync status of each tracked folder and then creates (ignored) files in the root of each tracked folder, like

some_syncthing_poller | while read -r syncstatus folder; do
  case syncstatus of 
    synced) cp /imgs/st-synced.jpg "$folder/st-status.jpg"
    nonsynced) cp /imgs/st-nonsynced.jpg "$folder/st-status.jpg"
  esac
done

but I can’t find anything in the rest api that lists all tracked folders (with their local paths). Is there a way to do this kind of thing? (Or would it make sense to have this kind of image-copying as a built-in optional feature of syncthing?)

I think you can do even better on at least Mac and Windows that support setting custom icons for folders. To get the list of folders and paths you can request the current config, which includes that.

The Windows shell overlays tend to be a bit flakey, but yeah, certainly possible. There’s a SyncTrayzor issue open around that.

@calmh You are right for Mac OS X (10.10 or higher) you can have a Finder Sync overlay. I have tried to write a application plugin for my xor-gate/syncthing-macosx application bundle but have not finished it. It is tricky because you can blow up your memory and cpu usage when not implemented correctly. According to apple developer doc: https://developer.apple.com/library/mac/documentation/General/Conceptual/ExtensibilityPG/Finder.html

There are other people in the time “Ubuntu One” share was available they even wrote a finder plugin under https://github.com/JoseExposito/U1-Finder-Plugin which I got for inspiration.

Hm, as far as I know there’s no (standard) way to set custom folder icons on Linux :-/

I actually ended up just reading the config.xml to find the folders, since that way I can have a different icon if Syncthing is down:

Seems to work :slight_smile:

Now I get a simple .desktop file within the folder linking to the Syncthing GUI, with an icon and name showing the sync state. The script could probably be expanded to create relevant files for other OS’es …