goimport auto syntax change
This commit is contained in:
parent
c3c3901e9a
commit
df45549558
|
@ -0,0 +1,29 @@
|
||||||
|
package shell
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
func get_terminal_color_palette() string {
|
||||||
|
// var runes rune
|
||||||
|
// color1 := "\x1b[0;29m \x1b[0m"
|
||||||
|
// runes = []rune(color1)
|
||||||
|
// view.WriteRunes(runes)
|
||||||
|
|
||||||
|
color1 := "\x1b[0;29m \x1b[0m"
|
||||||
|
color2 := "\x1b[0;31m \x1b[0m"
|
||||||
|
color3 := "\x1b[0;32m \x1b[0m"
|
||||||
|
color4 := "\x1b[0;33m \x1b[0m"
|
||||||
|
color5 := "\x1b[0;34m \x1b[0m"
|
||||||
|
color6 := "\x1b[0;35m \x1b[0m"
|
||||||
|
color7 := "\x1b[0;36m \x1b[0m"
|
||||||
|
color8 := "\x1b[0;37m \x1b[0m"
|
||||||
|
|
||||||
|
return color1 + " " + color2 + " " + color3 + " " + color4 + " " + color5 + " " + color6 + " " + color7 + " " + color8
|
||||||
|
}
|
||||||
|
|
||||||
|
// what genius figured this out?
|
||||||
|
// originally from github.com/dimasma0305/GoFetch
|
||||||
|
func TestTerminalColor() {
|
||||||
|
fmt.Println(get_terminal_color_palette())
|
||||||
|
}
|
20
xterm.go
20
xterm.go
|
@ -59,17 +59,17 @@ func Terminal() string {
|
||||||
pid := os.Getpid()
|
pid := os.Getpid()
|
||||||
_, comm := scanToParent(pid)
|
_, comm := scanToParent(pid)
|
||||||
/*
|
/*
|
||||||
ppid, err := GetPPID(pid)
|
ppid, err := GetPPID(pid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error getting PPID:", err)
|
fmt.Println("Error getting PPID:", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
comm, err := GetComm(ppid)
|
comm, err := GetComm(ppid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error getting comm:", err)
|
fmt.Println("Error getting comm:", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return comm
|
return comm
|
||||||
|
|
Loading…
Reference in New Issue