feat: implement moonfetch (fastfetch clone in MoonBit native)
Copilot Setup Steps / copilot-setup-steps (push) Successful in 21s
Copilot Setup Steps / copilot-setup-steps (push) Successful in 21s
This commit is contained in:
commit
ca918a4a34
21 files changed
+2129
No files matched your search
@@ -0,0 +1,38 @@
|
||||
# moonfetch
|
||||
|
||||
A `fastfetch` clone written in **MoonBit** targeting the native backend (`native`).
|
||||
|
||||
## Features
|
||||
|
||||
- **ASCII Art Logos**: Auto-detected from `/etc/os-release` (`moonbit`, `debian`, `ubuntu`, `arch`, `fedora`, `alpine`, `linux`) or selectable via `--logo <name>` / `--no-logo`.
|
||||
- **System Info Modules**:
|
||||
- `user@hostname` + separator
|
||||
- OS (`PRETTY_NAME` + arch)
|
||||
- Host / Model (`/sys/devices/virtual/dmi/id/*` or container/VM detection)
|
||||
- Kernel (`uname`)
|
||||
- Uptime (`/proc/uptime`)
|
||||
- Packages (`dpkg`, `apk`, `pacman`)
|
||||
- Shell & Terminal (`$SHELL`, `$TERM_PROGRAM`/`$TERM`, `TIOCGWINSZ`)
|
||||
- DE / WM (`$XDG_CURRENT_DESKTOP`, `$WAYLAND_DISPLAY`, `$DISPLAY`)
|
||||
- CPU (`/proc/cpuinfo`)
|
||||
- Memory (`/proc/meminfo`)
|
||||
- Disk (`/`) (`statvfs`)
|
||||
- Local IP (`getifaddrs`) & Locale (`$LC_ALL`/`$LANG`)
|
||||
- ANSI 16-color palette bar
|
||||
- **CLI Options**:
|
||||
- `-h`, `--help`
|
||||
- `-v`, `--version`
|
||||
- `-l`, `--logo <name>` / `--no-logo`
|
||||
- `--no-color`
|
||||
- `--json`
|
||||
- `-s`, `--structure <modules>` (colon- or comma-separated)
|
||||
- `-c`, `--config <path>`
|
||||
|
||||
## Build & Test
|
||||
|
||||
```bash
|
||||
moon check --target native
|
||||
moon test --target native
|
||||
moon build --target native --release
|
||||
./_build/native/release/build/cmd/main/main.exe
|
||||
```
|
||||
Reference in new issue
Block a user