Fixed bug where system info would be cut off if ascii was short and added cachyos ascii
This commit is contained in:
parent
c8b3f9f4a4
commit
ba67c074db
23
config/ascii/cachyos
Normal file
23
config/ascii/cachyos
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#/43;45;45;15
|
||||||
|
${C3}.${C1}-------------------------:
|
||||||
|
.${C2}+=${C1}========================.
|
||||||
|
:${C2}++${C1}===${C2}++===${C1}===============- :${C2}++${C1}-
|
||||||
|
:${C2}*++${C1}====${C2}+++++==${C1}===========- .==:
|
||||||
|
-${C2}*+++${C1}=====${C2}+***++=${C1}=========:
|
||||||
|
=${C2}*++++=${C1}=======------------:
|
||||||
|
=${C2}*+++++=${C1}====- ${C3}...${C1}
|
||||||
|
.${C2}+*+++++${C1}=-===: .${C2}=+++=${C1}:
|
||||||
|
:${C2}++++${C1}=====-==: -***${C2}**${C1}+
|
||||||
|
:${C2}++=${C1}=======-=. .=+**+${C3}.${C1}
|
||||||
|
.${C2}+${C1}==========-. ${C3}.${C1}
|
||||||
|
:${C2}+++++++${C1}====- ${C3}.${C1}--==-${C3}.${C1}
|
||||||
|
:${C2}++${C1}==========. ${C3}:${C2}+++++++${C1}${C3}:
|
||||||
|
${C1}.-===========. =*****+*+
|
||||||
|
${C1}.-===========: .+*****+:
|
||||||
|
${C1}-=======${C2}++++${C1}:::::::::::::::::::::::::-: ${C3}.${C1}---:
|
||||||
|
:======${C2}++++${C1}====${C2}+++******************=.
|
||||||
|
${C1}:=====${C2}+++${C1}==========${C2}++++++++++++++*-
|
||||||
|
${C1}.====${C2}++${C1}==============${C2}++++++++++*-
|
||||||
|
${C1}.===${C2}+${C1}==================${C2}+++++++:
|
||||||
|
${C1}.-=======================${C2}+++:
|
||||||
|
${C3}..........................
|
35
main.go
35
main.go
@ -152,20 +152,31 @@ func readConfig() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final := ""
|
final := ""
|
||||||
for lineIndex, line := range asciiSplit {
|
y := len(asciiSplit)
|
||||||
lineVisibleLength := len(strings.Split(asciiNoColor, "\n")[lineIndex])
|
if len(asciiSplit) < len(strings.Split(string(out), "\n")) {
|
||||||
lastAsciiColor := ""
|
y = len(strings.Split(string(out), "\n"))
|
||||||
if lineIndex != 0 {
|
}
|
||||||
r := regexp.MustCompile("\033[38;5;[0-9]+m")
|
for lineIndex := 0; lineIndex < y; lineIndex++ {
|
||||||
matches := r.FindAllString(asciiSplit[lineIndex-1], -1)
|
line := ""
|
||||||
if len(matches) != 0 {
|
for i := 0; i < maxWidth+5; i++ {
|
||||||
lastAsciiColor = r.FindAllString(asciiSplit[lineIndex-1], -1)[len(matches)-1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := lineVisibleLength; i < maxWidth+5; i++ {
|
|
||||||
line = line + " "
|
line = line + " "
|
||||||
}
|
}
|
||||||
asciiSplit[lineIndex] = lastAsciiColor + line
|
lastAsciiColor := ""
|
||||||
|
if lineIndex < len(asciiSplit) {
|
||||||
|
line = asciiSplit[lineIndex]
|
||||||
|
lineVisibleLength := len(strings.Split(asciiNoColor, "\n")[lineIndex])
|
||||||
|
if lineIndex != 0 {
|
||||||
|
r := regexp.MustCompile("\033[38;5;[0-9]+m")
|
||||||
|
matches := r.FindAllString(asciiSplit[lineIndex-1], -1)
|
||||||
|
if len(matches) != 0 {
|
||||||
|
lastAsciiColor = r.FindAllString(asciiSplit[lineIndex-1], -1)[len(matches)-1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := lineVisibleLength; i < maxWidth+5; i++ {
|
||||||
|
line = line + " "
|
||||||
|
}
|
||||||
|
asciiSplit[lineIndex] = lastAsciiColor + line
|
||||||
|
}
|
||||||
str := string(out)
|
str := string(out)
|
||||||
if lineIndex < len(strings.Split(str, "\n")) {
|
if lineIndex < len(strings.Split(str, "\n")) {
|
||||||
line = line + colorMap["C0"] + strings.Split(str, "\n")[lineIndex]
|
line = line + colorMap["C0"] + strings.Split(str, "\n")[lineIndex]
|
||||||
|
1
utils.go
1
utils.go
@ -267,7 +267,6 @@ func GetDEWM() string {
|
|||||||
}
|
}
|
||||||
return strings.TrimSpace(string(out))
|
return strings.TrimSpace(string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
if processExists("plasmashell") {
|
if processExists("plasmashell") {
|
||||||
return "KDE Plasma " + runCommand("plasmashell --version | awk '{print $2}'")
|
return "KDE Plasma " + runCommand("plasmashell --version | awk '{print $2}'")
|
||||||
} else if processExists("gnome-session") {
|
} else if processExists("gnome-session") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user