added no config settings, and like 3 letters to a string.

This commit is contained in:
echo 2022-10-04 14:05:41 +03:30
parent 55c749c131
commit 5cc0fc3652
3 changed files with 19 additions and 6 deletions

View file

@ -15,6 +15,8 @@ var Customascii = false
var asciidir string
var asciiforced = false
var forceddistro string
var Defaultconf bool = false
var Defaultcolor bool = false
func Gethn() string {
cmd := exec.Command("whoami")
@ -41,6 +43,10 @@ func Initargs() {
usepng = true
case "--nocolor":
hascolor = false
case "--noconf":
Defaultconf = true
case "--nocolorconf":
Defaultcolor = true
}
}
}

View file

@ -46,7 +46,11 @@ func Initcolor() {
os.Exit(0)
}
content, _ := os.ReadFile(colorconf)
c, _ := os.ReadFile(colorconf)
content := string(c)
if Defaultcolor {
content = "red 255 0 0 \ngreen 0 255 0\nblue 0 0 255\nwhite 255 255 255"
}
lines := strings.Split(string(content), "\n")
for _, line := range lines {
word := strings.Split(line, " ")
@ -99,14 +103,14 @@ func printLogoIfAtBeginningOfNewLine() {
}
}
func uwuify(message string) (ret string) {
func uwuify(message string) string {
sentence := strings.Split(message, " ")
ret = ""
ret := ""
for i, word := range sentence {
if !strings.Contains(strings.ToLower(word), "uwu") {
word = strings.ReplaceAll(word, "u", "UwU")
if strings.Contains(strings.ToLower(word), "owo") {
if !strings.Contains(strings.ToLower(word), "owo") {
word = strings.ReplaceAll(word, "o", "OwO")
}
word = strings.ReplaceAll(word, "r", "w")