my dotz
0

Configure Feed

Select the types of activity you want to include in your feed.

new prompt!!

+10 -8
+10 -8
bin/prompt.go
··· 3 3 import ( 4 4 "fmt" 5 5 "os" 6 + "os/exec" 6 7 "strings" 7 - "syscall" 8 - "time" 9 8 ) 10 9 11 10 func main() { ··· 16 15 if strings.HasPrefix(cwd, home) { 17 16 cwd = "~" + cwd[len(home):] 18 17 } 19 - var sysinfo syscall.Sysinfo_t 20 - syscall.Sysinfo(&sysinfo) 21 - uptime := time.Duration(sysinfo.Uptime) * time.Second 22 - fmt.Printf("\033[38;5;162m[%d:%02d:%02d] %s\033[0m ", int64(uptime.Hours()), 23 - int64(uptime.Minutes()) % 60, int64(uptime.Seconds()) % 60, 24 - host) 18 + 19 + out, err := exec.Command("git", "branch", "--show-current").Output() 20 + if err != nil { 21 + out = []byte("^(;,;)^\n") 22 + } 23 + branchname := strings.TrimSuffix(string(out), "\n") 24 + 25 + fmt.Printf("\033[38;5;162m[%s]\033[0m ", host) 26 + fmt.Printf("%s ", branchname) 25 27 26 28 parts = strings.Split(cwd, "/") 27 29 for i, part := range parts {
bin/x86_64/prompt

This is a binary file and will not be displayed.