mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-15 00:41:01 +00:00
treewide: remove nix dependency, add custom syscall wrappers & UtsName
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ib880f4bafe9d3bbc944af4b9125256366a6a6964
This commit is contained in:
parent
f8a0070986
commit
75132ff172
8 changed files with 358 additions and 72 deletions
|
|
@ -1,11 +1,14 @@
|
|||
mod colors;
|
||||
mod desktop;
|
||||
mod release;
|
||||
mod syscall;
|
||||
mod system;
|
||||
mod uptime;
|
||||
|
||||
use std::io::{Write, stdout};
|
||||
|
||||
pub use microfetch_lib::UtsName;
|
||||
|
||||
use crate::{
|
||||
colors::print_dots,
|
||||
desktop::get_desktop_info,
|
||||
|
|
@ -24,7 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
if Some("--version") == std::env::args().nth(1).as_deref() {
|
||||
println!("Microfetch {}", env!("CARGO_PKG_VERSION"));
|
||||
} else {
|
||||
let utsname = nix::sys::utsname::uname()?;
|
||||
let utsname = UtsName::uname()?;
|
||||
let fields = Fields {
|
||||
user_info: get_username_and_hostname(&utsname),
|
||||
os_name: get_os_pretty_name()?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue