From 49ff71556835cfe02ada58d821ad7f85e65ab400 Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Sun, 14 Jan 2024 21:15:42 +0000 Subject: [PATCH] Insert kernel version Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/mima/trunk@19 d2428f92-30f9-164c-8098-19ee57ce342c --- README.md | 2 +- cmd/mima/main.go | 6 ++++-- man/mima.1.mdoc | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd313b1..083d6e5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cmd/mima/main.go b/cmd/mima/main.go index 952480e..eed31a5 100644 --- a/cmd/mima/main.go +++ b/cmd/mima/main.go @@ -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 ( @@ -24,6 +23,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")) diff --git a/man/mima.1.mdoc b/man/mima.1.mdoc index 1cf8b90..d6aa673 100644 --- a/man/mima.1.mdoc +++ b/man/mima.1.mdoc @@ -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