Insert kernel version
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/mima/trunk@19 d2428f92-30f9-164c-8098-19ee57ce342c
This commit is contained in:
parent
38b646e185
commit
49ff715568
@ -1,6 +1,6 @@
|
||||
# mima
|
||||
My own `neofetch` clone written from scratch in Go.
|
||||
It just does what it's supposed to do, without any fancy graphics.
|
||||
It just does what it's supposed to do, without any fancy graphics (though I do intend in printing a Mima ASCII art alongside the content once I figure out how).
|
||||
|
||||
```shell
|
||||
yakumo_izuru @ mizuki-reborn
|
||||
|
@ -1,7 +1,6 @@
|
||||
// $TheSupernovaDuo: mima,v 2023.05.12 2023/5/12 12:4:43 yakumo_izuru Exp $
|
||||
// $TheSupernovaDuo: mima,v 2024.01.14 2023/01/14 21:12:35 yakumo_izuru Exp $
|
||||
//
|
||||
// Get current system information like neofetch(1) without fancy things.
|
||||
// It mostly uses the standard library, and two extra external dependencies.
|
||||
package main
|
||||
|
||||
import (
|
||||
@ -25,6 +24,8 @@ func main() {
|
||||
free_mem := v.Free / 1024 / 1024
|
||||
total_mem := v.Total / 1024 / 1024
|
||||
|
||||
kernelversion, err := host.KernelVersion()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -33,6 +34,7 @@ func main() {
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf("Editor:\t%s\n", os.Getenv("EDITOR"))
|
||||
fmt.Printf("System:\t%s\n", runtime.GOOS)
|
||||
fmt.Printf("Kernel:\t%s\n", kernelversion)
|
||||
fmt.Printf("Architecture:\t%s\n", runtime.GOARCH)
|
||||
fmt.Printf("RAM:\t%vM/%vM (%f%%)\n", free_mem, total_mem, v.UsedPercent)
|
||||
fmt.Printf("Shell:\t%s\n", os.Getenv("SHELL"))
|
||||
|
@ -1,3 +1,4 @@
|
||||
.\" vim: ft=nroff
|
||||
.Dd $Mdocdate$
|
||||
.Dt MIMA 1
|
||||
.Os
|
||||
@ -19,5 +20,8 @@ acdw and made into a CHICKEN
|
||||
Scheme program, which has
|
||||
nothing to do with this
|
||||
or the older program.
|
||||
.Pp
|
||||
Its namesake is
|
||||
.Lk https://en.touhouwiki.net/wiki/Mima Mima
|
||||
.Sh AUTHORS
|
||||
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
|
||||
|
Loading…
x
Reference in New Issue
Block a user