From 084603b8a8200cbba6c78fb3155ac3ab7489a9c1 Mon Sep 17 00:00:00 2001 From: echo <91651232+exhq@users.noreply.github.com> Date: Wed, 21 Sep 2022 15:47:42 +0430 Subject: [PATCH] holy fucking shit fr another neowofetch ubdate????!?!?!?!/! i fucking love neowofetch its the best fucking anime bro frfr bruh fr --- asciiart/README | 0 asciiart/asciiart.go | 32 ++++++++++++++++++++++++++++++++ go.mod | 4 ++-- main.go | 20 ++++++++------------ subdirectory/sub.go | 5 ----- 5 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 asciiart/README create mode 100644 asciiart/asciiart.go delete mode 100644 subdirectory/sub.go diff --git a/asciiart/README b/asciiart/README new file mode 100644 index 0000000..e69de29 diff --git a/asciiart/asciiart.go b/asciiart/asciiart.go new file mode 100644 index 0000000..3b521d9 --- /dev/null +++ b/asciiart/asciiart.go @@ -0,0 +1,32 @@ +package asciiart + +import ( + "strings" +) + +func Getascii(name string) []string { + none := `!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!! +!!!!noascii!!!! +!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!! + ` + arch := ` /\ + / \ + /\ \ + / > ω <\ + / __ \ + / __| |__-\ +/_-'' ''-_\ +` + + switch name { + case "Arch Linux": + return strings.Split(arch, "\n") + + default: + return strings.Split(none, "\n") + + } + +} diff --git a/go.mod b/go.mod index 3f8bb1e..c6d47dd 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ -module color +module neowofetch go 1.19 require ( - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.13.0 github.com/mattn/go-colorable v0.1.9 // indirect github.com/mattn/go-isatty v0.0.14 // indirect golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect diff --git a/main.go b/main.go index ee77883..f89c55e 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "io/ioutil" + "neowofetch/asciiart" "os" "os/exec" "path/filepath" @@ -13,15 +14,6 @@ import ( ) var isuwuified bool = true -var arch = ` /\ - / \ - /\ \ - / > ω <\ - / __ \ - / __| |__-\ - /_-'' ''-_\ -` - var linearch []string var aa int @@ -42,7 +34,7 @@ func getConfigFile() string { } func initascii() { - linearch = strings.Split(arch, "\n") + linearch = asciiart.Getascii(getDistro()) aa = 0 print(linearch[aa]) aa = aa + 1 @@ -106,6 +98,10 @@ func handlePrint(action, colour string, rest string) { Cprint(colour, formatTime(no), false) case "hostname": Cprint(colour, getHostname(), true) + case "GPU": + Cprint(colour, getGPU(), true) + case "shell": + Cprint(colour, getShell(), true) } } if action == "infoln" { @@ -164,10 +160,10 @@ func uwuify(message string) string { for _, word := range sentence { if !strings.Contains(strings.ToLower(word), "uwu") { - word = strings.Replace(word, "u", "UwU", 1) + word = strings.Replace(word, "u", "UwU", -1) if strings.Contains(strings.ToLower(word), "owo") { - word = strings.Replace(word, "o", "OwO", 1) + word = strings.Replace(word, "o", "OwO", -1) } } diff --git a/subdirectory/sub.go b/subdirectory/sub.go deleted file mode 100644 index 9063c06..0000000 --- a/subdirectory/sub.go +++ /dev/null @@ -1,5 +0,0 @@ -package subdirectory; - - -func TestFun() { -}