Compare commits

...

56 Commits

Author SHA1 Message Date
azalea a463f4234c [U] Release 2.0.2 2025-09-04 07:12:01 -04:00
azalea beb04101db [F] Fix script 2025-09-04 07:09:56 -04:00
azalea bf60e4265b [F] Fix script 2025-09-04 07:05:40 -04:00
azalea 42421bc57d [+] Changelog 2025-09-04 06:52:58 -04:00
azalea f64ee7b7e9 [O] Better warning message #419 2025-09-04 06:46:20 -04:00
azalea 1fa29cf831 [+] Adipophilia flag (#424) 2025-09-04 06:24:10 -04:00
azalea 4861dd5d4a [+] Nullflux flag #397 2025-09-04 06:11:55 -04:00
azalea 5614b723fd [+] Hypergender flags
Fixes hykilpikonna/hyfetch#422
2025-09-04 06:04:37 -04:00
azalea 5e1e13b091 [M] Move flag order 2025-09-04 05:52:17 -04:00
azalea 79ddb3ca92 [+] Fictosexual flag (#394) 2025-09-04 05:41:49 -04:00
azalea 684929edea [U] gitignore 2025-09-04 05:41:49 -04:00
Emi f02ec8c4ba Fix nixos_small logo (#421)
* [F] Fix nixos_small logo

* [F] Fix nixos_small logo missing line break

* [?] i was trying to fix a difference between the python version and the rust version what the hell dude
2025-08-27 15:10:59 +09:00
azalea 5fd4ed9b0c [F] Fix #420 fastfetch custom config 2025-08-25 02:20:24 -04:00
a catgirl 003c295084 [F] fix: custom *fetch configurations breaking hyfetch (#420)
if the backend is fastfetch, hyfetch calls
`/bin/fastfetch --logo none -s OS --disable-linewrap`
which for me returns:
`  Artix Linux x86_64`
... and that breaks hyfetch

instead, get the information from the source (/etc/os-release), which im
pretty sure most fetch backends read from anyway

this won't work on *BSD though, because those lack
/etc/os-release, so unless calling `uname -s` is alright, BSDs would
still have the problem

related pull: https://github.com/hykilpikonna/hyfetch/issues/418
2025-08-23 17:34:57 -07:00
azalea d4560e3edb [U] Release 2.0.1 2025-08-21 12:56:30 -04:00
azalea 62b4c27404 [+] Changelog 2025-08-21 12:55:45 -04:00
azalea 169368a784 [F] :) 2025-08-21 12:46:00 -04:00
azalea 3e47640c1a [F] Maybe fix git install 2025-08-21 12:42:12 -04:00
azalea 6ddd762b35 [F] ? 2025-08-21 12:37:37 -04:00
azalea 713bcce0ec [F] Fix git install 2025-08-21 12:35:04 -04:00
azalea fdfd9816f5 [F] Fix deploy script 2025-08-21 12:06:24 -04:00
azalea d6f9d1f569 [F] Fix june flicker #408 2025-08-21 11:48:24 -04:00
azalea b28aa0ddf2 [U] Bump 2025-08-21 11:23:37 -04:00
azalea a5e784c528 [F] Fix distro name detection 2025-08-21 11:21:48 -04:00
azalea 93b4dd3471 [U] Bump 2025-08-21 11:02:20 -04:00
azalea d15afe579f [O] Optimize calculations 2025-08-21 11:01:59 -04:00
azalea f79aca3c65 [-] Remove unused warning 2025-08-21 10:09:00 -04:00
azalea fa3fc59a5f [F] Fix trying to get backend from non-existing backend 2025-08-21 10:08:06 -04:00
azalea afa3c1dfb9 [F] Fix cache path might be missing 2025-08-21 10:05:02 -04:00
azalea cf6b77a1b7 [F] 💢💢💢💢💢💢💢💢💢💢💢 2025-08-21 09:52:03 -04:00
azalea b58425badd [F] 💢💢💢💢💢 2025-08-21 09:47:48 -04:00
azalea 8c1713c37d [F] Forgot to bump lock 2025-08-21 09:29:42 -04:00
azalea 3c7c449da4 [F] Maybe this can work 2025-08-21 09:28:44 -04:00
azalea 2fe4b3f287 [F] Fix cargo publish #405 2025-08-21 09:14:05 -04:00
azalea 6a80928f10 [F] Fix path 2025-08-21 08:35:42 -04:00
azalea 4ac698817d [F] Fix cargo publish #405 2025-08-21 08:31:41 -04:00
azalea 13acc0b6b6 [U] Bump 2025-08-21 08:31:41 -04:00
Ven0m0 455f0382e7 [+] Use cloudflare for public IP field (#416)
* Update neofetch

* [F] Fix drill cloudflare and add fallback

---------

Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
2025-08-21 05:05:08 -07:00
azalea 0c9e4db742 [F] Fix #418 2025-08-21 03:17:56 -04:00
Aiden Bohlander aee058e591 Update logic to not mark the pride month animation as shown if --june is explicitly specified. (#411)
Update logic to not mark the pride month animation as shown if --june is explicitly specified.
2025-06-02 04:03:08 -04:00
azalea b74787768f [+] Bazzite (#406) 2025-05-27 11:43:32 +09:00
Zulta 218c535d06 Add Rhino Linux Logo (#407)
* added Rhino Linux Logo

* updated rhino.py

* fixed the ;; on line 8745

* [F] Fix python generation

---------

Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
2025-05-25 21:59:28 -04:00
stella :3c 76ae5e507a [FEATURE PROTOTYPE] adds step on interactive setup which prompts the user for either the default or small variant of their distro logo. (#392)
* adds step on interactive setup which prompts the user for either the default or small variant of their distro logo.

* fixed distro small logo variant check

* fixes logo vec index overflow error

* now takes --distro as an input when attempting to fetch a small logo variant

* fixes an incorrect error message
2025-04-06 01:05:04 -04:00
Yuki Kurosawa d2dfd950a3 Update KSLinux detection due to kpt and kpm command is removed (#395)
* Update KSLinux detection due to kpt and kpm command is removed

* Fix Bugs
2025-04-06 01:03:39 -04:00
Paul 45ee7e199e Fix unwanted space in Python version (#401)
Before:

```
Python: Python 3.13.2 [Clang 16.0.0 ]
```

After:

```
Python: Python 3.13.2 [Clang 16.0.0]
```
2025-04-06 01:02:46 -04:00
azalea 2cfea54a88 [+] Cisgender flag for #386
Okay I think if I added this, someone will ask about the straight flag again.

In terms of historical context, the cisgender flag has been used neutrally, and it has not been used as a symbol of dismissal like the straight flag did. While some people question whether it's necessary to have a pride flag for the majority identity that do not face discrimination, its existence isn't perceived as offensive by the LGBTQ+ community. So I judged it would be harmless to add the cisgender flag, while adding the straight flag would be harmful.
2025-02-16 17:41:21 -05:00
Alice 0cc6ddbca8 [PR] Auto detect light/dark mode, changing the theme accordingly (#380)
* disable clippy lint

* fmt

* move detect bg into a function

* auto detect light/dark opt

* auto detect dark cli opt

* optional light-dark

* cli opt

* nicer looking output

* [-] Revert code style changes

* [-] Revert code style changes

* [-] Revert code style changes

* [-] Revert

* make the default theme dark

---------

Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
2025-02-16 16:58:45 -05:00
Streaksu 8a536c30f0 [PR] Separate Gloire from Ironclad (#388) 2025-02-15 09:08:03 -05:00
Un1q32 5c24bd443a [PR] fix cpu fetching code for leopard and tiger (#387)
* fix cpu fetching code for leopard and tiger

* some 10.5 systems have this sysctl, just check if it exists like this
2025-02-15 09:03:48 -05:00
Un1q32 e691b2d9da [PR] fix memory code for old macOS versions (#389)
* fix memory code for old macOS versions

* don't print memory at all here, instead of just printing zeros
2025-02-15 10:48:21 +08:00
Ameyama Izumi 5ec7b4f01a [+] Add Kessoku Band flag for meme (#384)
* [+] Add Kessoku Band flag for meme

* [F] Fix key

---------

Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
2025-01-19 05:55:17 +08:00
azalea f38b754783 [F] Port fix #383 to rust 2025-01-18 16:51:17 -05:00
jjanzen 211beb7b6a Limit permutations to 1000 (#383)
limit permutations to 1000

Co-authored-by: jjanzen <jjanzen@jjanzen.ca>
2025-01-19 03:08:12 +08:00
azalea 02c64ef281 [F] Fix #379 2025-01-06 04:53:25 -05:00
azalea 4e9c510240 [F] Fix #378 2025-01-06 04:47:46 -05:00
zenobit d6b559fb40 [F] am count packages fix (#375) 2025-01-04 03:16:00 +08:00
34 changed files with 1076 additions and 588 deletions
+12 -1
View File
@@ -120,4 +120,15 @@ webhook-log
start_moderation.sh
gh_moderator.toml
moderator-data
hyfetch/git
hyfetch/git
build
dist
target
.vscode
.idea
*.iml
*.egg-info
__pycache__
*.pyc
*.pyo
*.pyd
Generated
+8 -1
View File
@@ -220,6 +220,12 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "getrandom"
version = "0.2.15"
@@ -245,7 +251,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hyfetch"
version = "2.0.0-rc1"
version = "2.0.2"
dependencies = [
"aho-corasick",
"ansi_colours",
@@ -258,6 +264,7 @@ dependencies = [
"enable-ansi-support",
"enterpolation",
"fastrand",
"fs_extra",
"indexmap",
"itertools",
"normpath",
+1 -1
View File
@@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"]
[workspace.package]
version = "2.0.0-rc1"
version = "2.0.2"
authors = ["Azalea Gui <azalea@hydev.org>"]
edition = "2021"
rust-version = "1.75.0"
+55 -1
View File
@@ -124,11 +124,65 @@ Updates to `neowofetch` begins with the emoji 🖼️
Note: You can install the latest nightly version by using:
```sh
pip install git+https://github.com/hykilpikonna/hyfetch.git@master
cargo install --git https://github.com/hykilpikonna/hyfetch
```
<!-- CHANGELOG STARTS HERE --->
### 2.0.2
This is a small patch release that adds more flags and fixes some bugs from the recent Rust rewrite.
* 🏳️‍🌈 **New Flags**: Added new pride flags for Nullflux ([#397](https://github.com/hykilpikonna/hyfetch/pull/397)), Hypergender ([#422](https://github.com/hykilpikonna/hyfetch/pull/422)), Fictosexual ([#394](https://github.com/hykilpikonna/hyfetch/pull/394)), and Adipophilia ([#424](https://github.com/hykilpikonna/hyfetch/pull/424)).
* 🐛 **Bug Fixes**:
* Fixed a critical bug where custom `fastfetch` configurations could break hyfetch ([#420](https://github.com/hykilpikonna/hyfetch/pull/420)).
* Corrected the `nixos_small` ASCII logo to display properly ([#421](https://github.com/hykilpikonna/hyfetch/pull/421)).
* 🔧 **Improvements**:
* Improved a warning message for better clarity ([#419](https://github.com/hykilpikonna/hyfetch/issues/419)).
### 2.0.1
(changelog is generated by Gemini from commit history)
**🦀 The Rust Rewrite!**
This is a massive update, rewriting the entire hyfetch core from Python to Rust for significantly improved performance, reliability, and maintainability. A huge thank you to **@teohhanhui** and all the contributors who made this possible!
* 🚀 **Complete Rewrite in Rust**: The entire codebase has been ported to Rust, resulting in major performance improvements and a smaller binary size.
* ⚙️ **New Backends**: In addition to neofetch and fastfetch, hyfetch now supports **macchina** as a backend option.
* 🌈 **Improved June Animation**: The `--june` pride month animation is now smoother, flicker-free ([#408](https://github.com/hykilpikonna/hyfetch/pull/408)).
* 🪟 **Native Windows Support**: The Rust version provides much-improved support for Windows.
**✨ Features & Enhancements**
* 🎨 **Automatic Theme Detection**: Hyfetch can now automatically detect your terminal's light/dark mode (when auto_detect_light_dark is true) ([#380](https://github.com/hykilpikonna/hyfetch/pull/380)).
* ✍️ **Font Logos**: Added a new feature to display a logo created from your system's font.
* 🌐 **Cloudflare for Public IP**: Now uses Cloudflare to fetch the public IP address, with a fallback option ([#416](https://github.com/hykilpikonna/hyfetch/pull/416)).
* 🖼️ **Interactive Logo Selection**: An interactive setup step now allows you to choose between default and small logo variants for your distro ([#392](https://github.com/hykilpikonna/hyfetch/pull/392)).
* 🏳️‍🌈 **New Pride Flags**: Added flags for Cisgender ([#386](https://github.com/hykilpikonna/hyfetch/pull/386)), Kessoku Band ([#384](https://github.com/hykilpikonna/hyfetch/pull/384)), and Watermelon Cream Lozenges ([#369](https://github.com/hykilpikonna/hyfetch/pull/369)) for memes.
* 📄 **Page Navigation**: Added `n` and `p` as shorthands for next/previous page selection and implemented page number roll-over ([#372](https://github.com/hykilpikonna/hyfetch/pull/372)).
**🖼️ New & Updated Distro Support**
* **Added Bazzite** ([#406](https://github.com/hykilpikonna/hyfetch/pull/406))
* **Added Rhino Linux Logo** ([#407](https://github.com/hykilpikonna/hyfetch/pull/407))
* **Updated openSUSE Logos & Added Slowroll**
* **Updated KSLinux Detection** ([#395](https://github.com/hykilpikonna/hyfetch/pull/395))
**🐛 Bug Fixes**
* **macOS**: Fixed CPU and memory fetching on older macOS versions like Leopard and Tiger ([#387](https://github.com/hykilpikonna/hyfetch/pull/387), [#389](https://github.com/hykilpikonna/hyfetch/pull/389)).
* **Packaging**: Resolved several issues with `cargo publish` to ensure reliable package deployment ([#405](https://github.com/hykilpikonna/hyfetch/pull/405)).
* **Performance**: Sped up RPM package counting by skipping digest and signature verification ([#371](https://github.com/hykilpikonna/hyfetch/pull/371)).
* **Animation**: Updated logic to ensure the pride month animation is always shown when `--june` is explicitly used ([#411](https://github.com/hykilpikonna/hyfetch/pull/411)).
* **General**: Fixed numerous bugs related to builds, path detection, cache handling, and distro name detection.
* **Formatting**: Fixed an unwanted space in the Python version output ([#401](https://github.com/hykilpikonna/hyfetch/pull/401)).
**🔧 Maintenance**
* **Documentation**: Updated the README with additional credits for Slackware contributors ([#365](https://github.com/hykilpikonna/hyfetch/pull/365)).
* **Build System**: Overhauled the build scripts for Rust, including support for `musl` static builds and cross-compilation for macOS and Windows.
### 1.99.0
This version would be the last version of HyFetch on Python as we migrate to Rust (Huge thanks to everyone on [#317](https://github.com/hykilpikonna/hyfetch/pull/317)!). It will also be an effort to start a transition that phases out the neowofetch/neofetch backend in favor of FastFetch, since the time needed to maintain the NF backend currently exceed our capacity. If you are willing to help maintaining it, please let us know!
+1
View File
@@ -44,6 +44,7 @@ which = { workspace = true, features = [] }
indexmap = { workspace = true, features = ["std"] }
regex = { workspace = true, features = ["perf", "std", "unicode"] }
unicode-normalization = { workspace = true, features = ["std"] }
fs_extra = "1.3.0"
[target.'cfg(windows)'.dependencies]
enable-ansi-support = { workspace = true, features = [] }
+26 -10
View File
@@ -1,7 +1,9 @@
use std::env;
use std::fmt::Write as _;
use std::path::Path;
use std::{env, fs};
use std::fs;
use std::path::{Path, PathBuf};
use fs_extra::dir::{CopyOptions};
use indexmap::IndexMap;
use regex::Regex;
use unicode_normalization::UnicodeNormalization as _;
@@ -23,18 +25,32 @@ impl AsciiDistro {
}
}
fn anything_that_exist(paths: &[&Path]) -> Option<PathBuf> {
paths.iter().copied().find(|p| p.exists()).map(Path::to_path_buf)
}
fn main() {
let neofetch_path = Path::new(env!("CARGO_WORKSPACE_DIR")).join("neofetch");
// Path hack to make file paths work in both workspace and manifest directory
let dir = PathBuf::from(env::var_os("CARGO_WORKSPACE_DIR").unwrap_or_else(|| env::var_os("CARGO_MANIFEST_DIR").unwrap()));
let o = PathBuf::from(env::var_os("OUT_DIR").unwrap());
println!(
"cargo:rerun-if-changed={neofetch_path}",
neofetch_path = neofetch_path.display()
);
for file in &["neofetch", "hyfetch"] {
let src = anything_that_exist(&[
&dir.join(file),
&dir.join("../../").join(file),
]).expect("couldn't find neofetch");
let dst = o.join(file);
println!("cargo:rerun-if-changed={}", src.display());
let out_dir = env::var_os("OUT_DIR").unwrap();
let out_path = Path::new(&out_dir);
// Copy either file or directory
if src.is_dir() {
let opt = CopyOptions { overwrite: true, copy_inside: true, ..CopyOptions::default() };
fs_extra::dir::copy(&src, &dst, &opt).expect("Failed to copy directory to OUT_DIR");
}
else { fs::copy(&src, &dst).expect("Failed to copy file to OUT_DIR"); }
}
export_distros(neofetch_path, out_path);
export_distros(&o.join("neofetch"), &o);
}
fn export_distros<P>(neofetch_path: P, out_path: &Path)
+174 -91
View File
@@ -13,15 +13,17 @@ use deranged::RangedU8;
use enterpolation::bspline::BSpline;
use enterpolation::{Curve as _, Generator as _};
use hyfetch::ascii::RawAsciiArt;
use hyfetch::ascii::NormalizedAsciiArt;
use hyfetch::cli_options::options;
use hyfetch::color_util::{
clear_screen, color, printc, ContrastGrayscale as _, ForegroundBackground, Lightness,
NeofetchAsciiIndexedColor, PresetIndexedColor, Theme as _, ToAnsiString as _,
};
use hyfetch::distros::Distro;
use hyfetch::models::Config;
#[cfg(feature = "macchina")]
use hyfetch::neofetch_util::macchina_path;
use hyfetch::neofetch_util::{self, add_pkg_path, fastfetch_path, get_distro_ascii, literal_input, ColorAlignment, NEOFETCH_COLORS_AC, NEOFETCH_COLOR_PATTERNS, TEST_ASCII};
use hyfetch::neofetch_util::{self, add_pkg_path, fastfetch_path, get_distro_ascii, get_distro_name, literal_input, ColorAlignment, NEOFETCH_COLORS_AC, NEOFETCH_COLOR_PATTERNS, TEST_ASCII};
use hyfetch::presets::{AssignLightness, Preset};
use hyfetch::pride_month;
use hyfetch::types::{AnsiMode, Backend, TerminalTheme};
@@ -87,7 +89,16 @@ fn main() -> Result<()> {
};
let color_mode = options.mode.unwrap_or(config.mode);
let theme = config.light_dark;
let auto_detect_light_dark = options
.auto_detect_light_dark
.unwrap_or_else(|| config.auto_detect_light_dark.unwrap_or(false));
let theme = if auto_detect_light_dark {
let res = det_bg();
res?.map(|bg| bg.theme())
.unwrap_or(config.light_dark.unwrap_or_default())
} else {
config.light_dark.unwrap_or_default()
};
// Check if it's June (pride month)
let now =
@@ -107,8 +118,6 @@ fn main() -> Result<()> {
.context("failed to write message to stdout")?;
if !june_path.is_file() {
fs::create_dir_all(&cache_path)
.with_context(|| format!("failed to create cache dir {cache_path:?}"))?;
File::create(&june_path)
.with_context(|| format!("failed to create file {june_path:?}"))?;
}
@@ -131,7 +140,12 @@ fn main() -> Result<()> {
} else if let Some(lightness) = options.lightness {
color_profile.with_lightness(AssignLightness::Replace(lightness))
} else {
color_profile.with_lightness_adaptive(config.lightness(), theme)
color_profile.with_lightness_adaptive(
config
.lightness
.unwrap_or_else(|| Config::default_lightness(theme)),
theme,
)
};
debug!(?color_profile, "lightened color profile");
@@ -187,6 +201,22 @@ fn load_config(path: &PathBuf) -> Result<Option<Config>> {
Ok(Some(config))
}
fn det_bg() -> Result<Option<Srgb<u8>>, terminal_colorsaurus::Error> {
if !io::stdout().is_terminal() {
return Ok(None);
}
background_color(QueryOptions::default())
.map(|terminal_colorsaurus::Color { r, g, b }| Some(Srgb::new(r, g, b).into_format()))
.or_else(|err| {
if matches!(err, terminal_colorsaurus::Error::UnsupportedTerminal) {
Ok(None)
} else {
Err(err)
}
})
}
/// Creates config interactively.
///
/// The config is automatically stored to file.
@@ -197,21 +227,10 @@ fn create_config(
backend: Backend,
debug_mode: bool,
) -> Result<Config> {
// Detect terminal environment (doesn't work for all terminal emulators,
// especially on Windows)
let det_bg = if io::stdout().is_terminal() {
match background_color(QueryOptions::default()) {
Ok(bg) => Some(Srgb::<u16>::new(bg.r, bg.g, bg.b).into_format::<u8>()),
Err(terminal_colorsaurus::Error::UnsupportedTerminal) => None,
Err(err) => {
return Err(err).context("failed to get terminal background color");
},
}
} else {
None
};
let det_bg = det_bg()?;
debug!(?det_bg, "detected background color");
let det_ansi = supports_color::on(supports_color::Stream::Stdout).map(|color_level| {
#[allow(clippy::if_same_then_else)]
if color_level.has_16m {
AnsiMode::Rgb
} else if color_level.has_256 {
@@ -228,9 +247,10 @@ fn create_config(
});
debug!(?det_ansi, "detected color mode");
let asc = get_distro_ascii(distro, backend).context("failed to get distro ascii")?;
// Try to get ascii from given backend first, if it fails, try neofetch backend
let asc = get_distro_ascii(distro, backend).or_else(|_| get_distro_ascii(distro, Backend::Neofetch)).context("failed to get distro ascii from neofetch backend")?;
let asc = asc.to_normalized().context("failed to normalize ascii")?;
let theme = det_bg.map(|bg| bg.theme()).unwrap_or(TerminalTheme::Light);
let theme = det_bg.map(|bg| bg.theme()).unwrap_or_default();
let color_mode = det_ansi.unwrap_or(AnsiMode::Ansi256);
let mut title = format!(
"Welcome to {logo} Let's set up some colors first.",
@@ -272,16 +292,8 @@ fn create_config(
// 0. Check term size
{
let (Width(term_w), Height(term_h)) =
terminal_size().context("failed to get terminal size")?;
let (term_w_min, term_h_min) = (
u16::from(asc.w)
.checked_mul(2)
.unwrap()
.checked_add(4)
.unwrap(),
30,
);
let (Width(term_w), Height(term_h)) = terminal_size().context("failed to get terminal size")?;
let (term_w_min, term_h_min) = ((asc.w as u32 * 2 + 4).clamp(0, u16::MAX.into()) as u16, 30);
if term_w < term_w_min || term_h < term_h_min {
printc(
format!(
@@ -483,28 +495,12 @@ fn create_config(
// Calculate flags per row
let (flags_per_row, rows_per_page) = {
let (Width(term_w), Height(term_h)) =
terminal_size().context("failed to get terminal size")?;
let flags_per_row = term_w.div_euclid(u16::from(spacing).checked_add(2).unwrap());
let flags_per_row: u8 = flags_per_row
.try_into()
.expect("`flags_per_row` should fit in `u8`");
let rows_per_page = cmp::max(1, term_h.saturating_sub(13).div_euclid(5));
let rows_per_page: u8 = rows_per_page
.try_into()
.expect("`rows_per_page` should fit in `u8`");
let (Width(term_w), Height(term_h)) = terminal_size().context("failed to get term size")?;
let flags_per_row = (term_w / (spacing as u16 + 2)).clamp(0, u8::MAX.into()) as u8;
let rows_per_page = (term_h.saturating_sub(13) / 5).clamp(1, u8::MAX.into()) as u8;
(flags_per_row, rows_per_page)
};
let num_pages =
u16::from(u8::try_from(Preset::COUNT).expect("`Preset::COUNT` should fit in `u8`"))
.div_ceil(
u16::from(flags_per_row)
.checked_mul(u16::from(rows_per_page))
.unwrap(),
);
let num_pages: u8 = num_pages
.try_into()
.expect("`num_pages` should fit in `u8`");
let num_pages = (Preset::COUNT.div_ceil(flags_per_row as usize * rows_per_page as usize)).clamp(0, u8::MAX.into()) as u8;
// Create pages
let mut pages = Vec::with_capacity(usize::from(num_pages));
@@ -650,11 +646,7 @@ fn create_config(
// Print cats
{
let (Width(term_w), _) = terminal_size().context("failed to get terminal size")?;
let num_cols = cmp::max(
1,
term_w.div_euclid(u16::from(test_ascii.w).checked_add(2).unwrap()),
);
let num_cols: u8 = num_cols.try_into().expect("`num_cols` should fit in `u8`");
let num_cols = (term_w / (test_ascii.w as u16 + 2)).clamp(1, u8::MAX.into()) as u8;
const MIN: f32 = 0.15;
const MAX: f32 = 0.85;
let ratios =
@@ -764,33 +756,131 @@ fn create_config(
);
//////////////////////////////
// 5. Color arrangement
let color_align: ColorAlignment;
// 5. Choose Default or Small Logo
// Calculate amount of row/column that can be displayed on screen
let (ascii_per_row, ascii_rows) = {
let (Width(term_w), Height(term_h)) =
terminal_size().context("failed to get terminal size")?;
let ascii_per_row = cmp::max(
1,
term_w.div_euclid(u16::from(asc.w).checked_add(2).unwrap()),
);
let ascii_per_row: u8 = ascii_per_row
.try_into()
.expect("`ascii_per_row` should fit in `u8`");
let ascii_rows = cmp::max(
1,
term_h
.saturating_sub(8)
.div_euclid(u16::from(asc.h).checked_add(1).unwrap()),
);
let ascii_rows: u8 = ascii_rows
.try_into()
.expect("`ascii_rows` should fit in `u8`");
let (Width(term_w), Height(term_h)) = terminal_size().context("failed to get terminal size")?;
let ascii_per_row = (term_w / (asc.w as u16 + 4)).clamp(1, u8::MAX.into()) as u8;
let ascii_rows = (term_h.saturating_sub(8) / (asc.h as u16 + 1)).clamp(1, u8::MAX.into()) as u8;
(ascii_per_row, ascii_rows)
};
// get distro string and convert it into the enum, neofetch friendly format, so we can check for small logos with the {distro}_small neofetch naming scheme.
let tmp_dst = get_distro_name(backend).or_else(|_| get_distro_name(Backend::Neofetch)).context("failed to get distro name")?;
let detected_dst = Some(distro.map_or_else(
|| format!("{:?}", Distro::detect(tmp_dst).unwrap()),
|d| d.to_string(),
));
// in case someone specified {distro}_small already in the --distro arg
let detected_dst_small_fmt = if !detected_dst.clone().unwrap().ends_with("_small") {
format!("{}_small", detected_dst.unwrap()).to_lowercase()
} else {
detected_dst.unwrap()
};
let running_dst_sml = if Distro::detect(&detected_dst_small_fmt).is_some() {
detected_dst_small_fmt
} else {
"".to_string()
};
// load ascii
let small_asc = get_distro_ascii(Some(&running_dst_sml), backend).context("failed to get distro ascii")?;
let small_asc = small_asc.to_normalized().context("failed to normalize ascii")?;
let mut asc = asc;
let mut logo_chosen: Option<String> = distro.cloned();
if small_asc.lines != asc.lines && running_dst_sml != "" {
let ds_arrangements = [
("Default", asc.clone()),
("Small", small_asc.clone())
];
let arrangements: IndexMap<Cow<str>, NormalizedAsciiArt> =
ds_arrangements.map(|(k, a)| (k.into(), a)).into();
loop {
clear_screen(Some(&title), color_mode, debug_mode).context("failed to clear screen")?;
let asciis: Vec<Vec<String>> = arrangements
.iter()
.map(|(k, a)| {
let mut v: Vec<String> = a
.to_recolored(&ColorAlignment::Horizontal, &color_profile, color_mode, theme)
.context("failed to recolor ascii")?
.lines;
if k == "Small" {
// vertical center
let pad_len = (asc.h as usize - v.len()) / 2;
let mut pad_v: Vec<String> = vec![];
for _ in 0..pad_len {
pad_v.push("".to_string());
}
v.splice(0..0, pad_v.clone());
v.extend(pad_v);
let pad_diff = asc.h as usize - v.len();
v.extend(std::iter::repeat("".to_string()).take(pad_diff));
v.push(format!("{k:^asc_width$}", asc_width = usize::from(small_asc.w)));
return Ok(v);
}
v.push(format!("{k:^asc_width$}", asc_width = usize::from(asc.w)));
Ok(v)
})
.collect::<Result<_>>()?;
// prints small logo w/ big logo
for row in &asciis.into_iter().chunks(usize::from(ascii_per_row)) {
let row: Vec<Vec<String>> = row.collect();
for i in 0..usize::from(asc.h).checked_add(1).unwrap() {
let mut line = Vec::new();
for lines in &row {
line.push(&*lines[i]);
}
printc(line.join(" "), color_mode).context("failed to print ascii line")?;
}
writeln!(io::stdout()).context("failed to write to stdout")?;
}
print_title_prompt(
option_counter,
"Do you want the default logo, or the small logo?",
color_mode,
)
.context("failed to print title prompt")?;
let opts: Vec<Cow<str>> = ["default", "small"].map(Into::into).into();
let choice = literal_input("Your choice?", &opts[..], "default", true, color_mode)
.context("failed to ask for choice input")
.context("failed to select logo type").context("failed to ask for choice input")?;
if choice.to_lowercase() == "small" {
logo_chosen = Some(running_dst_sml);
asc = small_asc;
}
update_title(
&mut title,
&mut option_counter,
"Selected logo type",
choice.as_ref(),
);
break;
}
}
//////////////////////////////
// 6. Color arrangement
let color_align: ColorAlignment;
// Displays horizontal and vertical arrangements in the first iteration, but
// hide them in later iterations
let hv_arrangements = [
@@ -821,24 +911,16 @@ fn create_config(
clear_screen(Some(&title), color_mode, debug_mode).context("failed to clear screen")?;
// Random color schemes
let mut preset_indices: Vec<PresetIndexedColor> =
(0..color_profile.unique_colors().colors.len())
.map(|pi| u8::try_from(pi).expect("`pi` should fit in `u8`").into())
.collect();
let mut preset_indices: Vec<PresetIndexedColor> = (0..color_profile.unique_colors().colors.len()).map(|x| (x as u8).into()).collect();
while preset_indices.len() < slots.len() {
preset_indices.extend_from_within(0..);
}
let preset_index_permutations: IndexSet<Vec<PresetIndexedColor>> = preset_indices
.into_iter()
.permutations(slots.len())
.take(1000)
.collect();
let random_count = u16::from(ascii_per_row)
.checked_mul(u16::from(ascii_rows))
.unwrap()
.saturating_sub(u8::try_from(arrangements.len()).unwrap().into());
let random_count: u8 = random_count
.try_into()
.expect("`random_count` should fit in `u8`");
let random_count = (ascii_per_row as usize * ascii_rows as usize).saturating_sub(arrangements.len()).clamp(0, u8::MAX.into()) as u8;
let choices: IndexSet<Vec<PresetIndexedColor>> =
if usize::from(random_count) > preset_index_permutations.len() {
preset_index_permutations
@@ -885,7 +967,7 @@ fn create_config(
for lines in &row {
line.push(&*lines[i]);
}
printc(line.join(" "), color_mode).context("failed to print ascii line")?;
printc(line.join(" "), color_mode).context("failed to print ascii line")?;
}
writeln!(io::stdout()).context("failed to write to stdout")?;
}
@@ -936,7 +1018,7 @@ fn create_config(
);
//////////////////////////////
// 6. Select *fetch backend
// 7. Select *fetch backend
let select_backend = || -> Result<Backend> {
clear_screen(Some(&title), color_mode, debug_mode).context("failed to clear screen")?;
@@ -1001,12 +1083,13 @@ fn create_config(
let config = Config {
preset,
mode: color_mode,
light_dark: theme,
light_dark: Some(theme),
auto_detect_light_dark: Some(det_bg.is_some()),
lightness: Some(lightness),
color_align,
backend,
args: None,
distro: distro.cloned(),
distro: logo_chosen,
pride_month_disable: false,
};
debug!(?config, "created config");
+6
View File
@@ -31,6 +31,7 @@ pub struct Options {
pub print_font_logo: bool,
pub test_print: bool,
pub ask_exit: bool,
pub auto_detect_light_dark: Option<bool>,
}
pub fn options() -> OptionParser<Options> {
@@ -170,6 +171,10 @@ BACKEND={{{backends}}}",
.help("Ask for input before exiting")
.switch()
.hide();
let auto_detect_light_dark = long("auto-detect-light-dark")
.help("Enables hyfetch to detect light/dark terminal background in runtime")
.argument("BOOL")
.optional();
construct!(Options {
config,
@@ -188,6 +193,7 @@ BACKEND={{{backends}}}",
// hidden
test_print,
ask_exit,
auto_detect_light_dark,
})
.to_options()
.header(
+2 -7
View File
@@ -3,10 +3,10 @@ use crate::types::Backend;
use crate::utils::get_cache_path;
use anyhow::{Context, Result};
use std::collections::HashMap;
use std::fs::{self, File};
use std::fs::{File};
use std::io::{Read, Write};
const FONT_LOGOS: &str = include_str!("../../../hyfetch/data/font_logos.json");
const FONT_LOGOS: &str = include_str!(concat!(env!("OUT_DIR"), "/hyfetch/data/font_logos.json"));
pub fn get_font_logo(backend: Backend) -> Result<String> {
// Check if the cache file exists and return its contents if it does
@@ -34,11 +34,6 @@ pub fn get_font_logo(backend: Backend) -> Result<String> {
let logo = font_logos.get(matched_distro).unwrap();
// Create parent directories for the cache if they don't exist
if let Some(parent) = cache_path.parent() {
fs::create_dir_all(parent).context("Failed to create cache directory")?;
}
// Write the logo to the cache file
let mut cache_file = File::create(cache_path).context("Failed to create cache file")?;
cache_file.write_all(logo.as_bytes()).context("Failed to write logo to cache file")?;
+2 -6
View File
@@ -9,7 +9,8 @@ use crate::types::{AnsiMode, Backend, TerminalTheme};
pub struct Config {
pub preset: Preset,
pub mode: AnsiMode,
pub light_dark: TerminalTheme,
pub auto_detect_light_dark: Option<bool>,
pub light_dark: Option<TerminalTheme>,
pub lightness: Option<Lightness>,
pub color_align: ColorAlignment,
pub backend: Backend,
@@ -31,11 +32,6 @@ impl Config {
},
}
}
pub fn lightness(&self) -> Lightness {
self.lightness
.unwrap_or_else(|| Self::default_lightness(self.light_dark))
}
}
mod args_serde {
+6 -13
View File
@@ -3,7 +3,7 @@ use std::ffi::OsStr;
#[cfg(feature = "macchina")]
use std::fs;
use std::io::{self, Write as _};
use std::path::{PathBuf};
use std::path::PathBuf;
use std::process::Command;
use std::sync::OnceLock;
use std::{env, fmt};
@@ -53,7 +53,7 @@ _/\_\_ _/_/\_
pub const NEOFETCH_COLOR_PATTERNS: [&str; 6] =
["${c1}", "${c2}", "${c3}", "${c4}", "${c5}", "${c6}"];
pub static NEOFETCH_COLORS_AC: OnceLock<AhoCorasick> = OnceLock::new();
pub const NEOFETCH_SCRIPT: &str = include_str!("../../../neofetch");
pub const NEOFETCH_SCRIPT: &str = include_str!(concat!(env!("OUT_DIR"), "/neofetch"));
#[derive(Clone, Eq, PartialEq, Debug, AsRefStr, Deserialize, Serialize)]
#[serde(tag = "mode")]
@@ -438,6 +438,7 @@ where
debug!(?ff_path, "fastfetch path");
let mut command = Command::new(ff_path);
command.env("FFTS_IGNORE_PARENT", "1");
command.args(args);
Ok(command)
}
@@ -481,20 +482,12 @@ where
}
#[tracing::instrument(level = "debug")]
pub(crate) fn get_distro_name(backend: Backend) -> Result<String> {
pub fn get_distro_name(backend: Backend) -> Result<String> {
match backend {
Backend::Neofetch => run_neofetch_command_piped(&["ascii_distro_name"])
.context("failed to get distro name from neofetch"),
Backend::Fastfetch => run_fastfetch_command_piped(&[
"--logo",
"none",
"-s",
"OS",
"--disable-linewrap",
"--os-key",
" ",
])
.context("failed to get distro name from fastfetch"),
Backend::Fastfetch => Ok(run_fastfetch_command_piped(&["--logo", "none", "-c", "none", "-s", "OS",])
.context("failed to get distro name from fastfetch")?.replace("OS: ", "")),
#[cfg(feature = "macchina")]
Backend::Macchina => {
// Write ascii art to temp file
+65 -10
View File
@@ -63,6 +63,8 @@ pub enum Preset {
Aromantic,
Fictosexual,
Aroace1,
Aroace2,
@@ -111,6 +113,10 @@ pub enum Preset {
Genderflux,
Nullflux,
Hypergender, Hyperboy, Hypergirl, Hyperandrogyne, Hyperneutrois,
Finsexual,
Unlabeled1,
@@ -165,6 +171,8 @@ pub enum Preset {
Twink,
Adipophilia,
Kenochoric,
Veldian,
@@ -202,6 +210,11 @@ pub enum Preset {
Neofluid,
Genderqueer,
Cisgender,
/// Colors from Gilbert Baker's original 1978 flag design
Baker,
/// Meme flag
Beiyang,
@@ -214,8 +227,8 @@ pub enum Preset {
#[strum(serialize = "throatlozenges")]
ThroatLozenges,
/// Colors from Gilbert Baker's original 1978 flag design
Baker,
/// Meme flag
Band,
}
#[derive(Clone, Eq, PartialEq, Debug)]
@@ -299,6 +312,11 @@ impl Preset {
"#3BA740", "#A8D47A", "#FFFFFF", "#ABABAB", "#000000",
]),
// https://orientation.fandom.com/wiki/Fictosexual
Self::Fictosexual => ColorProfile::from_hex_colors(vec![
"#000000", "#C4C4C4", "#A349A5", "#C4C4C4", "#000000",
]),
// sourced from https://flag.library.lgbt/flags/aroace/
Self::Aroace1 => ColorProfile::from_hex_colors(vec![
"#E28C00", "#ECCD00", "#FFFFFF", "#62AEDC", "#203856",
@@ -428,6 +446,30 @@ impl Preset {
"f47694", "f2a2b9", "cecece", "7ce0f7", "3ecdf9", "fff48d",
]),
Self::Nullflux => ColorProfile::from_hex_colors(vec![
"#0B0C0E", "#A28DB9", "#E1D4EF", "#F0E6DD", "#665858",
]),
Self::Hypergender => ColorProfile::from_hex_colors(vec![
"#EFEFEF", "#FFFFFF", "#FBFF75", "#000000", "#FBFF75", "#FFFFFF", "#EFEFEF",
]),
Self::Hyperboy => ColorProfile::from_hex_colors(vec![
"#EFEFEF", "#FFFFFF", "#74D7FE", "#000000", "#74D7FE", "#FFFFFF", "#EFEFEF",
]),
Self::Hypergirl => ColorProfile::from_hex_colors(vec![
"#EFEFEF", "#FFFFFF", "#FC76D3", "#000000", "#FC76D3", "#FFFFFF", "#EFEFEF",
]),
Self::Hyperandrogyne => ColorProfile::from_hex_colors(vec![
"#EFEFEF", "#FFFFFF", "#BB83FF", "#000000", "#BB83FF", "#FFFFFF", "#EFEFEF",
]),
Self::Hyperneutrois => ColorProfile::from_hex_colors(vec![
"#EFEFEF", "#FFFFFF", "#BAFA74", "#000000", "#BAFA74", "#FFFFFF", "#EFEFEF",
]),
// sourced from https://lgbtqia.wiki/wiki/Finsexual
Self::Finsexual => ColorProfile::from_hex_colors(vec![
"#B18EDF", "#D7B1E2", "#F7CDE9", "#F39FCE", "#EA7BB3",
@@ -538,6 +580,11 @@ impl Preset {
// colorpicked from https://commons.wikimedia.org/wiki/File:Twink_Pride_Flag_(proposed).svg
Self::Twink => ColorProfile::from_hex_colors(vec!["#FFB2FF", "#FFFFFF", "#FFFF81"]),
// https://en.wikipedia.org/wiki/File:FatFetishFlag.png
Self::Adipophilia => ColorProfile::from_hex_colors(vec![
"#000000", "#E16180", "#FFF9BE", "#603E41", "#000000",
]),
Self::Kenochoric => {
ColorProfile::from_hex_colors(vec!["#000000", "#2E1569", "#824DB7", "#C7A1D6"])
},
@@ -611,9 +658,18 @@ impl Preset {
"#FFECA0", "#FFFFFF", "#FFECA0", "#38087A", "#BCEC64",
]),
Self::Genderqueer => {
ColorProfile::from_hex_colors(vec!["#B57EDC", "#FFFFFF", "#4A8123"])
},
Self::Genderqueer => ColorProfile::from_hex_colors(vec![
"#B57EDC", "#FFFFFF", "#4A8123"
]),
Self::Cisgender => ColorProfile::from_hex_colors(vec![
"#D70270", "#0038A7"
]),
// used https://gilbertbaker.com/rainbow-flag-color-meanings/ as source and colorpicked
Self::Baker => ColorProfile::from_hex_colors(vec![
"#F23D9E", "#F80A24", "#F78022", "#F9E81F", "#1E972E", "#1B86BC", "#243897", "#6F0A82",
]),
Self::Beiyang => ColorProfile::from_hex_colors(vec![
"#DF1B12", "#FFC600", "#01639D", "#FFFFFF", "#000000",
@@ -626,12 +682,11 @@ impl Preset {
Self::ThroatLozenges => ColorProfile::from_hex_colors(vec![
"#2759DA", "#03940D", "#F5F100", "#F59B00", "#B71212",
]),
// used https://gilbertbaker.com/rainbow-flag-color-meanings/ as source and colorpicked
Self::Baker => ColorProfile::from_hex_colors(vec![
"#F23D9E", "#F80A24", "#F78022", "#F9E81F", "#1E972E", "#1B86BC", "#243897",
"#6F0A82",
Self::Band => ColorProfile::from_hex_colors(vec![
"#2670C0", "#F5BD00", "#DC0045", "#E0608E"
]),
})
.expect("preset color profiles should be valid")
}
+3 -1
View File
@@ -307,11 +307,13 @@ pub fn start_animation(color_mode: AnsiMode) -> Result<()> {
let mut frame: Wrapping<usize> = Wrapping(0);
const SPEED: u8 = 2;
let frame_delay = Duration::from_secs_f32(1.0 / 25.0);
let frame_delay = Duration::from_secs_f32(2.0 / 25.0);
execute!(io::stdout(), EnterAlternateScreen).context("failed to enter alternate screen")?;
loop {
// Move cursor to the top left corner
print!("\x1B[H");
draw_frame(frame.0)?;
frame += usize::from(SPEED);
thread::sleep(frame_delay);
+6
View File
@@ -36,6 +36,12 @@ pub enum TerminalTheme {
Dark,
}
impl Default for TerminalTheme {
fn default() -> Self {
Self::Dark
}
}
#[derive(
Copy,
Clone,
+6
View File
@@ -16,6 +16,12 @@ pub fn get_cache_path() -> Result<PathBuf> {
.context("failed to get base dirs")?
.cache_dir()
.to_owned();
// Make sure the cache directory exists
if !path.exists() {
fs::create_dir_all(&path).with_context(|| format!("failed to create cache dir {path:?}"))?;
}
Ok(path)
}
+38 -37
View File
@@ -1,78 +1,79 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH VERSION "1" "October 2024" "Version is 1.99.0" "User Commands"
.TH VERSION: "1" "September 2025" "Version: 2.0.2" "User Commands"
.SH NAME
Version \- manual page for Version is 1.99.0
Version: \- manual page for Version: 2.0.2
.SH SYNOPSIS
.B hyfetch
[\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR
.SH DESCRIPTION
usage: hyfetch [\-h] [\-c] [\-C CONFIG_FILE]
.IP
[\-p {rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,aroace1,aroace2,aroace3,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,biromantic2,autoromantic,boyflux2,girlflux,genderflux,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,plural,fraysexual,bear,butch,leather,otter,twink,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,beiyang,burger,baker,caninekin,random}]
[\-m {8bit,rgb}]
[\-b {qwqfetch,neofetch,fastfetch,fastfetch\-old}] [\-\-args ARGS]
[\-\-c\-scale SCALE] [\-\-c\-set\-l LIGHT] [\-\-c\-overlay] [\-V] [\-\-june]
[\-\-debug] [\-\-distro DISTRO] [\-\-ascii\-file ASCII_FILE]
[\-\-print\-font\-logo]
SCALE] [\-\-c\-set\-l=LIGHTNESS] [\-\-june] [\-\-debug] ([\-\-distro=DISTRO] | [\-\-test\-distro=DISTRO]) [
\fB\-\-ascii\-file\fR=\fI\,ASCII_FILE]\/\fR [\-\-print\-font\-logo] [\-\-auto\-detect\-light\-dark=BOOL]
.PP
hyfetch \- neofetch with flags <3
.SS "options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.SS "Available options:"
.TP
\fB\-c\fR, \fB\-\-config\fR
Configure hyfetch
.TP
\fB\-C\fR CONFIG_FILE, \fB\-\-config\-file\fR CONFIG_FILE
\fB\-C\fR, \fB\-\-config\-file\fR=\fI\,CONFIG_FILE\/\fR
Use another config file
[default: "/home/azalea/.config/hyfetch.json"]
.TP
\fB\-p\fR {rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,aroace1,aroace2,aroace3,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,biromantic2,autoromantic,boyflux2,girlflux,genderflux,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,plural,fraysexual,bear,butch,leather,otter,twink,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,beiyang,burger,baker,caninekin,random}, \fB\-\-preset\fR {rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,aroace1,aroace2,aroace3,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,biromantic2,autoromantic,boyflux2,girlflux,genderflux,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,plural,fraysexual,bear,butch,leather,otter,twink,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,beiyang,burger,baker,caninekin,random}
\fB\-p\fR, \fB\-\-preset\fR=\fI\,PRESET\/\fR
Use preset
PRESET={rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,fictosexual,aroace1,aroace2,aroace3,greysexual,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,autoromantic,boyflux2,girlflux,genderflux,nullflux,hypergender,hyperboy,hypergirl,hyperandrogyne,hyperneutrois,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,caninekin,plural,fraysexual,bear,butch,leather,otter,twink,adipophilia,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,cisgender,baker,beiyang,burger,throatlozenges,band,random}
.TP
\fB\-m\fR {8bit,rgb}, \fB\-\-mode\fR {8bit,rgb}
Color mode
\fB\-m\fR, \fB\-\-mode\fR=\fI\,MODE\/\fR
Color mode MODE={8bit,rgb}
.TP
\fB\-b\fR {qwqfetch,neofetch,fastfetch,fastfetch\-old}, \fB\-\-backend\fR {qwqfetch,neofetch,fastfetch,fastfetch\-old}
Choose a *fetch backend
\fB\-b\fR, \fB\-\-backend\fR=\fI\,BACKEND\/\fR
Choose a *fetch backend BACKEND={neofetch,fastfetch,macchina}
.TP
\fB\-\-args\fR ARGS
\fB\-\-args\fR=\fI\,ARGS\/\fR
Additional arguments pass\-through to backend
.TP
\fB\-\-c\-scale\fR SCALE
\fB\-\-c\-scale\fR=\fI\,SCALE\/\fR
Lighten colors by a multiplier
.TP
\fB\-\-c\-set\-l\fR LIGHT
\fB\-\-c\-set\-l\fR=\fI\,LIGHTNESS\/\fR
Set lightness value of the colors
.TP
\fB\-\-c\-overlay\fR
Use experimental overlay color adjusting instead of
HSL lightness
.TP
\fB\-V\fR, \fB\-\-version\fR
Check version
.TP
\fB\-\-june\fR
Show pride month easter egg
.TP
\fB\-\-debug\fR
Debug mode
.TP
\fB\-\-distro\fR DISTRO, \fB\-\-test\-distro\fR DISTRO
\fB\-\-distro\fR=\fI\,DISTRO\/\fR
Test for a specific distro
.TP
\fB\-\-ascii\-file\fR ASCII_FILE
\fB\-\-test\-distro\fR=\fI\,DISTRO\/\fR
Test for a specific distro
.TP
\fB\-\-ascii\-file\fR=\fI\,ASCII_FILE\/\fR
Use a specific file for the ascii art
.TP
\fB\-\-print\-font\-logo\fR
Print the Font Logo / Nerd Font icon of your distro
and exit
Print the Font Logo / Nerd Font icon of your distro and exit
.TP
\fB\-\-auto\-detect\-light\-dark\fR=\fI\,BOOL\/\fR
Enables hyfetch to detect light/dark terminal background in
runtime
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Prints version information
.SH "SEE ALSO"
The full documentation for
.B Version
.B Version:
is maintained as a Texinfo manual. If the
.B info
and
.B Version
.B Version:
programs are properly installed at your site, the command
.IP
.B info Version
.B info Version:
.PP
should give you access to the complete manual.
+38 -39
View File
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH NEOFETCH "1" "October 2024" "Neofetch 7.98.0" "User Commands"
.TH NEOFETCH "1" "September 2025" "Neofetch 8.0.2" "User Commands"
.SH NAME
Neofetch \- manual page for Neofetch 7.98.0
Neofetch \- manual page for Neofetch 8.0.2
.SH SYNOPSIS
.B neofetch
\fI\,func_name --option "value" --option "value"\/\fR
@@ -321,12 +321,12 @@ Amazon, AmogOS, Anarchy, Android, Antergos, antiX, AOSC OS, Aperio
GNU/Linux, Aperture, Apricity, Arch, ArchBox, Archcraft,
archcraft_ascii, archcraft_minimal, ARCHlabs, ArchMerge, ArchStrike,
ArcoLinux, Arkane, ArseLinux, Artix, Arya, Asahi, AsteroidOS, astOS,
Astra Linux, Athena, azos, Bedrock, BigLinux, BigLinux_large,
Bitrig, BlackArch, BlackMesa, blackPanther, BLAG, BlankOn,
BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate,
CalinixOS, Carbs, CBL\-Mariner, CelOS, Center, CentOS, Chakra,
ChaletOS, Chapeau, Chimera, ChonkySealOS, Chrom, Cleanjaro, Clear
Linux OS, ClearOS, Clover, Cobalt, Condres, Container Linux by
Astra Linux, Athena, azos, Bazzite, Bedrock, BigLinux,
BigLinux_large, Bitrig, BlackArch, BlackMesa, blackPanther, BLAG,
BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS,
Calculate, CalinixOS, Carbs, CBL\-Mariner, CelOS, Center, CentOS,
Chakra, ChaletOS, Chapeau, Chimera, ChonkySealOS, Chrom, Cleanjaro,
Clear Linux OS, ClearOS, Clover, Cobalt, Condres, Container Linux by
CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CuteOS, CyberOS,
dahlia, DarkOs, Darwin, Debian, Deepin, DesaOS, Devuan, DietPi,
digital UNIX, DracOS, DragonFly, Drauger, Droidian, Elementary,
@@ -335,37 +335,36 @@ EvolutionOS, eweOS, Exherbo, Exodia Predator OS, Fedora, Fedora
Kinoite, Fedora Sericea, Fedora Silverblue, Fedora_unicode,
FemboyOS, Feren, Finnix, Floflis, FreeBSD, FreeMiNT, Frugalware,
Funtoo, Furreto, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus,
gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang, Guix,
Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS,
Hyperbola, iglunix, instantOS, Interix, IRIX, Ironclad, Itc,
januslinux, Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora,
KrassOS, KSLinux, Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE,
LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old,
LinuxFromScratch, Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS,
Mageia, Magix, MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS,
MatuusOS, Maui, Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib,
NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful,
Nobara, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open
Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin,
openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap,
openSUSE Tumbleweed, OPNsense, Oracle, orchid, OS Elbrus, PacBSD,
Panwah, Parabola, parch, Pardus, Parrot, Parsix, PCBSD, PCLinuxOS,
pearOS, Pengwin, Pentoo, Peppermint, Peropesis, phyOS, PikaOS, Pisi,
PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX,
Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix,
Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted
Devuan, Regata, Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage,
Sailfish, SalentOS, Salient OS, Salix, Sasanqua, Scientific, semc,
Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS, Slackel,
Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage, Sparky, Star,
SteamOS, Stock Linux, Sulin, SunOS, SwagArch, t2, Tails, Tatra,
TeArch, TorizonCore, Trisquel, Twister, Ubuntu, Ubuntu Budgie,
Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu
Sway, Ubuntu Touch, Ubuntu\-GNOME, ubuntu_old02, Ultramarine Linux,
unicodearch, Univalent, Univention, Uos, UrukOS, uwuntu, Vanilla,
Venom, VNux, Void, VzLinux, wii\-linux\-ngx, Windows, Windows 10,
Windows 11, Windows95, Wrt, Xenia, Xenia2, XFerience, Xray_OS,
Xubuntu, yiffOS, Zorin have ascii logos.
Gloire, gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang,
Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS,
Hyperbola, iglunix, instantOS, Interix, IRIX, Itc, januslinux,
Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux,
Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire,
Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch,
Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix,
MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui,
Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune,
NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD,
Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media
Center, OpenBSD, openEuler, OpenIndiana, openKylin, openmamba,
OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE
Tumbleweed, openSUSE Tumbleweed\-Slowroll, OPNsense, Oracle, orchid,
OS Elbrus, PacBSD, Panwah, Parabola, parch, Pardus, Parrot, Parsix,
PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Peropesis,
phyOS, PikaOS, Pisi, PNM Linux, Pop!_OS, Porteus, PostMarketOS,
Profelis SambaBOX, Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes,
Qubyt, Quibian, Radix, Raspbian, ravynOS, Reborn OS, Red Star,
Redcore, Redhat, Refracted Devuan, Regata, Regolith, RhaymOS, Rhino
Linux, rocky, Rosa, Sabayon, sabotage, Sailfish, SalentOS, Salient
OS, Salix, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux,
ShastraOS, Siduction, SkiffOS, Slackel, Slackware, SliTaz, SmartOS,
Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
SunOS, SwagArch, t2, Tails, Tatra, TeArch, TorizonCore, Trisquel,
Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin,
Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu\-GNOME,
ubuntu_old02, Ultramarine Linux, unicodearch, Univalent, Univention,
Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii\-linuxngx, Windows, Windows 10, Windows 11, Windows95, Wrt, Xenia, Xenia2,
XFerience, Xray_OS, Xubuntu, yiffOS, Zorin have ascii logos.
.TP
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu
have 'old' logo variants, use {distro}_old to use them.
+1 -1
View File
@@ -1 +1 @@
VERSION = '1.99.0'
VERSION = '2.0.2'
+3 -1
View File
@@ -3,6 +3,8 @@
"Alpine": "",
"AOSC OS": "",
"Apple": "",
"macOS": "",
"iOS": "",
"Archcraft": "",
"ArchLabs": "",
"Arch": "",
@@ -118,4 +120,4 @@
"Xorg": "",
"Zorin OS": "",
"Windows": "\uE62A"
}
}
+26
View File
@@ -0,0 +1,26 @@
# This file is automatically generated. Please do not modify.
from . import AsciiArt
bazzite = AsciiArt(match=r'''"Bazzite"*''', color='5 5', ascii=r"""
${c1} %%%%%%====%%%%%%%%%%
%%%%%%%% %%%%%%%%%%%%%%
%%%%%%%%% %%%%%%%%%%%%%%%%
%%%%%%%%% %%%%%%%%%%%%%%%###
%%%%%%%%% %%%%%%%%%%%%%######
== =======######
== =========#####
%%%%%%%%% %%%%%%%####======#####
%%%%%%%%% %%%%%#######=====#####
%%%%%%%%% %%%#########=====#####
%%%%%%%%% %%##########=====#####
%%%%%%%%%====###########=====######
%%%%%%%%====#########======######
%%%%%%%=====#####========######
%%%%###===============#######
%#######==========#########
#######################
###################
###########
""")
+15 -3
View File
@@ -208,6 +208,10 @@ def detect(name: str) -> AsciiArt | None:
from .bedrock import bedrock
return bedrock
if name.startswith('bazzite'):
from .bazzite import bazzite
return bazzite
if name.startswith('biglinux_large'):
from .biglinux_large import biglinux_large
return biglinux_large
@@ -664,9 +668,9 @@ def detect(name: str) -> AsciiArt | None:
from .interix import interix
return interix
if name.startswith('ironclad'):
from .ironclad import ironclad
return ironclad
if name.startswith('gloire'):
from .gloire import gloire
return gloire
if name.startswith('januslinux') or name.startswith('janus') or name.startswith('ataraxia linux') or name.startswith('ataraxia'):
from .januslinux import januslinux
@@ -1180,6 +1184,10 @@ def detect(name: str) -> AsciiArt | None:
from .rhaymos import rhaymos
return rhaymos
if name.startswith('rhino linux'):
from .rhino_linux import rhino_linux
return rhino_linux
if name.startswith('rocky_small'):
from .rocky_small import rocky_small
return rocky_small
@@ -1312,6 +1320,10 @@ def detect(name: str) -> AsciiArt | None:
from .t2 import t2
return t2
if name.startswith('opensuse tumbleweed-slowroll') or name.startswith('opensuse_slowroll'):
from .opensuse_tumbleweed_slowroll import opensuse_tumbleweed_slowroll
return opensuse_tumbleweed_slowroll
if name.startswith('opensuse tumbleweed') or name.startswith('opensuse_tumbleweed'):
from .opensuse_tumbleweed import opensuse_tumbleweed
return opensuse_tumbleweed
+19
View File
@@ -0,0 +1,19 @@
# This file is automatically generated. Please do not modify.
from . import AsciiArt
gloire = AsciiArt(match=r'''"Gloire"*''', color='5 7 0', ascii=r"""
${c3}
&#BGPPPPPG#&
B5?77!!?YJJ7!7YBB&
&G5YJ77!7JYYYYYBPJ&PY#
#PYYYYYY?!?YYYYY7?7JP5JJ
B?YYYYYY7!!7JYYYYJ!!?JJJ5
&& B7?J?77?7!!!!!77777!7Y5YYBBPGGG&
G77?YBB!!!!!!!!!!!!!JYJ??7JYJJY# PYPPG&
J777JB?!7JJ???!!!7?JYYYYYPJ!7JB
GYYG #JJJJJ??7!!!JYYY5PGB&GB&
#Y!?GB5YYJY5PG###&
GJJP
""")
+1 -1
View File
@@ -3,7 +3,7 @@
from . import AsciiArt
nixos_small = AsciiArt(match=r'''"nixos_small"''', color='4 6', ascii=r"""
${c1} \\ \\ //
${c1} \\ \\ //
==\\__\\/ //
// \\//
==// //==
@@ -0,0 +1,27 @@
# This file is automatically generated. Please do not modify.
from . import AsciiArt
opensuse_tumbleweed_slowroll = AsciiArt(match=r'''"openSUSE Tumbleweed-Slowroll"* | "openSUSE_Slowroll"*''', color='2 7', ascii=r"""
${c2} _aaaymQQmwaaa,
,wWQQQD????????$QQQQa,.
_wQQB?" ??QQQa,
sQQD^ ?QQ6\
yWW' 4QQg
,QQD .aaaaaaaa ^4Q6
,mQP _wWQW?????YWWQa, 4Qm
jQ@ wWW?' ^4QQc ^$QL
,QQ' jWW' )QW\ ]QQ
|QQ ,QW' ]QQ ^QQ|
|QQ |QQ ]QQ QQ|
|QQ 4Qg ]QQ .QQ|
'QQ6 '$WQac. _QQ( jQQ
]QQw "?QWQQf _mQP ,QQ(
4QQga wQQP ,mQ?
4QQQga, saQWP' jQQf
?QQQQQQwaaaaaaaayWWW?' _mQ@'
?WQQQP?9VWUV???^ _amQP^
"4QQQaa, ,awQQQ?^
"?VQQQQQQQQQQQQQQP?'
""")
+27
View File
@@ -0,0 +1,27 @@
# This file is automatically generated. Please do not modify.
from . import AsciiArt
rhino_linux = AsciiArt(match=r'''"Rhino Linux"*''', color='5 4', ascii=r"""
${c1}
${c1} ..','.. l.
.,coooooooooc,..ool
;oooooooooooooooooooo.,coo.
;oooooooooooooooooooooooooo ,
.ooooooooooooooooooooooooooo . ,o
oollcccccccccllloooooooooooolcoo..oo
ll;':::::::::::::::ccloooooooooooooo:
.;''';::::::::::::::::::ccloooooooooo
''''',:::::::::::::::::::::::cclllllc
'''''';::::::::::::::::::::::::::::::
${c1}.'''''';::::::::::::::::${c2}ll${c1}:::::::::::
${c1} ''''''';:::::::::::::::${c2}d0${c1}::
${c1}.''''''',;:::::::${c2}cc${c1}::::${c2}0N:'
${c1}''''''''',,;::::${c2}cK${c1}:::${c2}dMX,
${c1}'''''''''''',,,${c2}dMccOMM${c1}:
${c1}.''''''''''''${c2}cWM0WMM${c1}.
${c1}'''''''':${c2}kMMMMM${c1}.
${c2}odxONMMMM
;Kl
""")
+9 -8
View File
@@ -7,7 +7,7 @@ import importlib.util
import json
import random
import traceback
from itertools import permutations
from itertools import permutations, islice
from math import ceil
from . import termenv, neofetch_util, pride_month
@@ -251,7 +251,7 @@ def create_config() -> Config:
slots = list(set(map(int, re.findall('(?<=\\${c)[0-9](?=})', asc))))
while len(pis) < len(slots):
pis += pis
perm = {p[:len(slots)] for p in permutations(pis)}
perm = {p[:len(slots)] for p in islice(permutations(pis), 1000)}
random_count = max(0, ascii_per_row * ascii_rows - len(arrangements))
if random_count > len(perm):
choices = perm
@@ -309,7 +309,7 @@ def create_config() -> Config:
printc('- &bqwqfetch&r: Pure python, &nminimal dependencies&r ' +
('&c(Not installed)' if not has_qwqfetch else ''))
print()
# Use fastfetch as the default backend if it is installed
def_backend = 'neofetch' if ff_path is None else 'fastfetch'
@@ -382,7 +382,7 @@ def run():
GLOBAL_CFG.use_overlay = args.overlay
if args.version:
print(f'Version is {VERSION}')
print(f'Version is 1.99.∞\n(python hyfetch legacy mode)')
return
# Ensure git bash for windows
@@ -414,17 +414,18 @@ def run():
# Check if it's June (pride month)
now = datetime.datetime.now()
june_path = CACHE_PATH / f'animation-displayed-{now.year}'
show_for_june = False
if now.month == 6 and now.year not in config.pride_month_shown and not june_path.is_file() and os.isatty(sys.stdout.fileno()):
args.june = True
show_for_june = True
if args.june and not config.pride_month_disable:
if (args.june or show_for_june) and not config.pride_month_disable:
pride_month.start_animation()
print()
print("Happy pride month!")
print("(You can always view the animation again with `hyfetch --june`)")
print()
if not june_path.is_file():
if not june_path.is_file() and not args.june: # If --june wasn't explicitly specified...
june_path.parent.mkdir(parents=True, exist_ok=True)
june_path.touch()
@@ -440,7 +441,7 @@ def run():
config.backend = args.backend
if args.args:
config.args = args.args
# Random preset
if config.preset == 'random':
config.preset = random.choice(list(PRESETS.keys()))
+5 -3
View File
@@ -333,7 +333,7 @@ def run_qwqfetch(asc: str, args: str = ''):
import qwqfetch
# distro_detector only return a bash variable
# so we use qwqfetch builtin distro detector
print(qwqfetch.get_ascres(asc))
print(qwqfetch.get_ascres(asc))
except ImportError as e: # module not found etc
print("qwqfetch is not installed. Install it by executing:") # use print to output hint directly
print("pip install git+https://github.com/nexplorer-3e/qwqfetch") # TODO: public repo
@@ -379,17 +379,19 @@ def run_fastfetch(asc: str, args: str = '', legacy: bool = False):
"""
# Find fastfetch binary
ff_path = fastfetch_path()
if not ff_path:
printc("&cError: fastfetch binary is not found. Please install fastfetch first.")
exit(127)
# Write temp file
with TemporaryDirectory() as tmp_dir:
tmp_dir = Path(tmp_dir)
path = tmp_dir / 'ascii.txt'
path.write_text(asc, 'utf-8')
os.environ['FFTS_IGNORE_PARENT'] = '1'
# Call fastfetch with the temp file
proc = subprocess.run([str(ff_path), '--raw' if legacy else '--file-raw',
str(path.absolute()), *shlex.split(args)])
+91 -52
View File
@@ -300,6 +300,9 @@ PRESETS: dict[str, ColorProfile] = {
'#ABABAB',
'#000000'
]),
# https://orientation.fandom.com/wiki/Fictosexual
'fictosexual': ColorProfile(["#000000", "#C4C4C4", "#A349A5", "#C4C4C4", "#000000"]),
# aroace1 sourced from https://flag.library.lgbt/flags/aroace/
'aroace1': ColorProfile([
@@ -550,6 +553,27 @@ PRESETS: dict[str, ColorProfile] = {
"3ecdf9",
"fff48d",
]),
# https://lgbtqia.wiki/wiki/Gendernull
'nullflux': ColorProfile([
'#0B0C0E', '#A28DB9', '#E1D4EF', '#F0E6DD', '#665858',
]),
'hypergender': ColorProfile([
"#EFEFEF", "#FFFFFF", "#FBFF75", "#000000", "#FBFF75", "#FFFFFF", "#EFEFEF",
]),
'hyperboy': ColorProfile([
"#EFEFEF", "#FFFFFF", "#74D7FE", "#000000", "#74D7FE", "#FFFFFF", "#EFEFEF",
]),
'hypergirl': ColorProfile([
"#EFEFEF", "#FFFFFF", "#FC76D3", "#000000", "#FC76D3", "#FFFFFF", "#EFEFEF",
]),
'hyperandrogyne': ColorProfile([
"#EFEFEF", "#FFFFFF", "#BB83FF", "#000000", "#BB83FF", "#FFFFFF", "#EFEFEF",
]),
'hyperneutrois': ColorProfile([
"#EFEFEF", "#FFFFFF", "#BAFA74", "#000000", "#BAFA74", "#FFFFFF", "#EFEFEF",
]),
"finsexual": ColorProfile([
"#B18EDF",
@@ -704,53 +728,56 @@ PRESETS: dict[str, ColorProfile] = {
# sourced from https://commons.wikimedia.org/wiki/File:Bear_Brotherhood_flag.svg
'bear': ColorProfile([
'#623804',
'#D56300',
'#FEDD63',
'#FEE6B8',
'#FFFFFF',
'#555555',
'#D56300',
'#FEDD63',
'#FEE6B8',
'#FFFFFF',
'#555555',
]),
# colorpicked from https://commons.wikimedia.org/wiki/File:Butch_Flag.png
'butch': ColorProfile([
'#D72800',
'#F17623',
'#FF9C56',
'#FFFDF6',
'#FFCE89',
'#FEAF02',
'#A37000',
'#D72800',
'#F17623',
'#FF9C56',
'#FFFDF6',
'#FFCE89',
'#FEAF02',
'#A37000',
]),
# colorpicked from https://commons.wikimedia.org/wiki/File:Leather,_Latex,_and_BDSM_pride_-_Light.svg
'leather': ColorProfile([
'#000000',
'#252580',
'#000000',
'#252580',
'#FFFFFF',
'#252580',
'#000000',
'#252580',
'#000000',
'#000000',
'#252580',
'#000000',
'#252580',
'#FFFFFF',
'#252580',
'#000000',
'#252580',
'#000000',
]),
# colorpicked from https://commons.wikimedia.org/wiki/File:Official_Otter_Pride_Flag_by_Bearbackgear.jpg
'otter': ColorProfile([
'#263881',
'#5C9DC9',
'#FFFFFF',
'#3A291D',
'#5C9DC9',
'#263881',
'#263881',
'#5C9DC9',
'#FFFFFF',
'#3A291D',
'#5C9DC9',
'#263881',
]),
# colorpicked from https://commons.wikimedia.org/wiki/File:Twink_Pride_Flag_(proposed).svg
'twink': ColorProfile([
'#FFB2FF',
'#FFFFFF',
'#FFFF81',
'#FFB2FF',
'#FFFFFF',
'#FFFF81',
]),
# https://en.wikipedia.org/wiki/File:FatFetishFlag.png
'adipophilia': ColorProfile(["#000000", "#E16180", "#FFF9BE", "#603E41", "#000000"]),
'kenochoric': ColorProfile([
'#000000',
@@ -924,6 +951,35 @@ PRESETS: dict[str, ColorProfile] = {
"#4a8123"
]),
'cisgender': ColorProfile([
"#D70270",
"#0038A7"
]),
# colors from Gilbert Baker's original 1978 flag design
# used https://gilbertbaker.com/rainbow-flag-color-meanings/ as source and colorpicked
'baker': ColorProfile([
'#F23D9E',
'#F80A24',
'#F78022',
'#F9E81F',
'#1E972E',
'#1B86BC',
'#243897',
'#6F0A82',
]),
# this is 4 all the dogs, from zombpawcoins on tumblr!
'caninekin': ColorProfile([
'#2d2822',
'#543d25',
'#9c754d',
'#e8dac2',
'#cfad8c',
'#b77b55',
'#954e31'
]),
# Meme flags
'beiyang': ColorProfile([
'#DF1B12',
@@ -949,27 +1005,10 @@ PRESETS: dict[str, ColorProfile] = {
"#B71212"
]),
# colors from Gilbert Baker's original 1978 flag design
# used https://gilbertbaker.com/rainbow-flag-color-meanings/ as source and colorpicked
'baker': ColorProfile([
'#F23D9E',
'#F80A24',
'#F78022',
'#F9E81F',
'#1E972E',
'#1B86BC',
'#243897',
'#6F0A82',
'band': ColorProfile([
"#2670c0",
"#f5bd00",
"#dc0045",
"#e0608e"
]),
# this is 4 all the dogs, from zombpawcoins on tumblr!
'caninekin': ColorProfile([
'#2d2822',
'#543d25',
'#9c754d',
'#e8dac2',
'#cfad8c',
'#b77b55',
'#954e31'
])
}
+2 -2
View File
@@ -105,8 +105,8 @@ def start_animation():
try:
while 1:
# Clear the screen
print("\033[2J\033[H", end="")
# Move cursor to the top left corner
print("\033[H", end="")
draw_frame()
frame += speed
sleep(frame_delay)
+4 -1
View File
@@ -1,3 +1,4 @@
import os
import platform
import subprocess
import sys
@@ -12,7 +13,9 @@ def run_rust():
pd = Path(__file__).parent.joinpath('rust')
pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch')
if not pd.exists():
printc('&cThe rust executable is not found, falling back to python...')
if 'HYFETCH_DONT_WARN_RUST' not in os.environ:
printc('&cThe executable for hyfetch v2 (rust) is not found, falling back to legacy v1.99.∞ (python).\n'
'You can add environment variable HYFETCH_DONT_WARN_RUST=1 to suppress this warning.\n')
run_py()
return
+353 -293
View File
@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
version=7.98.0
version=8.0.2
# Fallback to a value of '5' for shells which support bash
# but do not set the 'BASH_' shell variables (osh).
@@ -225,7 +225,7 @@ package_managers="on"
# Show separate user and system packages for supported package managers
#
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --package_separate
@@ -868,7 +868,7 @@ image_source="auto"
# NOTE: Adélie, aerOS, Afterglow, AIX, AlmaLinux, Alpine, Alter, Amazon, AmogOS, Anarchy, Android,
# Antergos, antiX, AOSC OS, Aperio GNU/Linux, Aperture, Apricity, Arch, ArchBox, Archcraft,
# archcraft_ascii, archcraft_minimal, ARCHlabs, ArchMerge, ArchStrike, ArcoLinux, Arkane, ArseLinux,
# Artix, Arya, Asahi, AsteroidOS, astOS, Astra Linux, Athena, azos, Bedrock, BigLinux,
# Artix, Arya, Asahi, AsteroidOS, astOS, Astra Linux, Athena, azos, Bazzite, Bedrock, BigLinux,
# BigLinux_large, Bitrig, BlackArch, BlackMesa, blackPanther, BLAG, BlankOn, BlueLight, Bodhi,
# bonsai, BSD, BunsenLabs, CachyOS, Calculate, CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS,
# Chakra, ChaletOS, Chapeau, Chimera, ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS,
@@ -877,28 +877,29 @@ image_source="auto"
# DracOS, DragonFly, Drauger, Droidian, Elementary, Elive, EncryptOS, EndeavourOS, Endless, Enso,
# EuroLinux, EvolutionOS, eweOS, Exherbo, Exodia Predator OS, Fedora, Fedora Kinoite, Fedora
# Sericea, Fedora Silverblue, Fedora_unicode, FemboyOS, Feren, Finnix, Floflis, FreeBSD, FreeMiNT,
# Frugalware, Funtoo, Furreto, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus, gNewSense, GNOME, GNU,
# GoboLinux, GrapheneOS, Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS,
# Hyperbola, iglunix, instantOS, Interix, IRIX, Ironclad, Itc, januslinux, Kaisen, Kali, KaOS, KDE,
# Kibojoe, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE,
# LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch, Live Raizo,
# LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix, MagpieOS, MainsailOS, Mandriva, Manjaro,
# MassOS, MatuusOS, Maui, Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune,
# NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, Nurunner, NuTyX, Obarun,
# OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin,
# openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE Tumbleweed, OPNsense,
# Oracle, orchid, OS Elbrus, PacBSD, Panwah, Parabola, parch, Pardus, Parrot, Parsix, PCBSD,
# PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Peropesis, phyOS, PikaOS, Pisi, PNM Linux,
# Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes,
# Qubyt, Quibian, Radix, Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted Devuan,
# Regata, Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage, Sailfish, SalentOS, Salient OS, Salix,
# Sasanqua, Scientific, semc, Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS, Slackel,
# Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
# SunOS, SwagArch, t2, Tails, Tatra, TeArch, TorizonCore, Trisquel, Twister, Ubuntu, Ubuntu Budgie,
# Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-
# GNOME, ubuntu_old02, Ultramarine Linux, unicodearch, Univalent, Univention, Uos, UrukOS, uwuntu,
# Vanilla, Venom, VNux, Void, VzLinux, wii-linux-ngx, Windows, Windows 10, Windows 11, Windows95,
# Wrt, Xenia, Xenia2, XFerience, Xray_OS, Xubuntu, yiffOS, Zorin have ascii logos.
# Frugalware, Funtoo, Furreto, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus, Gloire, gNewSense,
# GNOME, GNU, GoboLinux, GrapheneOS, Grombyang, Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra,
# Hybrid, HydroOS, Hyperbola, iglunix, instantOS, Interix, IRIX, Itc, januslinux, Kaisen, Kali,
# KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LainOS, LangitKetujuh, LaxerOS,
# LEDE, LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch, Live
# Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix, MagpieOS, MainsailOS, Mandriva,
# Manjaro, MassOS, MatuusOS, Maui, Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, Nurunner, NuTyX,
# Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin,
# openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE Tumbleweed, openSUSE
# Tumbleweed-Slowroll, OPNsense, Oracle, orchid, OS Elbrus, PacBSD, Panwah, Parabola, parch, Pardus,
# Parrot, Parsix, PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Peropesis, phyOS, PikaOS,
# Pisi, PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS, Puppy,
# PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix, Raspbian, ravynOS, Reborn OS, Red Star, Redcore,
# Redhat, Refracted Devuan, Regata, Regolith, RhaymOS, Rhino Linux, rocky, Rosa, Sabayon, sabotage,
# Sailfish, SalentOS, Salient OS, Salix, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux,
# ShastraOS, Siduction, SkiffOS, Slackel, Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage,
# Sparky, Star, SteamOS, Stock Linux, Sulin, SunOS, SwagArch, t2, Tails, Tatra, TeArch, TorizonCore,
# Trisquel, Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu
# Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-GNOME, ubuntu_old02, Ultramarine Linux, unicodearch,
# Univalent, Univention, Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii-linux-ngx,
# Windows, Windows 10, Windows 11, Windows95, Wrt, Xenia, Xenia2, XFerience, Xray_OS, Xubuntu,
# yiffOS, Zorin have ascii logos.
# NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu have 'old' logo variants, use
# {distro}_old to use them.
@@ -1070,8 +1071,7 @@ get_distro() {
[[ $distro ]] && return
case $os in
Ironclad) distro=Ironclad ;;
Linux|BSD|MINIX)
Linux|BSD|MINIX|Ironclad)
if [[ -f /bedrock/etc/bedrock-release && -z $BEDROCK_RESTRICT ]]; then
case $distro_shorthand in
on|tiny) distro="Bedrock Linux" ;;
@@ -1145,7 +1145,7 @@ get_distro() {
on|tiny) distro="LindowsOS" ;;
*) distro="$(awk '/Version/ {print $2,$3}' /etc/lindowsos-version)"
esac
elif [[ -f /etc/astra_version ]]; then
distro="Astra Linux"
distro_version="$(sed -nr 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' < /etc/astra_version)"
@@ -1199,7 +1199,15 @@ get_distro() {
elif type -p lsb_release >/dev/null; then
# Debian does not include .x versions in /etc/os-version, but does in debian_version
# So if that file exists, and we are not *buntu, build name from there
if [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]] && [[ $(lsb_release -si) != *"neon"* ]]; then
if [[ $(lsb_release -si) = *"KSLinux"* ]]
then
. /etc/os-release
case $distro_shorthand in
on) distro=${NAME} ;;
tiny) distro=${NAME} ;;
*) distro="${NAME} ${VERSION}" ;;
esac
elif [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]] && [[ $(lsb_release -si) != *"neon"* ]]; then
. /etc/os-release
case $distro_shorthand in
on) distro="${NAME}" ;;
@@ -1258,10 +1266,6 @@ get_distro() {
elif type -p tazpkg >/dev/null; then
distro="SliTaz $(< /etc/slitaz-release)"
elif type -p kpt >/dev/null && \
type -p kpm >/dev/null; then
distro=KSLinux
elif [[ -d /system/app/ && -d /system/priv-app ]]; then
distro="Android $(getprop ro.build.version.release)"
@@ -1345,7 +1349,7 @@ get_distro() {
windows_version_verbose=$(trim "${windows_version_verbose/REG_SZ}")
buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
windows_version_verbose=$(trim "${windows_version_verbose/Windows}")
windows_buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
windows_buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
windows_buildnumber=${buildnumber/CurrentBuildNumber}
windows_buildnumber=${buildnumber/REG_SZ}
if [[ "$windows_version_verbose" == *"10"* ]] && (( windows_buildnumber >= 22000 )); then
@@ -1932,7 +1936,7 @@ get_kernel() {
*) kernel=${ver} ;;
esac
return
}
}
# In Interix the Kernel version is commonly comprised of the host OS build number,
# OS architecture and Interix build number
@@ -1957,9 +1961,6 @@ get_kernel() {
get_uptime() {
# Get uptime in seconds.
case $os in
Ironclad)
s=$(uptime -s)
;;
Linux|Windows|MINIX)
if [[ -r /proc/uptime ]]; then
s=$(< /proc/uptime)
@@ -1988,7 +1989,7 @@ get_uptime() {
s=$((now - boot))
;;
AIX|IRIX)
AIX|IRIX|Ironclad)
t=$(LC_ALL=POSIX ps -o etime= -p 1)
[[ $t == *-* ]] && { d=${t%%-*}; t=${t#*-}; }
@@ -2183,7 +2184,7 @@ get_packages() {
has evox && tot cat /var/evox/packages/DB
has squirrel && tot ls -w 1 /var/packages
has anise && tot anise s --installed
has am && pac "$(am -f --less)"
has am && pac "$(am -f --less | awk '{ SUM += $1} END { print SUM }')"
# Bonsai refers to the now archived repo https://github.com/mitchweaver/bonsai
has bonsai && tot bonsai list
# Rad refers to https://github.com/glaucuslinux/rad
@@ -2192,7 +2193,7 @@ get_packages() {
has radula && tot radula -cl
# https://github.com/birb-linux/birb
has birb && tot birb --list-installed
has port && pkgs_h=1 tot port installed && ((packages-=1))
# Using the dnf package cache is much faster than rpm.
@@ -2241,7 +2242,6 @@ get_packages() {
fi
# Other (Needs complex command)
has kpm-pkg && ((packages+=$(kpm --get-selections | grep -cv deinstall$)))
nix-user-pkgs() {
if [ -d ~/.nix-profile ]; then
@@ -2324,7 +2324,7 @@ get_packages() {
has snap && ps -e | grep -qFm 1 snapd >/dev/null && \
pkgs_h=1 tot snap list && ((packages-=1))
# Get AppImageLauncher Application directory,
# Get AppImageLauncher Application directory,
# See: https://github.com/TheAssassin/AppImageLauncher/wiki/Configuration#settings-file
manager=appimage && has appimaged || [ -f "$HOME"/.config/appimagelauncher.cfg ] &&
if [ -f "$HOME"/.config/appimagelauncher.cfg ]; then
@@ -2336,7 +2336,7 @@ get_packages() {
AIDIR="$HOME/.local/bin"
fi &&
dir "$AIDIR/*.[Aa]pp[Ii]mage \
$ALDIR/*.[Aa]pp[Ii]mage"
$ALDIR/*.[Aa]pp[Ii]mage"
# Has devbox & is initialized
has devbox && [[ "$(devbox global list)" != *"not activated"* ]] && tot devbox global list
@@ -2519,7 +2519,7 @@ get_editor() {
esac
editor_v="${editor_v/$'\n'*}"
editor_v="${editor_v/Version: }"
# Only show editor name if the version string doesn't contain it
echo "$editor_v" | grep -i "$editor_name" &> /dev/null && editor_name=""
editor=${editor_name}${editor_v:+ }${editor_v}
@@ -2983,7 +2983,7 @@ get_wm_theme() {
wm_theme=$(leftwm-theme status | grep "Your current theme" | sed -e 's/Your current theme is //g' -e 's/\,.*$//g')
fi
;;
fly-wm)
fly_config_file
if grep -q 'DecorTheme' "${fly_config_file}" 2>/dev/null; then
@@ -3175,19 +3175,10 @@ END
;;
"Mac OS X"|"macOS")
if [[ $osx_version == 10.[4-5]* ]]; then
cpu="$(system_profiler SPHardwareDataType | grep CPU\ Type)"
cpu="${cpu/CPU\ Type\:/}"
speed="$(system_profiler SPHardwareDataType | grep CPU\ Speed)"
speed="${speed/CPU\ Speed\:/}"
speed="${speed/ MHz/}"
speed="${speed/ GHz/}"
cores="$(system_profiler SPHardwareDataType | grep Number\ Of\ CPUs)"
cores="${cores/Number\ Of\ CPUs\:/}"
else
cpu="$(sysctl -n machdep.cpu.brand_string)"
cpu="$(sysctl -n machdep.cpu.brand_string 2>/dev/null)"
if [ -z "$cpu" ]; then
cpu="$(system_profiler SPHardwareDataType | grep Processor\ Name)"
cpu="${cpu/Processor\ Name\:/}"
fi
# Get CPU cores.
@@ -3374,7 +3365,6 @@ END
cpu="${cpu//[1-9][0-9]-Core}"
cpu="${cpu//[0-9]-Core}"
cpu="${cpu//, * Compute Cores}"
cpu="${cpu//Core / }"
cpu="${cpu//(\"AuthenticAMD\"*)}"
cpu="${cpu//with Radeon*Graphics}"
cpu="${cpu//, altivec supported}"
@@ -3663,13 +3653,19 @@ get_memory() {
;;
"Mac OS X" | "macOS" | "iPhone OS")
hw_pagesize="$(sysctl -n hw.pagesize)"
mem_total="$(($(sysctl -n hw.memsize) / 1024))"
pages_app="$(($(sysctl -n vm.page_pageable_internal_count) - $(sysctl -n vm.page_purgeable_count)))"
pages_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
pages_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
pages_compressed="${pages_compressed:-0}"
mem_used="$(((pages_app + ${pages_wired//.} + ${pages_compressed//.}) * hw_pagesize / 1024))"
pageable="$(sysctl -n vm.page_pageable_internal_count)"
purgeable="$(sysctl -n vm.page_purgeable_count)"
if [ -n "$pageable" ] && [ -n "$purgeable" ] && type -p vm_stat &>/dev/null; then
hw_pagesize="$(sysctl -n hw.pagesize)"
mem_total="$(($(sysctl -n hw.memsize) / 1024))"
pages_app="$(($(sysctl -n vm.page_pageable_internal_count) - $(sysctl -n vm.page_purgeable_count)))"
pages_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
pages_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
pages_compressed="${pages_compressed:-0}"
mem_used="$(((pages_app + ${pages_wired//.} + ${pages_compressed//.}) * hw_pagesize / 1024))"
else
return 0
fi
;;
"BSD" | "MINIX" | "ravynOS")
@@ -4587,7 +4583,7 @@ get_python_ver() {
if command -v python &> /dev/null; then
python_ver=$(python -VVV)
python_ver=${python_ver//$'\n'/}
python_ver=${python_ver//\(+([^\)])\)}
python_ver=${python_ver//+([[:space:]])\(+([^\)])\)}
python_ver=$(echo "$python_ver" | awk '$1=$1')
fi
}
@@ -5305,6 +5301,16 @@ get_local_ip() {
}
get_public_ip() {
if [[ -z "$public_ip_host" ]] && type -p dig >/dev/null; then
public_ip="$(dig +time=1 +tries=1 +short TXT ch whoami.cloudflare @1.1.1.1 | tr -d '"')"
[[ "$public_ip" =~ ^\; ]] && unset public_ip
fi
if [[ -z "$public_ip_host" ]] && [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
public_ip="$(drill whoami.cloudflare TXT CH @1.1.1.1 | awk '/^whoami\./ && $3 == "CH" {print $5}' | tr -d '"')"
fi
# Fallback
if [[ -z "$public_ip_host" ]] && type -p dig >/dev/null; then
public_ip="$(dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com)"
[[ "$public_ip" =~ ^\; ]] && unset public_ip
@@ -6620,12 +6626,12 @@ ASCII:
GNU/Linux, Aperture, Apricity, Arch, ArchBox, Archcraft,
archcraft_ascii, archcraft_minimal, ARCHlabs, ArchMerge, ArchStrike,
ArcoLinux, Arkane, ArseLinux, Artix, Arya, Asahi, AsteroidOS, astOS,
Astra Linux, Athena, azos, Bedrock, BigLinux, BigLinux_large,
Bitrig, BlackArch, BlackMesa, blackPanther, BLAG, BlankOn,
BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS, Calculate,
CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra,
ChaletOS, Chapeau, Chimera, ChonkySealOS, Chrom, Cleanjaro, Clear
Linux OS, ClearOS, Clover, Cobalt, Condres, Container Linux by
Astra Linux, Athena, azos, Bazzite, Bedrock, BigLinux,
BigLinux_large, Bitrig, BlackArch, BlackMesa, blackPanther, BLAG,
BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs, CachyOS,
Calculate, CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS,
Chakra, ChaletOS, Chapeau, Chimera, ChonkySealOS, Chrom, Cleanjaro,
Clear Linux OS, ClearOS, Clover, Cobalt, Condres, Container Linux by
CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CuteOS, CyberOS,
dahlia, DarkOs, Darwin, Debian, Deepin, DesaOS, Devuan, DietPi,
digital UNIX, DracOS, DragonFly, Drauger, Droidian, Elementary,
@@ -6634,37 +6640,37 @@ ASCII:
Kinoite, Fedora Sericea, Fedora Silverblue, Fedora_unicode,
FemboyOS, Feren, Finnix, Floflis, FreeBSD, FreeMiNT, Frugalware,
Funtoo, Furreto, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus,
gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang, Guix,
Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS,
Hyperbola, iglunix, instantOS, Interix, IRIX, Ironclad, Itc,
januslinux, Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora,
KrassOS, KSLinux, Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE,
LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old,
LinuxFromScratch, Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS,
Mageia, Magix, MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS,
MatuusOS, Maui, Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib,
NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful,
Nobara, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open
Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin,
openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap,
openSUSE Tumbleweed, OPNsense, Oracle, orchid, OS Elbrus, PacBSD,
Panwah, Parabola, parch, Pardus, Parrot, Parsix, PCBSD, PCLinuxOS,
pearOS, Pengwin, Pentoo, Peppermint, Peropesis, phyOS, PikaOS, Pisi,
PNM Linux, Pop!_OS, Porteus, PostMarketOS, Profelis SambaBOX,
Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian, Radix,
Raspbian, ravynOS, Reborn OS, Red Star, Redcore, Redhat, Refracted
Devuan, Regata, Regolith, RhaymOS, rocky, Rosa, Sabayon, sabotage,
Sailfish, SalentOS, Salient OS, Salix, Sasanqua, Scientific, semc,
Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS, Slackel,
Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage, Sparky, Star,
SteamOS, Stock Linux, Sulin, SunOS, SwagArch, t2, Tails, Tatra,
TeArch, TorizonCore, Trisquel, Twister, Ubuntu, Ubuntu Budgie,
Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu
Sway, Ubuntu Touch, Ubuntu-GNOME, ubuntu_old02, Ultramarine Linux,
unicodearch, Univalent, Univention, Uos, UrukOS, uwuntu, Vanilla,
Venom, VNux, Void, VzLinux, wii-linux-ngx, Windows, Windows 10,
Windows 11, Windows95, Wrt, Xenia, Xenia2, XFerience, Xray_OS,
Xubuntu, yiffOS, Zorin have ascii logos.
Gloire, gNewSense, GNOME, GNU, GoboLinux, GrapheneOS, Grombyang,
Guix, Haiku, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS,
Hyperbola, iglunix, instantOS, Interix, IRIX, Itc, januslinux,
Kaisen, Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux,
Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire,
Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch,
Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix,
MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui,
Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune,
NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD,
Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media
Center, OpenBSD, openEuler, OpenIndiana, openKylin, openmamba,
OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE
Tumbleweed, openSUSE Tumbleweed-Slowroll, OPNsense, Oracle, orchid,
OS Elbrus, PacBSD, Panwah, Parabola, parch, Pardus, Parrot, Parsix,
PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Peropesis,
phyOS, PikaOS, Pisi, PNM Linux, Pop!_OS, Porteus, PostMarketOS,
Profelis SambaBOX, Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes,
Qubyt, Quibian, Radix, Raspbian, ravynOS, Reborn OS, Red Star,
Redcore, Redhat, Refracted Devuan, Regata, Regolith, RhaymOS, Rhino
Linux, rocky, Rosa, Sabayon, sabotage, Sailfish, SalentOS, Salient
OS, Salix, Sasanqua, Scientific, semc, Septor, Serene, SharkLinux,
ShastraOS, Siduction, SkiffOS, Slackel, Slackware, SliTaz, SmartOS,
Soda, Solus, Source Mage, Sparky, Star, SteamOS, Stock Linux, Sulin,
SunOS, SwagArch, t2, Tails, Tatra, TeArch, TorizonCore, Trisquel,
Twister, Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin,
Ubuntu MATE, Ubuntu Studio, Ubuntu Sway, Ubuntu Touch, Ubuntu-GNOME,
ubuntu_old02, Ultramarine Linux, unicodearch, Univalent, Univention,
Uos, UrukOS, uwuntu, Vanilla, Venom, VNux, Void, VzLinux, wii-linux-
ngx, Windows, Windows 10, Windows 11, Windows95, Wrt, Xenia, Xenia2,
XFerience, Xray_OS, Xubuntu, yiffOS, Zorin have ascii logos.
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu
have 'old' logo variants, use {distro}_old to use them.
@@ -7434,7 +7440,7 @@ EOF
;;
"ArseLinux"*)
set_colors 4 7
set_colors 4 7
read -rd '' ascii_data <<'EOF'
${c1}
⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
@@ -7966,7 +7972,7 @@ EOF
"aerOS"*)
set_colors fg 0 0 0
read -rd '' ascii_data <<'EOF'
${c1}
${c1}
ooo OOO OOO ooo
oOO OOo
oOO OOo
@@ -8186,23 +8192,23 @@ EOF
"azos"*)
set_colors 6 1
read -rd '' ascii_data <<'EOF'
${c1} ////. ${c2} (((((
${c1} //////// ${c2} @((((((((
${c1} //////// ${c2} @((((((((
${c1} //////// /////// ${c2} ((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ////// ${c2} (((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} (((((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} (((((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} ((((((( ((((((((( @((((((((
${c1} //////// ///////// /// ${c2} ( ((((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ${c2} &(((((((( @((((((((
${c1} //////// ////// ${c2} @(((( @((((((((
${c1} //////// ${c2} @((((((((
${c1} //////// ${c2} @((((((((
${c1} ///// ${c2} (((((
${c1} ////. ${c2} (((((
${c1} //////// ${c2} @((((((((
${c1} //////// ${c2} @((((((((
${c1} //////// /////// ${c2} ((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ////// ${c2} (((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} (((((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} (((((((( ((((((((( @((((((((
${c1} //////// ///////// //////// ${c2} ((((((( ((((((((( @((((((((
${c1} //////// ///////// /// ${c2} ( ((((((((( @((((((((
${c1} //////// ///////// ${c2} ((((((((( @((((((((
${c1} //////// ///////// ${c2} &(((((((( @((((((((
${c1} //////// ////// ${c2} @(((( @((((((((
${c1} //////// ${c2} @((((((((
${c1} //////// ${c2} @((((((((
${c1} ///// ${c2} (((((
EOF
;;
@@ -8229,6 +8235,31 @@ ${c1}--------------------------------------
EOF
;;
"Bazzite"*)
set_colors 5 5
read -rd '' ascii_data <<'EOF'
${c1} %%%%%%====%%%%%%%%%%
%%%%%%%% %%%%%%%%%%%%%%
%%%%%%%%% %%%%%%%%%%%%%%%%
%%%%%%%%% %%%%%%%%%%%%%%%###
%%%%%%%%% %%%%%%%%%%%%%######
== =======######
== =========#####
%%%%%%%%% %%%%%%%####======#####
%%%%%%%%% %%%%%#######=====#####
%%%%%%%%% %%%#########=====#####
%%%%%%%%% %%##########=====#####
%%%%%%%%%====###########=====######
%%%%%%%%====#########======######
%%%%%%%=====#####========######
%%%%###===============#######
%#######==========#########
#######################
###################
###########
EOF
;;
"BigLinux_large"*)
set_colors 2 3 4 7
read -rd '' ascii_data <<'EOF'
@@ -8336,7 +8367,7 @@ EOF
"BlackMesa")
set_colors 1
read -rd '' ascii_data <<'EOF'
${c1}
${c1}
.-;+$XHHHHHHX$+;-.
,;X@@X%/;=----=:/%X@@X/,
=$@@%=. .=+H@X:
@@ -8746,6 +8777,8 @@ ${c1} .
EOF
;;
"CelOS"*)
set_colors 4 6 0 5
read -rd '' ascii_data <<'EOF'
@@ -9252,16 +9285,16 @@ ${c2}
${c3}MMM1ua${c2}
${c1}MM${c2}EE ${c3} MMMMM1uazE${c2}
${c1}MM ${c2}EEEE ${c3}M1MM1uazzEn ${c2}EEEE MME
EEEEE ${c3}MMM uazEno ${c2}EEEE
EEEEE ${c3}MMM uazEno ${c2}EEEE
EEEEE${c1}MMMMMMEno~; ${c2}EE E${c2}
EE ${c1}MMMMMMMM~;;E ${c2}MMMMM M ${c2}
E ${c1}MMMMMMMMM ${c2} E E ${c2}
${c1}MMMMMMMMMMM
${c1}MMMMMMMMM ${c2}EE ${c1}
MM1MMMM ${c2}EEE ${c1}
MMMMM
MMM
M
${c1}MMMMMMMMMMM
${c1}MMMMMMMMM ${c2}EE ${c1}
MM1MMMM ${c2}EEE ${c1}
MMMMM
MMM
M
EOF
;;
@@ -9409,24 +9442,24 @@ EOF
"openKylin"*)
set_colors 2 7
read -rd '' ascii_data <<'EOF'
${c1}
/KKK]
KKKKKKK` ]KKKK\
KKKKK/ /KKKKKKKKK\
KKKK/ ,KKKKKKKKKKKK^
,]KKK =KKK` /KKKKKKOOOOOO`
,KKKKKK =KK /` [\OOOOOOO\
\KKKKK =K ,OOOOOOO`
,KKKKK =^ \OOOOOO
,KKKK ^ OOOOOO^
*KKK^ =OOOOO^
OOKK^ OOOOOO^
\OOOK\ /OOOOOO`
OOOOOO] ,OOOOOOO^
,OOOOOOOO\] ,[OOOOOOOOO/
\OOOOOOOOOOOOOOOOOOOOO`
[OOOOOOOOOOOOOOOO/`
,[OOOOOOOOO]
${c1}
/KKK]
KKKKKKK` ]KKKK\
KKKKK/ /KKKKKKKKK\
KKKK/ ,KKKKKKKKKKKK^
,]KKK =KKK` /KKKKKKOOOOOO`
,KKKKKK =KK /` [\OOOOOOO\
\KKKKK =K ,OOOOOOO`
,KKKKK =^ \OOOOOO
,KKKK ^ OOOOOO^
*KKK^ =OOOOO^
OOKK^ OOOOOO^
\OOOK\ /OOOOOO`
OOOOOO] ,OOOOOOO^
,OOOOOOOO\] ,[OOOOOOOOO/
\OOOOOOOOOOOOOOOOOOOOO`
[OOOOOOOOOOOOOOOO/`
,[OOOOOOOOO]
EOF
;;
@@ -9857,21 +9890,21 @@ EOF
"eweOS"*)
set_colors 7 11 9 8 1
read -rd '' ascii_data <<'EOF'
${c2} #####%%%
${c2} ##%%${c3}////${c2}%%%%%${c3}///
${c2} #%%%%${c3}////((((////${c2}%
${c1} *@@@@@@@${c3}/${c5},,,${c3}/////${c5},,,${c2}%${c1}@@@@@@@
${c1} .@@@@@@@@@@@${c3}////////${c2}%%%${c1}@@@@@@@@@@@@
${c1} @@@${c4}...${c1}@@@@@@${c3}////${c2}%%${c3}////${c1}@@@@@@@@@@@@@@@@
${c2} #####%%%
${c2} ##%%${c3}////${c2}%%%%%${c3}///
${c2} #%%%%${c3}////((((////${c2}%
${c1} *@@@@@@@${c3}/${c5},,,${c3}/////${c5},,,${c2}%${c1}@@@@@@@
${c1} .@@@@@@@@@@@${c3}////////${c2}%%%${c1}@@@@@@@@@@@@
${c1} @@@${c4}...${c1}@@@@@@${c3}////${c2}%%${c3}////${c1}@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@ @@@@@@
${c1} @@@ @@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@@@@@@@@@@@@@@@@@@
${c1} @@@@@@ @@@@@@
${c1} @@@ @@@
EOF
;;
@@ -10769,7 +10802,7 @@ ${c2}~!!7JY5PGGBBBBBBBBGGGGGGGBGGGGGP5YJ?7~~~
EOF
;;
"Ironclad"*)
"Gloire"*)
set_colors 5 7 0
read -rd '' ascii_data <<'EOF'
${c3}
@@ -12093,7 +12126,7 @@ EOF
"nixos_small")
set_colors 4 6
read -rd '' ascii_data <<'EOF'
${c1} \\\\ \\\\ //
${c1} \\\\ \\\\ //
==\\\\__\\\\/ //
// \\\\//
==// //==
@@ -13001,39 +13034,39 @@ EOF
set_colors 11
read -rd '' ascii_data <<'EOF'
${c1}
'',,, ,,,d,
',, ,,'
', ,.
., '
. .
' .
.. oddddkdlc:;,.. ..
. ............lllc, .
. ....................: .
. . ....................
'. ..........'o........d0XX0.
....lllllllcOOOcllllll............cxlxc...;okkkx.
..................................';lc'...lo.
.'''''''''''''.....................,;,.......
',,,,,,,,,,,,,,,,''...............dkkkd......
',,,,,,,,,,,,,,,,,,,'............;okkkd;....
.,,,,,,,,,,,,,,,,,,,,,............;cll;.....
,,,,,,,,,,,,,,,,,,,,'....................:d,
,,,,,,,,,,,,,,,,,,,....................oxxx:
.,,,,,,,,,,,,,,,,,'..................oxxxxx. .
.,,,,,,,,,,,,,,'.......... ,oxxxxxxx .
.;,,,,,,,,,,,,'.. 'cxxxxxxxxx,
:dl:,'',,'.... .;lxxxxxxxxxd;
,codol:;'. ...,;cldxxxxxxxxxoc.
.:cxxxxxdlccccc:ccldxxxxxxxxxxxxxx::.
.'::dxxxxxxxxxxxxxxxxxxxxxxxd::'.
..,::cdxxxxxxxxxxxxxdc::,..
...,;:::::::;,...
'',,, ,,,d,
',, ,,'
', ,.
., '
. .
' .
.. oddddkdlc:;,.. ..
. ............lllc, .
. ....................: .
. . ....................
'. ..........'o........d0XX0.
....lllllllcOOOcllllll............cxlxc...;okkkx.
..................................';lc'...lo.
.'''''''''''''.....................,;,.......
',,,,,,,,,,,,,,,,''...............dkkkd......
',,,,,,,,,,,,,,,,,,,'............;okkkd;....
.,,,,,,,,,,,,,,,,,,,,,............;cll;.....
,,,,,,,,,,,,,,,,,,,,'....................:d,
,,,,,,,,,,,,,,,,,,,....................oxxx:
.,,,,,,,,,,,,,,,,,'..................oxxxxx. .
.,,,,,,,,,,,,,,'.......... ,oxxxxxxx .
.;,,,,,,,,,,,,'.. 'cxxxxxxxxx,
:dl:,'',,'.... .;lxxxxxxxxxd;
,codol:;'. ...,;cldxxxxxxxxxoc.
.:cxxxxxdlccccc:ccldxxxxxxxxxxxxxx::.
.'::dxxxxxxxxxxxxxxxxxxxxxxxd::'.
..,::cdxxxxxxxxxxxxxdc::,..
...,;:::::::;,...
EOF
;;
"phyOS"*)
set_colors 33 33 7 1
read -rd '' ascii_data <<'EOF'
@@ -13497,26 +13530,26 @@ EOF
"Reborn OS"* | "Reborn"*)
set_colors 0 4 6
read -rd '' ascii_data <<'EOF'
${c1} .======================.
${c1}.#${c2}#*********${c1}%%${c2}*********#${c1}%:
${c1}:%${c2}#**********${c1}%%${c2}**********#${c1}%-
${c1}-%${c2}************${c1}%%${c2}************${c1}%=
${c1}+%${c2}******${c1}%%#####${c1}%%#####%%${c2}******${c1}%+
${c1}*%%#${c2}****${c1}%#${c3}+=====${c1}%%${c3}=====+${c1}#%${c2}****${c1}#%%*
${c1}*%${c2}*#${c1}#%%#%#${c3}====+++${c1}%%${c3}+++====${c1}#%#%%#${c2}#*${c1}##.
${c1}.##${c2}*****${c1}#%%%#${c3}*++${c1}%######%${c3}*+*${c1}#%%%#${c2}*****${c1}#%.
${c1}:%#${c2}*****${c1}#%${c3}*=+*${c1}#%%${c3}*++++++*${c1}%%#${c3}*+=*${c1}%#${c2}*****${c1}#%:
${c1} .======================.
${c1}.#${c2}#*********${c1}%%${c2}*********#${c1}%:
${c1}:%${c2}#**********${c1}%%${c2}**********#${c1}%-
${c1}-%${c2}************${c1}%%${c2}************${c1}%=
${c1}+%${c2}******${c1}%%#####${c1}%%#####%%${c2}******${c1}%+
${c1}*%%#${c2}****${c1}%#${c3}+=====${c1}%%${c3}=====+${c1}#%${c2}****${c1}#%%*
${c1}*%${c2}*#${c1}#%%#%#${c3}====+++${c1}%%${c3}+++====${c1}#%#%%#${c2}#*${c1}##.
${c1}.##${c2}*****${c1}#%%%#${c3}*++${c1}%######%${c3}*+*${c1}#%%%#${c2}*****${c1}#%.
${c1}:%#${c2}*****${c1}#%${c3}*=+*${c1}#%%${c3}*++++++*${c1}%%#${c3}*+=*${c1}%#${c2}*****${c1}#%:
${c1}-%#${c2}*****${c1}#%${c3}+====*${c1}%${c3}*++++++++*${c1}%#${c3}====+${c1}%#${c2}******${c1}%-
${c1}-%#${c2}*****${c1}#%${c3}+====*${c1}%${c3}*++++++++*${c1}%#${c3}====+${c1}%#${c2}******${c1}%=
${c1}:%#${c2}*****${c1}#%${c3}*=+*${c1}#%%${c3}*++++++*${c1}%%#${c3}*+=*${c1}%#${c2}*****${c1}#%-
${c1}.##${c2}*****${c1}#%%%#${c3}*+*${c1}%######%${c3}*+*${c1}#%%%#${c2}*****${c1}#%:
${c1}.##${c2}**${c1}#%%#%#${c3}====+++${c1}%%${c3}+++====${c1}#%#%%#${c2}#*${c1}##.
${c1}*%%#${c2}****${c1}%#${c3}+=====${c1}%%${c3}=====+${c1}#%${c2}****${c1}#%%*
${c1}+%${c2}******${c1}%%#####%%#####%%${c2}******${c1}%*
${c1}-%${c2}************${c1}%%${c2}************${c1}%=
${c1}:%${c2}#**********${c1}%%${c2}**********#${c1}%-
${c1}:%${c2}#*********${c1}%%${c2}*********#${c1}%:
${c1}.======================.
${c1}:%#${c2}*****${c1}#%${c3}*=+*${c1}#%%${c3}*++++++*${c1}%%#${c3}*+=*${c1}%#${c2}*****${c1}#%-
${c1}.##${c2}*****${c1}#%%%#${c3}*+*${c1}%######%${c3}*+*${c1}#%%%#${c2}*****${c1}#%:
${c1}.##${c2}**${c1}#%%#%#${c3}====+++${c1}%%${c3}+++====${c1}#%#%%#${c2}#*${c1}##.
${c1}*%%#${c2}****${c1}%#${c3}+=====${c1}%%${c3}=====+${c1}#%${c2}****${c1}#%%*
${c1}+%${c2}******${c1}%%#####%%#####%%${c2}******${c1}%*
${c1}-%${c2}************${c1}%%${c2}************${c1}%=
${c1}:%${c2}#**********${c1}%%${c2}**********#${c1}%-
${c1}:%${c2}#*********${c1}%%${c2}*********#${c1}%:
${c1}.======================.
EOF
;;
@@ -13690,24 +13723,51 @@ EOF
"RhaymOS"*)
set_colors 1
read -rd '' ascii_data <<'EOF'
${c1}
###
#####
####### /########
############# ###########
,########### #### ####(..
#### #### ####* ##########
${c1}
###
#####
####### /########
############# ###########
,########### #### ####(..
#### #### ####* ##########
#### ##### ##### (####
#### ########### ###########
#### ######### ##########
###################################
#####################################
#### ########### ###########
#### ######### ##########
###################################
#####################################
#######################################
EOF
;;
"Rhino Linux"*)
set_colors 5 4
read -rd '' ascii_data <<'EOF'
${c1}
${c1} ..','.. l.
.,coooooooooc,..ool
;oooooooooooooooooooo.,coo.
;oooooooooooooooooooooooooo ,
.ooooooooooooooooooooooooooo . ,o
oollcccccccccllloooooooooooolcoo..oo
ll;':::::::::::::::ccloooooooooooooo:
.;''';::::::::::::::::::ccloooooooooo
''''',:::::::::::::::::::::::cclllllc
'''''';::::::::::::::::::::::::::::::
${c1}.'''''';::::::::::::::::${c2}ll${c1}:::::::::::
${c1} ''''''';:::::::::::::::${c2}d0${c1}::
${c1}.''''''',;:::::::${c2}cc${c1}::::${c2}0N:'
${c1}''''''''',,;::::${c2}cK${c1}:::${c2}dMX,
${c1}'''''''''''',,,${c2}dMccOMM${c1}:
${c1}.''''''''''''${c2}cWM0WMM${c1}.
${c1}'''''''':${c2}kMMMMM${c1}.
${c2}odxONMMMM
;Kl
EOF
;;
"rocky_small"*)
set_colors 2
read -rd '' ascii_data <<'EOF'
@@ -14986,29 +15046,29 @@ oss${c2}yNMMMNyMMh${c1}sssssssssssssshmmmh${c1}ssssssso
.-\+oossssoo+/-.
EOF
;;
"Floflis"*)
set_colors 1 7 3
read -rd '' ascii_data <<'EOF'
\e[96m ,▄▄▄▌▓▓███▓▓▌▄▄▄,
,▄▒▓███████████████████▓▄▄
▄▓███████████████████████████▌
▓███████████████████████████████
, ╙▓████████████████████████████▀ ▄
╓█▓▄ ╙▀▓████████████████████▀▀` ,▄██▓
╓█████▌▄, '▀▀▀▀▓▓▓▓▓▓▀▀Å╙` ▄▄▓█████▌
\e[96m ,▄▄▄▌▓▓███▓▓▌▄▄▄,
,▄▒▓███████████████████▓▄▄
▄▓███████████████████████████▌
▓███████████████████████████████
, ╙▓████████████████████████████▀ ▄
╓█▓▄ ╙▀▓████████████████████▀▀` ,▄██▓
╓█████▌▄, '▀▀▀▀▓▓▓▓▓▓▀▀Å╙` ▄▄▓█████▌
██████████▓▌▄ , ▄▓███████████▄
╢████████████▓ ║████▓▓███▌ ╣█████████████▓
▓█████████████ ▐█████████▀ ▓██████████████
▓█████████████ ▐█████████▄ ███████████████
▀████████████▌ ║█████████▌ ▀█████████████▌
████████████M ▓██████████ ▐█████████████⌐
▀██████████▌ ▐███████████▌ ▀███████████▌
╙▓█████▓ ▓██████████████▄ ▀███████▀
╝▓██▀ ╓▓████████████████▓ ▀▓██▀
,▄████████████████████▌,
╝▀████████████████████▓▀'
`╙▀▀▓▓███████▓▀▀╩'
▀██████████▌ ▐███████████▌ ▀███████████▌
╙▓█████▓ ▓██████████████▄ ▀███████▀
╝▓██▀ ╓▓████████████████▓ ▀▓██▀
,▄████████████████████▌,
╝▀████████████████████▓▀'
`╙▀▀▓▓███████▓▀▀╩'
EOF
;;
@@ -15174,26 +15234,26 @@ EOF
set_colors 12 12 7 12 4
read -rd '' ascii_data <<'EOF'
${c3} :${c4}:::::::::::::: ${c5}.
${c3}=#${c4}*============. ${c5}:#:
${c3}=##%${c4}+----------. ${c5}.###:
${c3}=####. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=###*. .=${c4}--------. ${c5}####:
${c3}=####. .*#+${c4}======- ${c5}####:
${c3}=###*. .*###+${c4}====- ${c5}####:
${c3}=###*. .*#####+${c4}==- ${c5}####:
${c3}=###*. .*#######+${c4}: ${c5}####:
${c3}=###*. .*#######+${c4}: ${c5}####:
${c3}=###*. .*#####+${c4}==- ${c5}####:
${c3}=###*. .*###+${c4}====- ${c5}####:
${c3}=####. .*#+${c4}======- ${c5}####:
${c3}=###*. .=${c4}--------. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=###+${c4}--------------${c5}####:
${c3}=#+${c4}=================-${c5}:
${c3}:${c4}::::::::::::::::::.
${c3}=#${c4}*============. ${c5}:#:
${c3}=##%${c4}+----------. ${c5}.###:
${c3}=####. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=###*. .=${c4}--------. ${c5}####:
${c3}=####. .*#+${c4}======- ${c5}####:
${c3}=###*. .*###+${c4}====- ${c5}####:
${c3}=###*. .*#####+${c4}==- ${c5}####:
${c3}=###*. .*#######+${c4}: ${c5}####:
${c3}=###*. .*#######+${c4}: ${c5}####:
${c3}=###*. .*#####+${c4}==- ${c5}####:
${c3}=###*. .*###+${c4}====- ${c5}####:
${c3}=####. .*#+${c4}======- ${c5}####:
${c3}=###*. .=${c4}--------. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=####. ${c5}.####:
${c3}=###+${c4}--------------${c5}####:
${c3}=#+${c4}=================-${c5}:
${c3}:${c4}::::::::::::::::::.
EOF
;;
@@ -15219,25 +15279,25 @@ EOF
set_colors 8 4
read -rd '' ascii_data <<'EOF'
${c1}
`-`
-yys+/-`
`oyyyyy: /osyyyyso+:.
/yyyyy+`+yyyyyyyyyys/.
.-yyyyys.:+//+oyyyyyyyo.
`oy/`oyyyyy/ ./syyyyy:
syyys`:yyyyyo` :yyyyy:
/yyyyo .syyyyy- .yyyyy.
yyyyy. +yyyyy/ /yyyy/
`yyyyy :yyyyys` -yyyyo
yyyyy. `syyyyy- /yyyy/
/yyyyo /yyyyy+ .yyyyy.
syyyys. -yyyyys.:yyyy:
`oyyyyyo-` `oyyyyy:.sy:
:syyyyyyso+/++`/yyyyyo``
-oyyyyyyyyyyy-.syyyys.
-/+osyyyyso.`+yyyyy/
.-/+syo`
`.
`-`
-yys+/-`
`oyyyyy: /osyyyyso+:.
/yyyyy+`+yyyyyyyyyys/.
.-yyyyys.:+//+oyyyyyyyo.
`oy/`oyyyyy/ ./syyyyy:
syyys`:yyyyyo` :yyyyy:
/yyyyo .syyyyy- .yyyyy.
yyyyy. +yyyyy/ /yyyy/
`yyyyy :yyyyys` -yyyyo
yyyyy. `syyyyy- /yyyy/
/yyyyo /yyyyy+ .yyyyy.
syyyys. -yyyyys.:yyyy:
`oyyyyyo-` `oyyyyy:.sy:
:syyyyyyso+/++`/yyyyyo``
-oyyyyyyyyyyy-.syyyys.
-/+osyyyyso.`+yyyyy/
.-/+syo`
`.
EOF
;;
@@ -15738,21 +15798,21 @@ EOF
set_colors 4 7
read -rd '' ascii_data <<'EOF'
${c1}
. .:. . .:.
.^^.!.:::. .^!?J?^
.:^.^!!!~:~^. .7??77!~~^.
.~^.!??77?!.^~: ..:^^7JJJ7~~^.
.^~.^7???7~.~~. .7??????????!
.:^:^^~^^:!^ ^: .......^!:...
.!7~.::.!.::. ~BG~ :^ ^~:
:!!~ ~. ?BBBB! ^?J!. .!~.
:!. .JBY. .Y#BBBY?~!???J7. :^^.
.. :5#B#P~P#BBP?7?55J?J7:
^P#BBBBBBBB5?7J5555J!.....
!BBBBBBGBBGJ77::Y555J?77777^
?BBBBG5JJ5PJ?!: .?Y??????77?~.
.YBGPYJ??????Y?^^^^~7?????????7?!.
.^^:..::::::::.....:::::::::::..:.
. .:. . .:.
.^^.!.:::. .^!?J?^
.:^.^!!!~:~^. .7??77!~~^.
.~^.!??77?!.^~: ..:^^7JJJ7~~^.
.^~.^7???7~.~~. .7??????????!
.:^:^^~^^:!^ ^: .......^!:...
.!7~.::.!.::. ~BG~ :^ ^~:
:!!~ ~. ?BBBB! ^?J!. .!~.
:!. .JBY. .Y#BBBY?~!???J7. :^^.
.. :5#B#P~P#BBP?7?55J?J7:
^P#BBBBBBBB5?7J5555J!.....
!BBBBBBGBBGJ77::Y555J?77777^
?BBBBG5JJ5PJ?!: .?Y??????77?~.
.YBGPYJ??????Y?^^^^~7?????????7?!.
.^^:..::::::::.....:::::::::::..:.
EOF
;;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "neowofetch",
"version": "1.99.0",
"version": "2.0.2",
"description": "Updated neofetch",
"repository": {
"type": "git",
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# This script does some file path magic to make cargo publish work without having
# to have neofetch & font logos in the cargo root.
# ...okay basically it copies these files over before publishing.
set -euo pipefail
# Get the directory of SRC root which is ../ from this script
SRC_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CARGO_ROOT="$SRC_ROOT/crates/hyfetch"
# Copy neofetch from here to cargo root
cp "$SRC_ROOT/neofetch" "$CARGO_ROOT/"
mkdir -p "$CARGO_ROOT/hyfetch"
cp -r "$SRC_ROOT/hyfetch/data" "$CARGO_ROOT/hyfetch/"
# Build the crate
cargo publish -p hyfetch --allow-dirty "$@"
# Delete the copied files
rm "$CARGO_ROOT/neofetch"
rm -rf "$CARGO_ROOT/hyfetch"
echo "Done!"
+20 -4
View File
@@ -51,8 +51,15 @@ def edit_versions(version: str):
path = Path('hyfetch/__version__.py')
content = [f"VERSION = '{version}'" if l.startswith('VERSION = ') else l for l in path.read_text().split('\n')]
path.write_text('\n'.join(content))
# 3. Cargo.toml
print('Editing Cargo.toml...')
path = Path('Cargo.toml')
content = path.read_text()
content = re.sub(r'(?<=^version = ")[^"]+(?="$)', version, content, flags=re.MULTILINE)
path.write_text(content)
# 3. README.md
# 4. README.md
print('Editing README.md...')
path = Path('README.md')
content = path.read_text()
@@ -61,7 +68,7 @@ def edit_versions(version: str):
content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:]
path.write_text(content)
# 4. neofetch script
# 5. neofetch script
print('Editing neofetch...')
path = Path('neofetch')
lines = path.read_text().replace("\t", " ").split('\n')
@@ -93,7 +100,7 @@ def finalize_neofetch():
# 2. Regenerate man page
print('Regenerating neofetch man page...')
Path('docs/neofetch.1').write_text(subprocess.check_output(['help2man', './neofetch']).decode())
Path('docs/hyfetch.1').write_text(subprocess.check_output(['help2man', 'python3 -m hyfetch']).decode())
Path('docs/hyfetch.1').write_text(subprocess.check_output(['help2man', 'cargo run --']).decode())
# 3. Reformat readme links
print('Reformatting readme links...')
@@ -125,7 +132,12 @@ def create_release(v: str):
subprocess.check_call(['git', 'tag', f'neofetch-{NEOFETCH_NEW_VERSION}'])
i = input('Please check the commit is correct. Press y to continue or any other key to cancel.')
assert i == 'y'
if i.lower() != 'y':
print('Aborting...')
subprocess.check_call(['git', 'reset', '--hard', 'HEAD~1'])
subprocess.check_call(['git', 'tag', '-d', v])
subprocess.check_call(['git', 'tag', '-d', f'neofetch-{NEOFETCH_NEW_VERSION}'])
exit(1)
# 4. Push
print('Pushing commits...')
@@ -140,6 +152,10 @@ def deploy():
print('Deploying to pypi...')
subprocess.check_call(['bash', 'tools/deploy.sh'])
print('Done!')
print('Deploying to crates.io...')
subprocess.check_call(['bash', 'tools/deploy-crate.sh'])
print('Done!')
print('Deploying to npm...')
otp = input('Please provide 2FA OTP for NPM: ')