separate programs by language

This commit is contained in:
raf 2023-09-11 21:43:43 +03:00
commit 6295a0b7e6
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
8 changed files with 106 additions and 4 deletions

7
rs/Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "tinierfetch-rs"
version = "0.1.0"

16
rs/Cargo.toml Normal file
View file

@ -0,0 +1,16 @@
[package]
name = "tinierfetch-rs"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "tinierfetch-rs"
path = "main.rs"
[profile.release]
strip = true
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"

9
rs/main.rs Normal file
View file

@ -0,0 +1,9 @@
use std::env;
fn main() {
["USER", "SHELL", "TERM", "LANG"]
.iter()
.for_each(|var| println!("{}: {}", var, env::var(var).unwrap_or_default()));
println!("\x1B[35mcolors: \x1B[0m\x1B[41m \x1B[42m \x1B[43m \x1B[44m \x1B[45m \x1B[0m");
}