Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
041a1459
Unverified
Commit
041a1459
authored
Jan 08, 2019
by
Dylan Araps
Committed by
GitHub
Jan 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1154 from dylanaraps/bedrock2
Bedrock Linux support
parents
a450fc88
fbb69625
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
10 deletions
+54
-10
neofetch
neofetch
+54
-10
No files found.
neofetch
View file @
041a1459
...
@@ -829,7 +829,12 @@ get_distro() {
...
@@ -829,7 +829,12 @@ get_distro() {
case "$os" in
case "$os" in
"Linux" | "BSD" | "MINIX")
"Linux" | "BSD" | "MINIX")
if [[ -f "/etc/redstar-release" ]]; then
if [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]]; then
case "$distro_shorthand" in
"on" | "tiny") distro="Bedrock Linux" ;;
*) distro="$(< /bedrock/etc/bedrock-release)"
esac
elif [[ -f "/etc/redstar-release" ]]; then
case "$distro_shorthand" in
case "$distro_shorthand" in
"on" | "tiny") distro="Red Star OS" ;;
"on" | "tiny") distro="Red Star OS" ;;
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
...
@@ -1272,6 +1277,16 @@ get_packages() {
...
@@ -1272,6 +1277,16 @@ get_packages() {
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
# Redefine tot() for Bedrock Linux.
[[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && {
tot() {
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done)
((packages+="${#pkgs[@]}"))
pac "${#pkgs[@]}"
}
br_prefix="/bedrock/strata/*"
}
case "$os" in
case "$os" in
"Linux" | "BSD" | "iPhone OS" | "Solaris")
"Linux" | "BSD" | "iPhone OS" | "Solaris")
# Package Manager Programs.
# Package Manager Programs.
...
@@ -1291,15 +1306,20 @@ get_packages() {
...
@@ -1291,15 +1306,20 @@ get_packages() {
has "butch" && tot butch list
has "butch" && tot butch list
# Counting files/dirs.
# Counting files/dirs.
has "emerge" && dir /var/db/pkg/*/*/
# Variables need to be unquoted here. Only Bedrock Linux is affected.
has "nix-env" && dir /nix/store/*/
# $br_prefix is fixed and won't change based on user input so this is safe either way.
has "guix" && dir /gnu/store/*/
# shellcheck disable=SC2086
has "Compile" && dir /Programs/*/
{
has "eopkg" && dir /var/lib/eopkg/package/*
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
has "crew" && dir /usr/local/etc/crew/meta/*.filelist
has "nix-env" && dir ${br_prefix}/nix/store/*/
has "pkgtool" && dir /var/log/packages/*
has "guix" && dir ${br_prefix}/gnu/store/*/
has "cave" && dir /var/db/paludis/repositories/cross-installed/*/data/*/ \
has "Compile" && dir ${br_prefix}/Programs/*/
/var/db/paludis/repositories/installed/data/*/
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
has "pkgtool" && dir ${br_prefix}/var/log/packages/*
has "cave" && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
${br_prefix}/var/db/paludis/repositories/installed/data/*/
}
# Other (Needs complex command)
# Other (Needs complex command)
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
...
@@ -3421,6 +3441,7 @@ get_ascii() {
...
@@ -3421,6 +3441,7 @@ get_ascii() {
# Calculate size of ascii file in line length / line count.
# Calculate size of ascii file in line length / line count.
while IFS=$'\n' read -r line; do
while IFS=$'\n' read -r line; do
line="${line//\\\\/\\}"
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
done <<< "${ascii_data//\$\{??\}}"
done <<< "${ascii_data//\$\{??\}}"
...
@@ -5222,6 +5243,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
...
@@ -5222,6 +5243,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
EOF
EOF
;;
;;
"Bedrock"*)
set_colors 0 7
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}------
--------------------------------------
--------------------------------------
--------------------------------------
EOF
;;
"Bitrig"*)
"Bitrig"*)
set_colors 2 7
set_colors 2 7
read -rd '' ascii_data <<'EOF'
read -rd '' ascii_data <<'EOF'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment