fastfetch: visible palette blocks, keyed icons
This commit is contained in:
parent
3d3a9e7997
commit
2d5c385ec1
1 changed files with 6 additions and 1 deletions
|
|
@ -3,7 +3,9 @@ let
|
||||||
c = config.lib.stylix.colors;
|
c = config.lib.stylix.colors;
|
||||||
# Truecolor swatch for one base16 slot. `` stays a literal JSON escape
|
# Truecolor swatch for one base16 slot. `` stays a literal JSON escape
|
||||||
# here — fastfetch's JSONC parser turns it into a real ESC byte.
|
# here — fastfetch's JSONC parser turns it into a real ESC byte.
|
||||||
swatch = n: "\\u001b[48;2;${c."${n}-rgb-r"};${c."${n}-rgb-g"};${c."${n}-rgb-b"}m ";
|
# Foreground blocks, not background-coloured spaces: a coloured space is
|
||||||
|
# invisible anywhere the colour is stripped (copy/paste, piped output).
|
||||||
|
swatch = n: "\\u001b[38;2;${c."${n}-rgb-r"};${c."${n}-rgb-g"};${c."${n}-rgb-b"}m███";
|
||||||
paletteRow = names: lib.concatMapStrings swatch names + "\\u001b[0m";
|
paletteRow = names: lib.concatMapStrings swatch names + "\\u001b[0m";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -62,16 +64,19 @@ in
|
||||||
{
|
{
|
||||||
"type": "custom",
|
"type": "custom",
|
||||||
"key": "Scheme",
|
"key": "Scheme",
|
||||||
|
"keyIcon": "",
|
||||||
"format": "base16, generated by stylix from wallpaper.png (${config.stylix.polarity})"
|
"format": "base16, generated by stylix from wallpaper.png (${config.stylix.polarity})"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom",
|
"type": "custom",
|
||||||
"key": "Base",
|
"key": "Base",
|
||||||
|
"keyIcon": "",
|
||||||
"format": "${paletteRow [ "base00" "base01" "base02" "base03" "base04" "base05" "base06" "base07" ]}"
|
"format": "${paletteRow [ "base00" "base01" "base02" "base03" "base04" "base05" "base06" "base07" ]}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom",
|
"type": "custom",
|
||||||
"key": "Accent",
|
"key": "Accent",
|
||||||
|
"keyIcon": "",
|
||||||
"format": "${paletteRow [ "base08" "base09" "base0A" "base0B" "base0C" "base0D" "base0E" "base0F" ]}"
|
"format": "${paletteRow [ "base08" "base09" "base0A" "base0B" "base0C" "base0D" "base0E" "base0F" ]}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue