Skip to content

Commit c241ead

Browse files
committed
Logo (Builtin): update nixos_small, add nixos_old_small
Fix #608
1 parent 168d96a commit c241ead

File tree

5 files changed

+35
-32
lines changed

5 files changed

+35
-32
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TBD
2+
3+
Logos:
4+
5+
* Update NixOS_small
6+
17
# 2.2.1
28

39
Hotfix release for #606

CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,11 @@ endif()
234234

235235
function(fastfetch_load_raw_text FILENAME OUTVAR)
236236
file(READ "${FILENAME}" TEMP)
237-
string(REGEX REPLACE "\n$" "" TEMP "${TEMP}") # Remove trailing newline
238-
string(JSON TEMP SET "{}" "${TEMP}" "0") # Encode raw strings using JSON_SET
239-
string(REGEX REPLACE "^\\{[ \t\r\n]*" "" TEMP "${TEMP}") # Remove JSON braces
240-
string(REGEX REPLACE "[ \t\r\n]*:[ \t\r\n]*0[ \t\r\n]*\\}$" "" TEMP "${TEMP}") # Remove trailing ` : 0 }`
241-
if(NOT "${TEMP}" MATCHES "^\"[^\n]*\"")
242-
message(FATAL_ERROR "Internal error: unexpected output: '${TEMP}'")
243-
endif()
244-
set(${OUTVAR} "${TEMP}" PARENT_SCOPE)
237+
string(REGEX REPLACE "\n$" "" TEMP "${TEMP}") # Remove trailing newline
238+
string(REPLACE "\\" "\\\\" TEMP "${TEMP}") # Escape backslashes
239+
string(REPLACE "\n" "\\n" TEMP "${TEMP}") # Replace newlines with \n
240+
string(REPLACE "\"" "\\\"" TEMP "${TEMP}") # Replace quotes with \"
241+
set(${OUTVAR} "\"${TEMP}\"" PARENT_SCOPE)
245242
endfunction(fastfetch_load_raw_text)
246243

247244
file(GLOB LOGO_FILES "src/logo/ascii/*.txt")

src/logo/ascii/nixos_old_small.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
$1 \\ $2\\ //
2+
$1 ==\\__$2\\/ $1//
3+
$2 // $2\\$1//
4+
$2==// $1//==
5+
$2 //$1\\$2___$1//
6+
$2// $1/\\ $2\\==
7+
$1// \\ $2\\

src/logo/ascii/nixos_small.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
\\ \\ //
2-
==\\__\\/ //
3-
// \\//
4-
==// //==
5-
//\\___//
6-
// /\\ \\==
7-
// \\ \\
1+
$1 ▗▄ $2▗▄ ▄▖
2+
$1 ▄▄🬸█▄▄▄$2🬸█▛ $1▃
3+
$2 ▟▛ ▜$1▃▟🬕
4+
$2🬋🬋🬫█ $1█🬛🬋🬋
5+
$2 🬷▛🮃$1▙ ▟▛
6+
$2 🮃 $1▟█🬴$2▀▀▀█🬴▀▀
7+
$1 ▝▀ ▀▘ $2▀▘

src/logo/builtin.c

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,48 +2596,41 @@ static const FFlogo N[] = {
25962596
},
25972597
// NixOS
25982598
{
2599-
.names = {"NixOS", "nix", "nixos-linux", "nix-linux", "nix-os", "nix_os", "nix_os_linux"},
2599+
.names = {"NixOS", "nix", "nixos-linux", "nix-linux"},
26002600
.lines = FASTFETCH_DATATEXT_LOGO_NIXOS,
26012601
.colors = {
26022602
FF_COLOR_FG_BLUE,
26032603
FF_COLOR_FG_CYAN,
26042604
},
2605-
.colorKeys = FF_COLOR_FG_CYAN,
2606-
.colorTitle = FF_COLOR_FG_BLUE,
26072605
},
2608-
// NixOS_small
2606+
// NixOSSmall
26092607
{
2610-
.names = {"NixOS_small", "nix_small"},
2608+
.names = {"NixOS_small", "nix_small", "nixos-linux-small", "nix-linux-small"},
26112609
.lines = FASTFETCH_DATATEXT_LOGO_NIXOS_SMALL,
26122610
.colors = {
26132611
FF_COLOR_FG_BLUE,
26142612
FF_COLOR_FG_CYAN,
26152613
},
2616-
.colorKeys = FF_COLOR_FG_CYAN,
2617-
.colorTitle = FF_COLOR_FG_BLUE,
26182614
},
2619-
// NixOsOld
2615+
// NixOSOld
26202616
{
2621-
.names = {"nixos_old", "nix-old", "nixos-old", "nix_old", "nix-os-old", "nix_os_old"},
2617+
.names = {"nixos_old", "nix-old", "nixos-old", "nix_old"},
26222618
.type = FF_LOGO_LINE_TYPE_ALTER_BIT,
26232619
.lines = FASTFETCH_DATATEXT_LOGO_NIXOS_OLD,
26242620
.colors = {
26252621
FF_COLOR_FG_BLUE,
26262622
FF_COLOR_FG_CYAN,
26272623
},
2628-
.colorKeys = FF_COLOR_FG_CYAN,
2629-
.colorTitle = FF_COLOR_FG_BLUE,
26302624
},
2631-
// NixOsSmall
2625+
// NixOsOldSmall
26322626
{
2633-
.names = {"nixos_small", "nix-small", "nixos-small", "nix_small", "nix-os-small", "nix_os_small"},
2634-
.type = FF_LOGO_LINE_TYPE_SMALL_BIT,
2635-
.lines = FASTFETCH_DATATEXT_LOGO_NIXOS_SMALL,
2627+
.names = {"nixos_old_small", "nix-old-small", "nixos-old-small", "nix_old_small"},
2628+
.type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT,
2629+
.lines = FASTFETCH_DATATEXT_LOGO_NIXOS_OLD_SMALL,
26362630
.colors = {
26372631
FF_COLOR_FG_BLUE,
2632+
FF_COLOR_FG_CYAN,
26382633
},
2639-
.colorKeys = FF_COLOR_FG_BLUE,
2640-
.colorTitle = FF_COLOR_FG_BLUE,
26412634
},
26422635
// NetBSD
26432636
{

0 commit comments

Comments
 (0)