diff --git a/go.mod b/go.mod index 4bfef1d..3f8bb1e 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ -module github.com/exhq/neowofetch +module color go 1.19 require ( - github.com/fatih/color v1.13.0 + github.com/fatih/color v1.13.0 // indirect 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 105c51e..ee77883 100644 --- a/main.go +++ b/main.go @@ -9,27 +9,45 @@ import ( "strconv" "strings" - "github.com/exhq/neowofetch/util" + "github.com/fatih/color" ) var isuwuified bool = true -var arch = ` /\ - / \ - /\ \ - / > Ο‰ <\ - / __ \ - / __| |__-\ - /_-'' ''-_\ +var arch = ` /\ + / \ + /\ \ + / > Ο‰ <\ + / __ \ + / __| |__-\ + /_-'' ''-_\ ` +var linearch []string +var aa int + +func inituwu() { + print("bruh") +} + func getHome() string { return os.Getenv("HOME") + +} +func incrementaa() { + aa += 1 } func getConfigFile() string { return getHome() + "/.config/neowofetch/conf" } +func initascii() { + linearch = strings.Split(arch, "\n") + aa = 0 + print(linearch[aa]) + aa = aa + 1 +} + func handleConfig() { _, folder := os.Stat(filepath.Dir(getConfigFile())) _, file := os.Stat(getConfigFile()) @@ -43,52 +61,123 @@ func handleConfig() { _, _ = f.WriteString("println neOwOfetch πŸ”₯\ninfo username\nprint @\ninfoln distro\nprint uptime: \ninfo uptime") } else { body, _ := ioutil.ReadFile(getConfigFile()) - fbody := strings.Split(string(body), "\n") - util.InitUwuPrinter() - for i, s := range fbody { - w := strings.SplitN(s, " ", 2) - - if len(w) < 2 { + sbody := (string(body)) + fbody := strings.Split(sbody, "\n") + for _, line := range fbody { + word := strings.Split(line, " ") + if len(word) < 3 { continue } - verb := w[0] - argument := w[1] - nouwu := false - if strings.HasPrefix(argument, "-uwu ") { - nouwu = true - argument = argument[5:] - } - if verb == "print" { - util.UwuPrint(argument, nouwu, fbody[i]) - } else if verb == "println" { - util.UwuPrint(argument, nouwu, fbody[i]) - util.UwuNewline() - } else if verb == "info" { - PrintInfo(argument, nouwu, fbody[i]) - } else if verb == "infoln" { - PrintInfo(argument, nouwu, fbody[i]) - util.UwuNewline() - } else { - fmt.Printf("Unknown verb %s\n", verb) - } + action := word[0] + color := word[1] + rest := strings.Join(word[2:], " ") + handlePrint(action, color, rest) } + + } + +} + +func handlePrint(action, colour string, rest string) { + if action == "print" { + Cprint(colour, rest, true) + } else if action == "println" { + Cprint(colour, rest, true) + print("\n") + if aa < len(linearch) { + print(linearch[aa]) + } + if aa == len(linearch) || aa == len(linearch)-1 { + print(strings.Repeat(" ", 18)) + } + + if aa > len(linearch) { + print(strings.Repeat(" ", 18)) + } + incrementaa() + } else if action == "info" || action == "infoln" { + switch rest { + case "distro": + Cprint(colour, getDistro(), true) + case "username": + Cprint(colour, getUsername(), true) + case "uptime": + no, _ := strconv.Atoi(getUptime()) + Cprint(colour, formatTime(no), false) + case "hostname": + Cprint(colour, getHostname(), true) + } + } + if action == "infoln" { + + print("\n") + if aa < len(linearch) { + print(linearch[aa]) + } else { + print(strings.Repeat(" ", 18)) + } + incrementaa() } } -func PrintInfo(infoType string, noUwuOverride bool, whole string) { - if infoType == "username" { - util.UwuPrint(getUsername(), noUwuOverride, whole) - } else if infoType == "hostname" { - util.UwuPrint(getHostname(), noUwuOverride, whole) - } else if infoType == "uptime" { - among, _ := strconv.Atoi(getUptime()) - util.UwuPrint(formatTime(among), true, whole) - } else if infoType == "distro" { - util.UwuPrint(getDistro(), noUwuOverride, whole) - } else if infoType == "terminal" { - util.UwuPrint(getTerminal(), noUwuOverride, whole) +func Cprint(colour string, message string, uwu bool) { + nouwu := len(os.Args) == 2 && os.Args[1] == "-nouwu" + + if uwu && !nouwu { + message = uwuify(message) + } + yellow := color.New(color.FgYellow).SprintFunc() + red := color.New(color.FgRed).SprintFunc() + green := color.New(color.FgGreen).SprintFunc() + magenta := color.New(color.FgMagenta).SprintFunc() + blue := color.New(color.FgBlue).SprintFunc() + black := color.New(color.FgBlack).SprintFunc() + switch colour { + case "yellow": + print(yellow(message)) + case "white": + print(message) + case "magenta": + print(magenta(message)) + case "red": + print(red(message)) + case "blue": + print(blue(message)) + case "black": + print(black(message)) + case "green": + print(green(message)) + } +} + +func uwuify(message string) string { + var answer string + var sentence []string + var hasspace bool + if strings.Contains(message, " ") { + sentence = strings.Split(message, " ") + hasspace = true + } else { + sentence = strings.Split(message, " ") + hasspace = false } + for _, word := range sentence { + if !strings.Contains(strings.ToLower(word), "uwu") { + word = strings.Replace(word, "u", "UwU", 1) + + if strings.Contains(strings.ToLower(word), "owo") { + word = strings.Replace(word, "o", "OwO", 1) + } + + } + if hasspace { + answer += word + " " + } else { + answer += word + } + } + return answer } func handleArgs() { @@ -237,6 +326,16 @@ func getMemory(used bool) string { } } +func handleremainingascii() { + if aa < len(linearch) { + for i := 0; i < len(linearch)-aa; i++ { + print("\n", linearch[aa]) + incrementaa() + + } + } +} + func formatTime(seconds int) string { minutes := seconds / 60 secondsre := strconv.Itoa(seconds % 60) @@ -249,7 +348,9 @@ func getColorPalette() { } func main() { + initascii() handleArgs() handleConfig() - util.UwuPrintRest() + handleremainingascii() + print("\n") } diff --git a/res/COPYRIGHT.md b/res/COPYRIGHT.md deleted file mode 100644 index fd4dd90..0000000 --- a/res/COPYRIGHT.md +++ /dev/null @@ -1,440 +0,0 @@ -# Introduction - -Int this directory, all the logo images, are stored. - -This file contains all copyright info for every image that `uwufetch` uses. If you want to remove _your_ image from this repository contact me on [reddit](https://www.reddit.com/user/TheDarkBug). -I am not a copyright expert, and maybe I am doing all wrong things, please correct this file if you notice something wrong. - -# Copyrights - -## AmogOS - -image - -### Base artwork: - -- Copyright Holder: mobilegmYT -- License: [No license](https://github.com/TheDarkBug/uwufetch/pull/152#issuecomment-951941364) - -# - -## Arch Linux - -image - -### Base artwork: - -- Copyright Holder: Arch Linux Devs -- License: [Arch Linux TrademarkPolicy](https://archlinux.org/art/) -- [Reference](https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Ishaan_P](https://www.reddit.com/user/Ishaan_P) -- License: No license, just a reddit post -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxfg9j/someone_posted_uwuntu_so_i_made_nyarch/) - -# - -## Arco Linux - -image - -### Base artwork: - -- Copyright Holder: Erik Dubois -- License: [GPL-v3.0 (probably)](https://www.gnu.org/licenses/gpl-3.0.en.html) -- There is no reference I could find lol - -### Modifications - -- Description: uwu style -- Copyright Holder: [plat_](https://github.com/platyple) -- License: [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -- This was made specifically for this repo - -# - -## Artix - -image - -### Base artwork: - -- Copyright Holder: Artix Linux Devs -- License: [Artix Brand Book](https://gitea.artixlinux.org/artix/artwork/src/branch/master/README.md) -- [Reference](https://gitea.artixlinux.org/artix/artwork) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/exxxxkc](https://www.reddit.com/user/exxxxkc) -- License: [DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE](https://www.reddit.com/r/linuxmasterrace/comments/ly6wd1/nyartix/gpxdwc2/?context=3) 2021-08-22 -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/ly6wd1/nyartix/) - -# - -## Debian - -image - -### Base artwork: - -- Copyright Holder: Debian Devs -- License: LGPL3 -- [License URL](https://www.gnu.org/licenses/lgpl-3.0.html) -- [Reference](https://www.debian.org/logos/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Ishaan_P](https://www.reddit.com/user/Ishaan_P) -- License: [LGPL3](https://www.gnu.org/licenses/lgpl-3.0.html) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxqip4/debinyan/) - -# - -## Endeavour OS - -image - -### Base artwork: - -- Copyright Holder: Endeavour OS Devs -- License: [No license was mentioned on the website](https://endeavouros.com/endeavouros-logo/) -- [Reference](https://endeavouros.com/endeavouros-logo/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/zuru2003](https://www.reddit.com/user/zuru2003) -- License: No license, just a reddit post -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/ly9zed/endowo_os/) - -# - -## Fedora - -image - -### Base artwork: - -- Copyright Holder: -- License: [Fedora logo usage guide-lines](https://fedoraproject.org/wiki/Logo/UsageGuidelines) -- [Reference](https://fedoraproject.org/wiki/Logo) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/iD3nis124](https://www.reddit.com/user/iD3nis124) -- License: [Fedora logo usage guide-lines (I guess)](https://fedoraproject.org/wiki/Logo/UsageGuidelines) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxjp3s/saw_nyarch_and_had_to_do_fedowa/) - -# - -## Gentoo - -image - -### Base artwork: - -- Copyright Holder: Gentoo Devs -- License: [Gentoo name and logo guide-lines](https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html) -- [Reference](https://www.gentoo.org/inside-gentoo/artwork/gentoo-logo.html) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/TheSatisfiedPig](https://www.reddit.com/user/TheSatisfiedPig) -- License: [CC-BY-SA/2.5](https://creativecommons.org/licenses/by-sa/2.5/) -- [Reference (reddit)](https://www.reddit.com/r/linuxmasterrace/comments/m11aml/genchu/) -- [Reference (gentoo artwork)](https://wiki.gentoo.org/wiki/Project:Artwork/Artwork#Genchu) - -# - -## GNU - -image - -### Base artwork: - -- Copyright Holder: Aurelio A. Heckert (aurium@gmail.com) -- License: [CC BY-SA 2.0](https://creativecommons.org/licenses/by-sa/2.0/) -- [Reference](https://www.gnu.org/graphics/heckert_gnu.svg) - -### Modifications - -- Description: Addition of ahegao facial expression, and colorization. -- Copyright Holder: [u/FOSSphorous](https://www.reddit.com/user/FOSSphorous/) -- License: [CC BY-SA 2.0](https://creativecommons.org/licenses/by-sa/2.0/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lyi8ce/its_actually_gnuwulinux/) - -## Manjaro - -image - -### Base artwork: - -- Copyright Holder: Manjaro GmbH & Co. KG. -- License: [Manjaro terms of use](https://manjaro.org/terms-of-use/) -- [Reference](https://gitlab.manjaro.org/artwork) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/matrixrunner](https://www.reddit.com/user/matrixrunner) -- License: [Manjaro terms of use (I guess, again)](https://manjaro.org/terms-of-use/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxx9h7/myanjawo_also_in_wallpaper/) - -# - -## Linux Mint - -image - -### Base artwork: - -- Copyright Holder: Linux mint Devs -- License: [None (I think)](https://linuxmint.com/faq.php) -- [Reference](https://linuxmint.com/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/iD3nis124](https://www.reddit.com/user/iD3nis124) -- License: None -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/ly8oy0/seen_a_lot_of_people_asking_for_mint_so_here_it_is/) - -# - -## KDE neon - -image - -### Base artwork: - -- Copyright Holder: Jens (kde team) -- License: None -- [Reference](https://community.kde.org/Neon#Logo) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/muff2](https://www.reddit.com/user/muff2) -- License: None -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxt82v/kde_uwon/) - -# - -## NixOS (Nix Snowflake) - -image - -### Base artwork: - -- Copyright Holder: Tim Cuthbertson (@timbertson) -- License: [CC-BY license](https://creativecommons.org/licenses/by/4.0/) -- [Reference](https://github.com/NixOS/nixos-artwork/tree/master/logo#nixos-logo) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/ant-artica](https://www.reddit.com/user/ant-artica) -- License: [CC-BY license](https://creativecommons.org/licenses/by/4.0/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lzdwl4/nixowos/) - -# - -## OpenSuse - -image - -### Base artwork: - -- Copyright Holder: OpenSuse Devs -- License: [Opensuse Trademark guide-lines](https://news.opensuse.org/2009/03/02/opensuse-trademark-guidelines-released/) -- [Reference](https://en.opensuse.org/openSUSE:Artwork_brand#Buttons) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/VortexAcherontic](https://www.reddit.com/user/VortexAcherontic) -- License: [OpenSuse Trademark guide-lines](https://news.opensuse.org/2009/03/02/opensuse-trademark-guidelines-released/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lyhgxp/my_better_attempt_on_owosuse/) - -# - -## PopOS - -image - -### Base artwork: - -- Copyright Holder: System76 -- License: [System76 Terms](https://system76.com/terms) -- [Reference](https://pop.system76.com/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Mochimo786](https://www.reddit.com/user/Mochimo786) -- License: [System76 Terms](https://system76.com/terms) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxz3xu/pop_uwus/) - -# - -## Slackware - -image - -### Base artwork: - -- Copyright Holder: Slackware Devs -- License: [Slackware Propaganda Graphics FAQ](http://www.slackware.com/~msimons/slackware/grfx/grfxfaq.txt) -- [Reference](http://www.slackware.com/~msimons/slackware/grfx/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/theldus](https://www.reddit.com/user/theldus) -- License: [Slackware Propaganda Graphics FAQ](http://www.slackware.com/~msimons/slackware/grfx/grfxfaq.txt) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lyt6xi/slawckyware/) - -# - -## Solus - -image - -### Base artwork: - -- Copyright Holder: Solus Devs -- License: [Solus brand copyright](https://getsol.us/branding/) -- [Reference](https://getsol.us/home/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/welpelp](https://www.reddit.com/user/welpelp) -- License: [Solus brand copyright](https://getsol.us/branding/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/ly9il3/continuing_the_trend_i_made_sowus_my_first/) - -# - -## Tux - -image - -### Base artwork: - -- Copyright Holder: Linux foundation -- License: [Who knows](https://web.archive.org/web/20040401161253/http://www.linux.org/info/logos.html) -- [Reference](https://www.linux.org/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Annual-Examination96](https://www.reddit.com/user/Annual-Examination96) -- License: [Who knows](https://web.archive.org/web/20040401161253/http://www.linux.org/info/logos.html) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lz2i32/tuwu/) - -# - -## Ubuntu - -image - -### Base artwork: - -- Copyright Holder: Canonical Ltd -- License: [Canonical Ltd Trademarks](https://ubuntu.com/legal/trademarks) -- [Reference](https://design.ubuntu.com/brand/ubuntu-logo/#:~:text=The%20Ubuntu%20logo%20is%20made,a%20flat%20orange%2Dcoloured%20background.) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Chicki2D](https://www.reddit.com/user/Chicki2D) -- License: [Canonical Ltd Trademarks](https://ubuntu.com/legal/trademarks) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lwsnul/uwuntu/) - -# - -## VoidLinux - -image - -### Base artwork: - -- Copyright Holder: VoidLinux Contributors -- License: None -- [Reference](https://voidlinux.org/) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/Satoqz](https://www.reddit.com/user/Satoqz) -- License: None -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lxnjwd/my_boyfriend_decided_to_create_owoid/) - -# - -## Android - -image - -Android at the end because it could be not considered as an actual distribution of gnu/linux - -### Base artwork: - -- Copyright Holder: Google Inc. -- License: [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) -- [Reference](https://developer.android.com/distribute/marketing-tools/brand-guidelines#android_robot) - -### Modifications - -- Description: uwu style -- Copyright Holder: [u/6b86b3ac03c167320d93](https://www.reddit.com/user/6b86b3ac03c167320d93) -- License: [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) -- [Reference](https://www.reddit.com/r/linuxmasterrace/comments/lye15q/im_not_an_artist_but_heres_my_attempt_at_making/) - -# - -## OpenBSD - -image - -The OpenBSD project produces a FREE, multi-platform 4.4BSD-based UNIX-like operating system. - -### Base artwork: - -- Copyright Holder: The OpenBSD Foundation -- License: [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) -- [Reference](https://www.openbsd.org/art4.html) - -### Modifications - -- Description: uwu style -- Copyright Holder: [δΈ€η©‚ 灯花](mailto:zh-openbsd@protonmail.com) -- License: [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) -- [Reference](https://t.me/openbsd_zh/454) - - - diff --git a/res/amogos.png b/res/amogos.png deleted file mode 100644 index cdd1d03..0000000 Binary files a/res/amogos.png and /dev/null differ diff --git a/res/android.png b/res/android.png deleted file mode 100644 index bf755be..0000000 Binary files a/res/android.png and /dev/null differ diff --git a/res/arch.png b/res/arch.png deleted file mode 100644 index 01fc39d..0000000 Binary files a/res/arch.png and /dev/null differ diff --git a/res/arcolinux.png b/res/arcolinux.png deleted file mode 100644 index 8329276..0000000 Binary files a/res/arcolinux.png and /dev/null differ diff --git a/res/artix.png b/res/artix.png deleted file mode 100644 index 93b15f9..0000000 Binary files a/res/artix.png and /dev/null differ diff --git a/res/ascii/alpine.txt b/res/ascii/alpine.txt deleted file mode 100644 index 41409b6..0000000 --- a/res/ascii/alpine.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {BLUE}. .___. - / \/ \ / - /OΟ‰O\Ι›U\/ __ - / \ \__/ \ -/ \ \ - - diff --git a/res/ascii/amogos.txt b/res/ascii/amogos.txt deleted file mode 100644 index df0a5cb..0000000 --- a/res/ascii/amogos.txt +++ /dev/null @@ -1,10 +0,0 @@ - β–„β–„β–„β–„β–„β–„β–„ - β–ˆ β–„β–„β–„β–„β–„ β–ˆ - ▐ β–ˆβ–„β–„β–„β–ˆ β–ˆ - β–Œ ▐ - ▐ ▐ - β–ˆ ▐ - ▐ β–β–€β–€β–€β–€β–ˆ ▐ -▐▀▀▀ ▐ ▐ ▐ - β–€β–€β–€β–€β–€β–€ β–ˆβ–€β–€β–€ β–ˆ - β–€β–€β–€β–€β–€β–€ diff --git a/res/ascii/android.txt b/res/ascii/android.txt deleted file mode 100644 index 6045cfc..0000000 --- a/res/ascii/android.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {GREEN}\ _------_ / - / \ - | {RED}~ {GREEN}> Ο‰ < {RED}~ {GREEN}| - ------------ - - - diff --git a/res/ascii/arch.txt b/res/ascii/arch.txt deleted file mode 100644 index b8de065..0000000 --- a/res/ascii/arch.txt +++ /dev/null @@ -1,8 +0,0 @@ - /\ - / \ - /\ \ - / > Ο‰ <\ - / __ \ - / __| |__-\ - /_-'' ''-_\ - diff --git a/res/ascii/arcolinux.txt b/res/ascii/arcolinux.txt deleted file mode 100644 index 8907375..0000000 --- a/res/ascii/arcolinux.txt +++ /dev/null @@ -1,7 +0,0 @@ - /\ - / \ - / \ - /O vv O\ - / / \ \ - / / __\ \ - /__/ `\___\ \ No newline at end of file diff --git a/res/ascii/artix.txt b/res/ascii/artix.txt deleted file mode 100644 index 27785be..0000000 --- a/res/ascii/artix.txt +++ /dev/null @@ -1,8 +0,0 @@ - /\ - / \ - /`'.,\ - /β€’ w β€’ \ - / ,`\ - / ,.'`. \ - /.,'` `'.\ - \ No newline at end of file diff --git a/res/ascii/debian.txt b/res/ascii/debian.txt deleted file mode 100644 index b3f053d..0000000 --- a/res/ascii/debian.txt +++ /dev/null @@ -1,8 +0,0 @@ - ______ - / ___ \ - | / OΟ‰O | - | \____- - -_ - --_\ - - \ No newline at end of file diff --git a/res/ascii/endeavouros.txt b/res/ascii/endeavouros.txt deleted file mode 100644 index 6fd4e5c..0000000 --- a/res/ascii/endeavouros.txt +++ /dev/null @@ -1,7 +0,0 @@ - /\ - // \\ - //>Ο‰<\\ - // \ \ - / / _) ) - /_/___-- ___- - /____--- diff --git a/res/ascii/fedora.txt b/res/ascii/fedora.txt deleted file mode 100644 index f38e0e2..0000000 --- a/res/ascii/fedora.txt +++ /dev/null @@ -1,8 +0,0 @@ - {BLUE}_____ - / __){CYAN}\ - {WHITE}> {BLUE}| / {WHITE}<{CYAN}\ \ - __{BLUE}_| {CYAN}Ο‰{BLUE}|_{CYAN}_/ / - / {BLUE}(_ _){CYAN}_/ - / / {BLUE}| | - {CYAN}\ \{BLUE}__/ | - {CYAN}\{BLUE}(_____/ diff --git a/res/ascii/freebsd.txt b/res/ascii/freebsd.txt deleted file mode 100644 index 3b44a43..0000000 --- a/res/ascii/freebsd.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {RED}/\,-'''''-,/\ - \_) (_/ - | \ / | - | O Ο‰ O | - ; ; - '-_____-' - diff --git a/res/ascii/gentoo.txt b/res/ascii/gentoo.txt deleted file mode 100644 index 7924ef4..0000000 --- a/res/ascii/gentoo.txt +++ /dev/null @@ -1,8 +0,0 @@ - {MAGENTA}_-----_ - ( \\ - \\ OΟ‰O \\ -{WHITE} \\ ) - / _/ - ( _- - \\____- - diff --git a/res/ascii/gnu.txt b/res/ascii/gnu.txt deleted file mode 100644 index eea2a71..0000000 --- a/res/ascii/gnu.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - {WHITE},= {YELLOW},-_-. {WHITE}=. - ((_/{YELLOW}){WHITE}U U{YELLOW}({WHITE}\_)) - `-'{YELLOW}(. .){WHITE}`-' - {YELLOW}\{WHITE}w{YELLOW}/ - Β― - diff --git a/res/ascii/guix.txt b/res/ascii/guix.txt deleted file mode 100644 index eea2a71..0000000 --- a/res/ascii/guix.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - {WHITE},= {YELLOW},-_-. {WHITE}=. - ((_/{YELLOW}){WHITE}U U{YELLOW}({WHITE}\_)) - `-'{YELLOW}(. .){WHITE}`-' - {YELLOW}\{WHITE}w{YELLOW}/ - Β― - diff --git a/res/ascii/ios.txt b/res/ascii/ios.txt deleted file mode 100644 index 552873e..0000000 --- a/res/ascii/ios.txt +++ /dev/null @@ -1,8 +0,0 @@ - {GREEN} .:` - .--``--. -{YELLOW} ww OΟ‰O w -{RED} w w -{PINK} w w - -{BLUE} www_-_www - diff --git a/res/ascii/linuxmint.txt b/res/ascii/linuxmint.txt deleted file mode 100644 index 7c26c13..0000000 --- a/res/ascii/linuxmint.txt +++ /dev/null @@ -1,7 +0,0 @@ -{GREEN} __/\____/\. - |{WHITE}.--. {GREEN}| - {WHITE}, {GREEN}Β―| {WHITE}| UΟ‰U| {GREEN}| - {WHITE}|| {GREEN}| {WHITE}| | {GREEN}| - {WHITE} | {GREEN}| {WHITE}---- {GREEN}| - {WHITE} --{GREEN}'--------' - diff --git a/res/ascii/macos.txt b/res/ascii/macos.txt deleted file mode 100644 index d8e1308..0000000 --- a/res/ascii/macos.txt +++ /dev/null @@ -1,8 +0,0 @@ - {GREEN} .:` - .--``--. -{YELLOW} ww OΟ‰O w -{RED} w w -{PINK} w w -{MAGENTA} w w -{BLUE} www_-_www - diff --git a/res/ascii/manjaro-arm.txt b/res/ascii/manjaro-arm.txt deleted file mode 100644 index a6c34cf..0000000 --- a/res/ascii/manjaro-arm.txt +++ /dev/null @@ -1,8 +0,0 @@ - β–³ β–³ β— β— β— β—  - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL}{BACKGROUND_GREEN}{BLACK} > Ο‰ < {NORMAL}{BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} diff --git a/res/ascii/manjaro.txt b/res/ascii/manjaro.txt deleted file mode 100644 index a6c34cf..0000000 --- a/res/ascii/manjaro.txt +++ /dev/null @@ -1,8 +0,0 @@ - β–³ β–³ β— β— β— β—  - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL}{BACKGROUND_GREEN}{BLACK} > Ο‰ < {NORMAL}{BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} - {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} diff --git a/res/ascii/openbsd.txt b/res/ascii/openbsd.txt deleted file mode 100644 index 0aaf295..0000000 --- a/res/ascii/openbsd.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {YELLOW} ______ - \- -/ {RED}β™₯ -{YELLOW}\_/ \ -| {WHITE}> < {YELLOW}| -|_ < {LPINK}// {WHITE}Ο‰ {LPINK}// -{YELLOW}/ \ / - /-________-\ diff --git a/res/ascii/opensuse-leap.txt b/res/ascii/opensuse-leap.txt deleted file mode 100644 index 57bf9bf..0000000 --- a/res/ascii/opensuse-leap.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - {GREEN}|\----/| - _ / {WHITE}O O{GREEN}\ - __. Ο‰ / - '----' - - diff --git a/res/ascii/opensuse-tumbleweed.txt b/res/ascii/opensuse-tumbleweed.txt deleted file mode 100644 index 57bf9bf..0000000 --- a/res/ascii/opensuse-tumbleweed.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - {GREEN}|\----/| - _ / {WHITE}O O{GREEN}\ - __. Ο‰ / - '----' - - diff --git a/res/ascii/pop.txt b/res/ascii/pop.txt deleted file mode 100644 index fef44af..0000000 --- a/res/ascii/pop.txt +++ /dev/null @@ -1,7 +0,0 @@ -{BLUE} |\.-----./| - |/ \| - | > < | - | {LPINK}~ {WHITE}P! {LPINK}~ {BLUE}| -_ ---\ Ο‰ / - \_/ '-----' - diff --git a/res/ascii/raspbian.txt b/res/ascii/raspbian.txt deleted file mode 100644 index 2bec710..0000000 --- a/res/ascii/raspbian.txt +++ /dev/null @@ -1,7 +0,0 @@ -{GREEN} __ __ - (_\)(/_) - {RED}(>(__)<) - (_(_)(_)_) - (_(__)_) - (__) - diff --git a/res/ascii/slackware.txt b/res/ascii/slackware.txt deleted file mode 100644 index 78cd4f5..0000000 --- a/res/ascii/slackware.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {MAGENTA}|\.-----./| - |/ \| - | > < | - | {LPINK}~ {WHITE}S {LPINK}~ {MAGENTA}| -_ ---\ Ο‰ / - \_/ '-----' - diff --git a/res/ascii/solus.txt b/res/ascii/solus.txt deleted file mode 100644 index 8f6b540..0000000 --- a/res/ascii/solus.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {WHITE}|\.-----./| - | \ / | - |/ > <\ | - |{BLUE}_{LPINK}~{BLUE}_____{LPINK}~{WHITE}\| -{BLUE}_ ---\ {WHITE}Ο‰ {BLUE}/ - \_/ '-----' - diff --git a/res/ascii/ubuntu.txt b/res/ascii/ubuntu.txt deleted file mode 100644 index 7ed4cb8..0000000 --- a/res/ascii/ubuntu.txt +++ /dev/null @@ -1,7 +0,0 @@ -{LPINK} _ - {PINK}β—£{LPINK}__(_){PINK}β—’{LPINK} - _/ --- \ - (_) |>Ο‰<| | - \ --- _/ - {PINK}C__/{LPINK}---(_) - diff --git a/res/ascii/unknown.txt b/res/ascii/unknown.txt deleted file mode 100644 index 6c2e5d6..0000000 --- a/res/ascii/unknown.txt +++ /dev/null @@ -1,7 +0,0 @@ -{WHITE} ._.--._. - \|>{YELLOW}_{WHITE}< |/ - |{YELLOW}:_/{WHITE} | - // \ \ ? - (| | ) / - {YELLOW}/'\_ _/`\{WHITE}- - {YELLOW}\___)=(___/ diff --git a/res/ascii/void.txt b/res/ascii/void.txt deleted file mode 100644 index 56e7b7c..0000000 --- a/res/ascii/void.txt +++ /dev/null @@ -1,8 +0,0 @@ - - {GREEN} |\_____/| - _\____ | - | \ \ | - | | {WHITE}ÒωÓ {GREEN}| | , - | \_____\_|-, | - -_______\ \_/ - diff --git a/res/ascii/windows.txt b/res/ascii/windows.txt deleted file mode 100644 index 9b01570..0000000 --- a/res/ascii/windows.txt +++ /dev/null @@ -1,9 +0,0 @@ -{RED}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{GREEN}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK} -{RED}{BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK} {GREEN}{BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK} {BLOCK_VERTICAL} -{RED}{BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK} {GREEN}{BLOCK_VERTICAL} {BLOCK}{BLOCK_VERTICAL} {BLOCK_VERTICAL} -{RED}{BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL} {GREEN}{BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK} {BLOCK_VERTICAL} -{RED}{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{GREEN}{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL} -{BLUE}{BLOCK_VERTICAL} {YELLOW} {BLOCK_VERTICAL} {BLOCK_VERTICAL} -{BLUE}{BLOCK_VERTICAL} {BLOCK} {YELLOW} {BLOCK} {BLOCK} {BLOCK_VERTICAL} -{BLUE}{BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK}{YELLOW}{BLOCK_VERTICAL}{BLOCK}{BLOCK_VERTICAL} {BLOCK_VERTICAL} -{BLUE}{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{YELLOW}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL} diff --git a/res/ascii/windows.txt.old b/res/ascii/windows.txt.old deleted file mode 100644 index 8781ffe..0000000 --- a/res/ascii/windows.txt.old +++ /dev/null @@ -1,9 +0,0 @@ -{BLUE}MMMMMMM MMMMMMM -M ^ M M ^ M -M M M M -MMMMMMM MMMMMMM - -MMMMMMM MMMMMMM -M W W W M -M WW WW M -MMMMMMM MMMMMMM diff --git a/res/ascii/windows_sum.txt b/res/ascii/windows_sum.txt deleted file mode 100644 index 7964bb5..0000000 --- a/res/ascii/windows_sum.txt +++ /dev/null @@ -1,9 +0,0 @@ -{SPRING_GREEN}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK} -{BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK} {BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK} {BLOCK_VERTICAL} -{BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK} {BLOCK_VERTICAL} {BLOCK}{BLOCK_VERTICAL} {BLOCK_VERTICAL} -{BLOCK_VERTICAL} {BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL}{BLOCK} {BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK} {BLOCK_VERTICAL} -{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL} -{BLOCK_VERTICAL} {BLOCK_VERTICAL} {BLOCK_VERTICAL} -{BLOCK_VERTICAL} {BLOCK} {BLOCK} {BLOCK} {BLOCK_VERTICAL} -{BLOCK_VERTICAL} {BLOCK_VERTICAL}{BLOCK}{BLOCK_VERTICAL}{BLOCK}{BLOCK_VERTICAL} {BLOCK_VERTICAL} -{BLOCK_VERTICAL}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK}{BLOCK_VERTICAL} diff --git a/res/ascii/xerolinux.txt b/res/ascii/xerolinux.txt deleted file mode 100644 index b309046..0000000 --- a/res/ascii/xerolinux.txt +++ /dev/null @@ -1,8 +0,0 @@ -{BLUE} /\ -______ / \______ - /\ /\ - / || \ -____/__/__\__\___ - / __| |__-\ - /_-'' ''-_\ - diff --git a/res/debian.png b/res/debian.png deleted file mode 100644 index 3c36abe..0000000 Binary files a/res/debian.png and /dev/null differ diff --git a/res/endeavouros.png b/res/endeavouros.png deleted file mode 100644 index 66a2b65..0000000 Binary files a/res/endeavouros.png and /dev/null differ diff --git a/res/fedora.png b/res/fedora.png deleted file mode 100644 index e891101..0000000 Binary files a/res/fedora.png and /dev/null differ diff --git a/res/gentoo.png b/res/gentoo.png deleted file mode 100644 index 6ab813f..0000000 Binary files a/res/gentoo.png and /dev/null differ diff --git a/res/guix.png b/res/guix.png deleted file mode 100644 index c9cff37..0000000 Binary files a/res/guix.png and /dev/null differ diff --git a/res/linuxmint.png b/res/linuxmint.png deleted file mode 100644 index 5107264..0000000 Binary files a/res/linuxmint.png and /dev/null differ diff --git a/res/manjaro-arm.png b/res/manjaro-arm.png deleted file mode 100644 index eba25be..0000000 Binary files a/res/manjaro-arm.png and /dev/null differ diff --git a/res/manjaro.png b/res/manjaro.png deleted file mode 100644 index 1ae41a8..0000000 Binary files a/res/manjaro.png and /dev/null differ diff --git a/res/neon.png b/res/neon.png deleted file mode 100644 index 16ffedd..0000000 Binary files a/res/neon.png and /dev/null differ diff --git a/res/nixos.png b/res/nixos.png deleted file mode 100644 index e0eca1a..0000000 Binary files a/res/nixos.png and /dev/null differ diff --git a/res/openbsd-zh.jpg b/res/openbsd-zh.jpg deleted file mode 100644 index d09515c..0000000 Binary files a/res/openbsd-zh.jpg and /dev/null differ diff --git a/res/opensuse-leap.png b/res/opensuse-leap.png deleted file mode 100644 index 8f511e8..0000000 Binary files a/res/opensuse-leap.png and /dev/null differ diff --git a/res/pop.png b/res/pop.png deleted file mode 100644 index 4e6128c..0000000 Binary files a/res/pop.png and /dev/null differ diff --git a/res/slackware.png b/res/slackware.png deleted file mode 100644 index be084dd..0000000 Binary files a/res/slackware.png and /dev/null differ diff --git a/res/solus.png b/res/solus.png deleted file mode 100644 index cfef1f4..0000000 Binary files a/res/solus.png and /dev/null differ diff --git a/res/ubuntu.png b/res/ubuntu.png deleted file mode 100644 index 328cbc8..0000000 Binary files a/res/ubuntu.png and /dev/null differ diff --git a/res/unknown.png b/res/unknown.png deleted file mode 100644 index 17c35a9..0000000 Binary files a/res/unknown.png and /dev/null differ diff --git a/res/void.png b/res/void.png deleted file mode 100644 index 5d17210..0000000 Binary files a/res/void.png and /dev/null differ diff --git a/util/printing.go b/util/printing.go deleted file mode 100644 index 888032f..0000000 --- a/util/printing.go +++ /dev/null @@ -1,131 +0,0 @@ -package util - -import ( - "fmt" - "math/rand" - "os" - "strings" - //"github.com/fatih/color" -) - -var uwuEmotes = [15]string{ - "owo", - "UwU", - ">w<", - "^w^", - "●w●", - "β˜†wβ˜†", - "π—¨π˜„π—¨", - "(Β΄κ’³`)", - "β™₯(。U Ο‰ U。)", - "(˘Ρ˘)", - "( Λ˜α΄—Λ˜ )", - "(*ΰΈ…ΜΛ˜ΰΈ…Μ€*)", - "*screams*", - "*twerks*", - "*sweats*", -} - -var logoIndex = 0 -var isInProgressLine = false -var logo = ` /\ - / \ - /\ \ - / > Ο‰ <\ - / __ \ - / __| |__-\ - /_-'' ''-_\ -` -var logoLines []string -var logoWidth int -var shouldUwuify = true - -func InitUwuPrinter() { - logoLines = strings.Split(logo, "\n") - logoWidth = 0 - for _, v := range logoLines { - lineLength := len([]rune(v)) - if lineLength > logoWidth { - logoWidth = lineLength - } - } -} - -func initLine() { - if !isInProgressLine { - isInProgressLine = true - if logoIndex < len(logoLines) { - logoLine := logoLines[logoIndex] - logoLineLength := len([]rune(logoLine)) - padding := strings.Repeat(" ", logoWidth-logoLineLength) - print(logoLine, padding) - logoIndex += 1 - } else { - print(strings.Repeat(" ", logoWidth)) - } - } -} - -func UwuPrint(message string, noUwuOverride bool, whole string) { - //will add color eventually, my brain hurts - var hadAnyContent bool - var wholeword string - var checkspaces int - isuwu := true - initLine() - if noUwuOverride || !shouldUwuify || (len(os.Args) > 1 && os.Args[1] == "nouwu") { - isuwu = false - wholeword = message - } - notuwuified := "" - if isuwu { - words := strings.Split(message, " ") - hadAnyContent = false - for _, word := range words { - notuwuified += word - if word == "" { - checkspaces += 1 - continue - } - word = strings.ReplaceAll(word, "r", "w") - word = strings.ReplaceAll(word, "i", "iy") - word = strings.ReplaceAll(word, "iyy", "iy") - word = strings.ReplaceAll(word, "l", "w") - - if strings.HasSuffix(word, "!") { - word = word[:len(word)-1] + "1!11!1" - } - - if strings.Contains(word, "u") && - !strings.Contains(word, "uwu") && - !strings.Contains(word, "owo") { - word = strings.ReplaceAll(word, "u", "uwu") - } - hadAnyContent = true - wholeword += word - } - } - - if hadAnyContent && rand.Intn(5) == 0 { - print(uwuEmotes[rand.Intn(len(uwuEmotes))] + " ") - } - wholeword = wholeword + strings.Repeat(" ", checkspaces) - - handlecolor(wholeword) -} - -func handlecolor(wholeword string) { - print(wholeword) -} - -func UwuNewline() { - initLine() - isInProgressLine = false - fmt.Println() -} - -func UwuPrintRest() { - for logoIndex < len(logoLines) { - UwuNewline() - } -}