Skip to content
Sergey Ilinykh edited this page Apr 8, 2020 · 1 revision

Icons

Main client icon search struct. <left part of caps/clientName> => <list of icons with caps/clientName clarifications>

Example:

client_icons.txt contents:

   psi-plus psi+,psi#fork#plus
   psi-ny psi#ny

First column is icon name in the iconpack and remaining is a set of caps/clientName search spec. This mean for clients with caps node starting with: psi+ and also for nodes starting with psi and having word "fork" or "plus" somewhere inside, "psi-plus" icons will be used. For psi-ny (New Year edition) icon caps whould start with "psi" and have "ny" somewhere in the middle.

The structire below will look like

 {
   "psi"  => [
                {"psi-plus",["fork", "plus"]}
                {"psi-ny",["ny"]}
             ]
   "psi+" => [{"psi-plus",[]}]
 }

Now for example we need to lookup icon for caps node "psiplus.com". The most still mathing item here is "psi", (psi+ won't match because psiplus.com doesn't start with psi+). And we don't have anything like "psip" or "psipl"..

So we review just "psi" (all its items consequently) Both items in "psi" have clarification list. For the first item we take its clarification list ["fork", "plus"] and review if any item is in "psiplus.com". The "plus" will be found, so the icon "psi-plus" will be returned.

Note: It's quite regular for a caps node to start with "https" but the current client_icons.txt almost doesn't have such records. It means it heavily relies on the detected of client names instead of caps. Client name from its side may be taken from the caps node when there is no other way to detect.

Example:

Clone this wiki locally