Finally, Mima became real
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/mima/trunk@20 d2428f92-30f9-164c-8098-19ee57ce342c
This commit is contained in:
parent
49ff715568
commit
f6e1a84d3f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/mima
|
||||
mima.1
|
22
COPYING
22
COPYING
@ -1,9 +1,21 @@
|
||||
Discordian Public License (DPL)
|
||||
The MIT License (MIT)
|
||||
|
||||
All Rites Reversed (ĸ) 3189 Izuru Yakumo <yakumo.izuru@chaotic.ninja>
|
||||
Copyright (c) 2024 Izuru Yakumo <yakumo.izuru@chaotic.ninja>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
48
README.md
48
README.md
@ -1,14 +1,52 @@
|
||||
# mima
|
||||
My own `neofetch` clone written from scratch in Go.
|
||||
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).
|
||||
My own `neofetch` clone written from scratch in Go with a pixelated evil spirit staring at you.
|
||||
|
||||
|
||||
```shell
|
||||
yakumo_izuru @ mizuki-reborn
|
||||
. . . . . . . . ...X88 X. :. . . . . . . . . .
|
||||
. . . . 8 88 :8 8S8 . .
|
||||
. . . 8@ %X 88 t8.t@@ :. . . 8@ . . . .
|
||||
. . .;XXt;t% 8X 88@8@ ;::.. :;t;XX;: .
|
||||
. . S:8@ %@@@X.8888X;.8S8S%;.: .@ 8@@@ X8 . . .
|
||||
. . .8 S8 .t:@@888@@8:.88@X@88tS 8 @% @ . .
|
||||
. t@tt S 88@XX8XSS8X8XXXtS@8 8%%:.X tt .
|
||||
. ... ...S88t;tX8@XX@X88X@S%@@%88X888@8 t X8 . .
|
||||
. ..:. :.S8;t88X:@8@88@8@8tXS88888@:S%X tt 8 . .
|
||||
. .S %.:88Xt%@8@888S8@8888.%.SX8;@X@X%@ @% . .
|
||||
8 : 8:;t;@8S @:8;888888%% S8X;tS;;S@ . .
|
||||
..;:.S888 @t::8.8 8t;@@888S;t 8 S8;@XX . .
|
||||
. . .888S@S S X8%:888 8888:@S8.88 :8X;t%X:.. . . . .
|
||||
..tS%SXS 8% X;;888;:8 .:XS888. 8%8@XX%X . . .
|
||||
. :tSX 8 . 8 ;t@@8SStXSS888888%S8S888%t;%X@ . .
|
||||
. .. @X8 88X;X8@8@X8888888.88XX8t;@%8tX%8. . .
|
||||
. ..8S8 XXX;@%8;XSSSS88S8@@XS@;SXX%@%XX8 . .
|
||||
. .:88t.88@XX;@tXX@8S888S888@88X;@t8tXXX@X . .
|
||||
. . .8:8 XtX%@88XSXXXS8X@XX888@XS@X;@88SXX8... . .
|
||||
. ..88@888XXtX@@@;t88tX8@@X@@%8XX@t@8XX8;t:X . .
|
||||
. . .8;S:8S@XX8tS8:8XS% S X8% 8;X.8SS8X8%t. . .
|
||||
. . .@ S888;; 88t %%8S8@@8 @ ;@t8 ::8.8X;8
|
||||
. @ 8%%XtX. .;:t%%t8@8;:t@ .:; . %88S88 . . .
|
||||
. . 88 888@8@@@8888@8 .X8888888X:SSt S88: .
|
||||
. . .:S888S 8SX@%St;;:8.8 8 .8 XSSXS 8t88.8 .. . .
|
||||
.S8@%;X%t S88XS8 8 @ 888888S;XS ;8@@ . .
|
||||
. . . :;8t . ;;X@X.t: 888@88@ :;8888X ..
|
||||
. . . 8:.StX .88 8 t%%%%%8:8 S88@S@. . . . .
|
||||
. S8;XS 8 8 888@8 8 8 8 8 888%XS .
|
||||
. . . . 8S8.88 8 8 8 8 8 8 8888 .t . .
|
||||
. . . %@SS 8 8 88 S.S XS88.8SSt . . .
|
||||
. . . ..XXS:X ; 8 88@888S@ . . .
|
||||
. . . :.88:888t%SXt;;%%%% @. . . . . .
|
||||
. . . . . . ;8;%;%t88;%S%S888S. . . .
|
||||
. . . tSX@.8S%8:8tt88SX@.. . . . .
|
||||
|
||||
|
||||
yakumo_izuru @ madoka
|
||||
|
||||
Editor: vim
|
||||
System: freebsd
|
||||
Kernel: 13.3-release
|
||||
Architecture: amd64
|
||||
RAM: 158M/3967M (57.970572%)
|
||||
RAM: 66M/978M (78.548722%)
|
||||
Shell: /bin/sh
|
||||
Uptime: 0d:13h:6m
|
||||
Uptime: 0d:4h:10m
|
||||
```
|
||||
|
@ -1,17 +1,21 @@
|
||||
// $TheSupernovaDuo: mima,v 2024.01.14 2023/01/14 21:12:35 yakumo_izuru Exp $
|
||||
// $TheSupernovaDuo: mima,v 2024.08.20 2023/08/20 09:53:10 yakumo_izuru Exp $
|
||||
//
|
||||
// Get current system information like neofetch(1) without fancy things.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"log"
|
||||
"runtime"
|
||||
"github.com/shirou/gopsutil/v3/host"
|
||||
"github.com/shirou/gopsutil/v3/mem"
|
||||
"log"
|
||||
"os"
|
||||
"runtime"
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed mima_embed
|
||||
var mima string
|
||||
|
||||
func main() {
|
||||
hostname, err := os.Hostname()
|
||||
uptime, _ := host.Uptime()
|
||||
@ -19,17 +23,18 @@ func main() {
|
||||
|
||||
days := uptime / (60 * 60 * 24)
|
||||
hours := (uptime - (days * 60 * 60 * 24)) / (60 * 60)
|
||||
minutes := ((uptime - (days * 60 * 60 * 24)) - (hours * 60 * 60)) / 60
|
||||
minutes := ((uptime - (days * 60 * 60 * 24)) - (hours * 60 * 60)) / 60
|
||||
|
||||
free_mem := v.Free / 1024 / 1024
|
||||
total_mem := v.Total / 1024 / 1024
|
||||
|
||||
kernelversion, err := host.KernelVersion()
|
||||
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
fmt.Printf("%s\n", mima)
|
||||
fmt.Printf("%s @ %s\n", os.Getenv("USER"), hostname)
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf("Editor:\t%s\n", os.Getenv("EDITOR"))
|
||||
|
25
cmd/mima/mima_embed
Normal file
25
cmd/mima/mima_embed
Normal file
@ -0,0 +1,25 @@
|
||||
. 88:;8888:
|
||||
. . . . . . . . .% 8 ;8 8%.. . . . . . . . . .
|
||||
. . @ . :8 88 @t @X@ .: . . . @ . .
|
||||
. . 8X% % X@X88tX8 .@88XSS%t:@88 S8 . .
|
||||
. . %%t XS%@8@88%8@S8@%.;X8t8SX ;S%: . .
|
||||
. .. . t@ 8 X888@X.8XS;t%;@SS88@88. @8@t @ . .
|
||||
. ....; 8 @.S8@XS%XS % t8@8:@ 8@ X8%S@8@%tS X . .
|
||||
.X 888t;;%8t :88tX8XS 8t tXX:%@SSS. . . .
|
||||
..;..8888 88.@X;t8X% 8XXX8888; % XS8S;@@X . .
|
||||
. . .. 8 @X @S%X88;:X.S:X@888%: .8@88XXSX . . .
|
||||
. :%8X@ 8: @@%t8@@SX.%t888888SXX8X88S;::.8X . . .
|
||||
. t@.8 @8t:t;8S8888X8SXXS8@ 8SS%@t@%@X@ . .
|
||||
. 8%8.8XXS;t@X@8S:888888%88X8t;@S@t:XX@@ .
|
||||
. ;X88X@8XS8 8@X;.8S8X XS X88S%8@%8 8XXtt8 : . . .
|
||||
. :.@%St8S%t8;t;XSXXX %X88;8%X8Stt8S8;S. . .
|
||||
. . ..@ 8X888 %SSX8:.::SSXt. :;88@Xt%tX8S@S@ .
|
||||
. . S8S8@@XX%@88@8888 .88888@88S 888888 .
|
||||
. . .S8S8X8t8@8;8888: 8 8 88S88%%tS ;%8XS; . .
|
||||
. . 8;:;8;.8X8. 88888@t8S 8X8X8:@:.:. . .
|
||||
. . . 88SX%@ ::8 8 8 8 8 8 ..8@.@S% .
|
||||
. . :Xt X::@@ 888 8 8 8 8@@88:..t@ . . .
|
||||
. 8;ttSX888X88XX8@. SS t@ . . .
|
||||
. . . . . :%: %S@X X8@S%S 88S8%: . . . .
|
||||
. . . %88SS t: ttt.88X%8%:. . . .
|
||||
|
Loading…
x
Reference in New Issue
Block a user