formats/psclock.format.ps1xml

<!--
Format type data generated 11/05/2021 15:08:39 by PROSPERO\Jeff
 
This file was created using the New-PSFormatXML command that is part
of the PSScriptTools module.
 
https://github.com/jdhitsolutions/PSScriptTools
-->
<Configuration>
  <ViewDefinitions>
    <View>
      <!--Created 11/05/2021 15:08:39 by PROSPERO\Jeff-->
      <Name>default</Name>
      <ViewSelectedBy>
        <TypeName>PSClock</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.-->
        <AutoSize />
        <TableHeaders>
          <TableColumnHeader>
            <Label>Running</Label>
            <Width>10</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Format</Label>
            <Width>9</Width>
            <Alignment>Center</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>FontFamily</Label>
            <Width>13</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Size</Label>
            <Width>7</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Weight</Label>
            <Width>9</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Color</Label>
            <Width>8</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Style</Label>
            <Width>9</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>OnTop</Label>
            <Width>8</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>RunspaceID</Label>
            <Width>13</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match "console|code" -AND (-Not $_.Running)) {
                  "$([char]27)[91m$($_.Running)$([char]27)[0m"
                }
                else {
                  $_.Running
                }
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Format</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>FontFamily</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Size</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Weight</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Color</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Style</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>OnTop</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>RunspaceID</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>