pain and agony

This commit is contained in:
echo 2022-09-10 00:11:50 +04:30 committed by nea
parent a355dab775
commit bfee268ee4
No known key found for this signature in database
GPG key ID: AA563E93EB628D91
6 changed files with 54 additions and 22 deletions

56
main.go
View file

@ -6,14 +6,24 @@ import (
"math/rand" "math/rand"
"os" "os"
"os/exec" "os/exec"
"path/filepath"
"strconv" "strconv"
"strings" "strings"
) )
var isuwuified bool = true var isuwuified bool = true
var tempbool bool var tempbool bool
var arch = ` /\
/ \
/\ \
/ > ω <\
/ __ \
/ __| |__-\
/_-'' ''-_\
`
func cprint(input string, newline bool, uwuoverwrite bool) { func cprint(input string, newline bool, uwuoverwrite bool) {
endings := [15]string{ endings := [15]string{
"owo", "owo",
"UwU", "UwU",
@ -41,6 +51,7 @@ func cprint(input string, newline bool, uwuoverwrite bool) {
word = strings.ReplaceAll(word, "r", "w") word = strings.ReplaceAll(word, "r", "w")
word = strings.ReplaceAll(word, "i", "iy") word = strings.ReplaceAll(word, "i", "iy")
word = strings.ReplaceAll(word, "l", "w") word = strings.ReplaceAll(word, "l", "w")
if strings.HasSuffix(word, "!") { if strings.HasSuffix(word, "!") {
word = word[0:len(word)-1] + "1!11!1" word = word[0:len(word)-1] + "1!11!1"
} }
@ -59,11 +70,19 @@ func cprint(input string, newline bool, uwuoverwrite bool) {
} else { } else {
ninput = input ninput = input
} }
farch := strings.Split(arch, "\n")
check := 0
if newline == false { if newline == false {
fmt.Print(ninput) fmt.Print(ninput)
} else { } else {
fmt.Print(ninput + "\n") fmt.Print(farch[0] + ninput + "\n")
check += 1
}
if check < len(farch) {
for check < len(farch) {
print(farch[check] + "\n")
check += 1
}
} }
} }
@ -91,11 +110,12 @@ among`)
} }
declr := w[0] declr := w[0]
inf := w[1] inf := w[1]
nouwu := w[len(w)-1]
if declr == "nn-prin" { if declr == "nn-prin" {
cprint(strings.Join(w[1:], " "), false, false) cprint(strings.Join(w[1:], " "), false, nouwu == "nouwu")
} }
if declr == "prin" { if declr == "prin" {
cprint(strings.Join(w[1:], " "), true, false) cprint(strings.Join(w[1:], " "), true, nouwu == "nouwu")
} }
if declr == "nn-info" || declr == "info" { if declr == "nn-info" || declr == "info" {
if declr == "info" { if declr == "info" {
@ -104,9 +124,9 @@ among`)
tempbool = false tempbool = false
} }
if inf == "username" { if inf == "username" {
cprint(getUsername(), tempbool, false) cprint(getUsername(), tempbool, nouwu == "nouwu")
} else if inf == "hostname" { } else if inf == "hostname" {
cprint(getHostname(), tempbool, false) cprint(getHostname(), tempbool, nouwu == "nouwu")
} else if inf == "uptime" { } else if inf == "uptime" {
among, _ := strconv.Atoi(getUptime()) among, _ := strconv.Atoi(getUptime())
cprint(formatTime(among), tempbool, true) cprint(formatTime(among), tempbool, true)
@ -141,6 +161,7 @@ func getUsername() string {
return strings.Replace(string(shell), "\n", "", -1) return strings.Replace(string(shell), "\n", "", -1)
} }
func getLogo() { func getLogo() {
} }
func getDistro() string { func getDistro() string {
distro, err := os.Open("/etc/os-release") distro, err := os.Open("/etc/os-release")
@ -276,10 +297,21 @@ func getColorPalette() {
func main() { func main() {
handleArgs() handleArgs()
handleConfig() handleConfig()
ex, err := os.Executable()
//if isuwuified { if err != nil {
// fmt.Print("\n shit will be uwuified\n") panic(err)
//} else { }
// fmt.Print("shit will be NOT uwuified\n") exPath := filepath.Dir(ex)
//} fmt.Println(exPath)
/*
mem, err := os.Open("/proc/meminfo")
if err != nil {
fmt.Println(err.Error())
os.Exit(0)
}
mem_info := make([]byte, 1024)
mem.Read(mem_info)
mem.Close()
*/
} }

View file

@ -1,4 +1,4 @@
{BLUE} /\ /\
/ \ / \
/\ \ /\ \
/ > ω <\ / > ω <\

View file

@ -1,7 +1,7 @@
{BLUE} /\
/\ /\
/ \ / \
/{WHITE}O vv O{BLUE}\ / \
/O vv O\
/ / \ \ / / \ \
/ / __\ \ / / __\ \
/__/ `\___\ /__/ `\___\

View file

@ -1,4 +1,4 @@
{BLUE} /\ /\
/ \ / \
/`'.,\ /`'.,\
/• w • \ /• w • \

View file

@ -1,4 +1,4 @@
{RED} ______ ______
/ ___ \ / ___ \
| / OωO | | / OωO |
| \____- | \____-

View file

@ -1,7 +1,7 @@
{MAGENTA} /\ /\
{RED}/{MAGENTA}/ \{BLUE}\ // \\
{RED}/{MAGENTA}/>ω<\{BLUE}\ //>ω<\\
{RED}/{MAGENTA}/ \ {BLUE}\ // \ \
{RED}/ {MAGENTA}/ _) {BLUE}) / / _) )
{RED}/_{MAGENTA}/___-- {BLUE}___- /_/___-- ___-
/____--- /____---