Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyway to have programs share Windows Explorer icon overlays?

The fact that Windows only allows 15 icon overlays is well worn territory at this point. I understand how to rename the registry entries to get the overlays I absolutely need to be visible. But I wonder if there is a better way.

I don't know much about registry editing and I know next to nothing about the inner working of windows and how the overlays actually get requested/delivered. So I'm not sure how these overlays actually work... But the programs I use that have overlays (TortoiseSvn, Box, Google Drive) all do basically the same thing. Generally speaking, they compare the status of a file locally to the status of a file in the cloud or on a server. For this reason it seems like many of these overlays could logically be shared. Why couldn't the BoxSynced, GoogleDriveSynced, and Tortoise1Normal all use the same icon?

So my question is: Does anyone know of a way to manipulate the registry to combine some icon overlays? Or is there maybe a some sort of tool or utility out there that can achieve something like a set of "shared overlays"?

like image 235
Josh Avatar asked Jan 11 '16 22:01

Josh


People also ask

What is icon overlay handler?

An icon overlay handler can request an icon overlay for all files of the file type. Some handlers request an icon overlay only if a file of the file type is in a particular state. However, icon overlay handlers are free to request their icon overlay for any object that they choose.

What is the icon shell?

Shell icon overlays are icons that Microsoft Windows can display on top of folder icons.


1 Answers

TortoiseOverlays is a shim that can serve this purpose. It was designed to share icon overlays across Tortoise clients (SVN, git, Hg), but it can be repurposed to do the same for file syncing programs as long as you can match up File Syncing states to one of the given Version Control icons (it would be nice if TortoiseOverlays was extend it to allow for more possible icons).

Instructions:

  1. Install TortoiseOverlays. It can be installed directly or it comes with the Tortoise clients.
  2. Make sure the TortoiseXxxxx keys come first in [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers] by prepeding a few more spaces.
  3. Add appropriate keys to [HKLM\SOFTWARE\TortoiseOverlays] to determine the mapping.

You can add the appropriate keys by reading the TortoiseOverlays instructions and then figuring out which states are mapped to from the overlay keys (this is usually easy given the key names, but for Dropbox and OneDrive see here and here ). Below I have worked out an example that works for me for Dropbox, Google Drive, OneDrive, and OwnCloud. One can save the appropriate sections to a .reg file and import them.

    ; GoogleDriveSynced
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "GoogleDrive"="{81539FE6-33C7-4CE7-90C7-1C7B8F2F2D40}"

    ; GoogleDriveBlacklisted
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Ignored]
    "GoogleDrive"="{81539FE6-33C7-4CE7-90C7-1C7B8F2F2D42}"

    ; GoogleDriveSyncing
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "GoogleDrive"="{81539FE6-33C7-4CE7-90C7-1C7B8F2F2D41}"

    ;OCError
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "OC"="{0960F090-F328-48A3-B746-276B1E3C3722}"

    ;OCErrorShared
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "OCShared"="{0960F091-F328-48A3-B746-276B1E3C3722}"

    ;OCOK
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "OC"="{0960F092-F328-48A3-B746-276B1E3C3722}"

    ;OCOKShared
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "OCShared"="{0960F093-F328-48A3-B746-276B1E3C3722}"

    ;OCSync
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "OC"="{0960F094-F328-48A3-B746-276B1E3C3722}"

    ;OCSyncShared
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "OCShared"="{0960F095-F328-48A3-B746-276B1E3C3722}"

    ;OCWarning
    ;"OC"="{0960F096-F328-48A3-B746-276B1E3C3722}"

    ;OCWarningShared
    ;"OCShared"="{0960F097-F328-48A3-B746-276B1E3C3722}"

    ;DropboxExt1 - "Synced!"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "Dropbox"="{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt2 - "Sync in progress"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "Dropbox"="{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt3 - "Synced! - Locked"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "DropboxLock"="{FB314EDD-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt4 - "Sync in progress - Locked"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "DropboxLock"="{FB314EDE-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt5 - "Sync not happening" (red x)
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "Dropbox"="{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt6 - "Sync not happening - Locked" (red x + Lock)
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "DropboxLock"="{FB314EDF-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt7 - "A file or folder isn't syncing" (gray minus)
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Ignored]
    "Dropbox"="{FB314EDC-A251-47B7-93E1-CDD82E34AF8B}"

    ;DropboxExt8 - "A file or folder isn't syncing - Locked" (gray minus+Lock)
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Ignored]
    "DropboxLock"="{FB314EE0-A251-47B7-93E1-CDD82E34AF8B}"

    ;OneDrive1 - "Not syncing" (red x)
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "OneDrive"="{BBACC218-34EA-4666-9D7A-C78F2274A524}"

    ;OneDrive2 - "Synced (Shared)"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "OneDriveShared"="{5AB7172C-9C11-405C-8DD5-AF20F3606282}"

    ;OneDrive3 - "Syncing (Shared)"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "OneDriveShared"="{A78ED123-AB77-406B-9962-2A5D9D2F7F30}"

    ;OneDrive4 - "Synced"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "OneDrive"="{F241C880-6982-4CE5-8CF7-7085BA96DA5A}"

    ;OneDrive5 - "Syncing"
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "OneDrive"="{A0396A93-DC06-4AEF-BEE9-95FFCCAEF20E}"

    ;BoxSyncSynced
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Normal]
    "BoxSync"="{c89f9943-8f58-3eca-bd55-a658f53b2f48}"

    ;BoxSyncNotSynced
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "BoxSync"="{5ea95e3d-3e46-3812-b03c-49785fa67d41}"

    ;BoxSyncFileLocked
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Locked]
    "BoxSync"="{2a607da5-abe8-358e-a881-c0f5faf2d3a5}"

    ;BoxSyncFileLockedByOther
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Modified]
    "BoxSync"="{f7d2951f-0b6b-346c-99ec-69cffc30a364}

    ;BoxSyncProblem
    [HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseOverlays\Conflict]
    "BoxSync"="{a88b7184-bfa1-3d14-8efb-2225df9699bc}"

A few caveats for my worked out registry keys:

  • I have mapped "Error" to "Conflict" and "Syncing" to "Modified". There was no obvious match for OwnCloud's "Warnings" so they are not mapped to anything.
  • Many programs have additional icons that differ from the main ones by a characteristic that I ignore, so that I map both in the pair to the same icon. These include OwnCloud "shared", Dropbox "locked", and OneDrive "shared" pairs.
  • The keys depend on CLSIDs which may change between versions of file syncing programs.
like image 136
BeingQuisitive Avatar answered Nov 10 '22 00:11

BeingQuisitive