From 404c955e8f3bc8d0130c96a23c9399a70aa9dff6 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 9 Mar 2016 22:43:52 +1100 Subject: [PATCH] Added support for Alpine Linux --- README.md | 1 + ascii/distro/alpine | 19 +++++++++++++++++++ neofetch | 7 +++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 ascii/distro/alpine diff --git a/README.md b/README.md index 28fe9c8a..6eb47894 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ your distro's logo or any ascii art of your choice! ### Required dependencies: - `Bash 3.0+` + - Alpine Linux: You also need `ncurses`. - `xprop` \[1\] - `procps-ng` - Not required on OS X diff --git a/ascii/distro/alpine b/ascii/distro/alpine new file mode 100644 index 00000000..ce7524d2 --- /dev/null +++ b/ascii/distro/alpine @@ -0,0 +1,19 @@ +"\ +${c1} \`---------------------\` + \`-----------------------\` + .-------------------------. + .---------------------------. + \`-----------..------------------\` +\`----------.\` \`.----\`\`-----------\` +---------.\` \`.. \`.--------- +-------.\` \`..\` \`\`\` \`.------- +-----.\` \`.----.\` \`..\` \`.----- +---.\` \`.\` ------.\` \`..\` \`.--- +---..\`..--.\`--------.\`\`..--.\`\`.---- +\`---------------------------------\` + \`-------------------------------\` + .---------------------------. + .-------------------------. + \`-----------------------\` + \`---------------------\` +" diff --git a/neofetch b/neofetch index ed3fa814..deb9f34b 100755 --- a/neofetch +++ b/neofetch @@ -494,7 +494,7 @@ getuptime () { case "$os" in "Linux") case "$distro" in - "Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"*) + "Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "Alpine Linux"*) uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}') uptime=${uptime/ / } ;; @@ -618,6 +618,9 @@ getpackages () { elif type -p nix-env >/dev/null 2>&1; then packages="$(ls -d -1 /nix/store/*/ | wc -l)" + elif type -p apk >/dev/null 2>&1; then + packages="$(apk info | wc -l)" + elif type -p pacman-g2 >/dev/null 2>&1; then packages="$(pacman-g2 -Q | wc -l)" @@ -2035,7 +2038,7 @@ colors () { setcolors 3 2 4 5 7 ;; - "CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"*) + "CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"* | "Alpine"*) setcolors 4 5 7 ;;