When clause contexts
Podman Desktop uses when clauses to enable or disable extensions command and UI customizations, such as views.
For example, the Kind extension adds a custom icon to a container that has a label equals to io.x-k8s.kind.cluster
by using the following instruction.
"views": {
"icons/containersList": [
{
"when": "io.x-k8s.kind.cluster in containerLabelKeys",
"icon": "${kind-icon}"
}
]
}
A when clause can consist of a context key (such as isLinux
) or complex expressions to define a specific state.