From 1afaa6cc2fd8f8142c052f2cd3ba3c03093f5112 Mon Sep 17 00:00:00 2001 From: Nylik Date: Wed, 17 Apr 2024 15:51:55 +0100 Subject: [PATCH] Add Arco Linux support --- src/assets/logos.nim | 6 ++++++ src/nitches/getDistro.nim | 4 +++- src/nitches/getLogo.nim | 8 ++++++-- src/nitches/getPkgs.nim | 3 +++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/assets/logos.nim b/src/assets/logos.nim index 2fd73a3..a882955 100644 --- a/src/assets/logos.nim +++ b/src/assets/logos.nim @@ -113,4 +113,10 @@ const / _ | ____ / /_(_)\ \/ / / __ |/ __// __/ / > < /_/ |_/_/ \__/_/ /_/\_\ +""" + arcoLogo* = r""" + ___ + / _ | ___________ + / __ |/ __/ __/ _ \ + /_/ |_/_/ \__/\___/ """ \ No newline at end of file diff --git a/src/nitches/getDistro.nim b/src/nitches/getDistro.nim index fbfa71a..ac9e1a2 100644 --- a/src/nitches/getDistro.nim +++ b/src/nitches/getDistro.nim @@ -2,4 +2,6 @@ import std/parsecfg proc getDistro*(): string = - result = "/etc/os-release".loadConfig.getSectionValue("", "PRETTY_NAME") + result = "/etc/os-release".loadConfig.getSectionValue("", "PRETTY_NAME") + if result == "": + result = "/etc/os-release".loadConfig.getSectionValue("", "NAME") diff --git a/src/nitches/getLogo.nim b/src/nitches/getLogo.nim index cb33720..2ce4547 100644 --- a/src/nitches/getLogo.nim +++ b/src/nitches/getLogo.nim @@ -4,7 +4,7 @@ import func getLogo*(distroId: string): tuple = const - coloredLogos: array[16, tuple] = [ + coloredLogos: array[17, tuple] = [ (fgRed, nitchLogo), (fgBlue, archLogo), (fgRed, ubuntuLogo), @@ -20,7 +20,8 @@ func getLogo*(distroId: string): tuple = (fgRed, redhatLogo), (fgMagenta, gentooLogo), (fgMagenta, endeavourosLogo), - (fgBlue, artixLogo) + (fgBlue, artixLogo), + (fgBlue, arcoLogo) ] case distroId: @@ -69,5 +70,8 @@ func getLogo*(distroId: string): tuple = of "artix": result = coloredLogos[15] + of "arcolinux": + result = coloredLogos[16] + else: result = coloredLogos[0] diff --git a/src/nitches/getPkgs.nim b/src/nitches/getPkgs.nim index ca05971..cc4f355 100644 --- a/src/nitches/getPkgs.nim +++ b/src/nitches/getPkgs.nim @@ -41,5 +41,8 @@ proc getPkgs*(distroId: string): string = of "pop": result = getDpkgPkgs() + of "arcolinux": + result = getPacmanPkgs() + else: result = ">3"