diff options
author | Antoni Kepinski | 2018-10-09 22:06:52 +0200 |
---|---|---|
committer | Antoni Kepinski | 2018-10-09 22:06:52 +0200 |
commit | f702ed58994c782bdae3124b57881b7c92f2411f (patch) | |
tree | 0247a5ec8efd7406ab9a874268c1d71780c7592d | |
parent | 4a3e251b1ba9e734665d638106f66d180e523119 (diff) | |
download | aur-f702ed58994c782bdae3124b57881b7c92f2411f.tar.gz |
1.0.7
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | archfetch | 42 |
3 files changed, 29 insertions, 26 deletions
@@ -1,7 +1,7 @@ pkgbase = archfetch pkgdesc = Simple CLI system information tool for Arch Linux. - pkgver = 1.0.6 - pkgrel = 4 + pkgver = 1.0.7 + pkgrel = 5 url = https://github.com/xxczaki/archfetch/ arch = i686 arch = x86_64 @@ -1,7 +1,7 @@ -# Maintainer: Antoni Kepinski <hello[at]akepinski[dot]me> +# Maintainer: Antoni Kepinski <a[at]kepinski[dot]me> pkgname=archfetch -pkgver=1.0.6 -pkgrel=4 +pkgver=1.0.7 +pkgrel=5 pkgdesc="Simple CLI system information tool for Arch Linux." url="https://github.com/xxczaki/archfetch/" arch=('i686' 'x86_64') @@ -10,7 +10,7 @@ makedepends=('git') _gitroot="git://github.com/xxczaki/archfetch.git" _gitname="archfetch" -package() { +package() { cd "${PKGMK_SOURCE_DIR}" if cd "${pkgname}"; then @@ -22,4 +22,5 @@ package() { fi sudo install -Dm755 archfetch "${PKG}/usr/bin/archfetch" + echo 'archfetch successfully installed!' } diff --git a/archfetch b/archfetch index c99900c71728..4678b37c029b 100644 --- a/archfetch +++ b/archfetch @@ -1,6 +1,5 @@ - #!/bin/sh -# + # 88 ad88 88 # 88 d8" ,d 88 # 88 88 88 88 @@ -14,19 +13,21 @@ ## Basic Configuration +user="$(whoami || printf "%s" "${HOME/*\/}")" hostname="$(hostname)" os='Arch Linux' kernel="$(uname -sr)" +gpu="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \ '/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a){if(!seen[a[i]]++) print a[i]}}' | cut -d "[" -f2 | cut -d "]" -f1)" +cpu="$(awk -F ':' '/model name/\ + {printf $2; exit}' "/proc/cpuinfo" +)" uptime="$(uptime -p | sed 's/up //')" packages="$(pacman -Q | wc -l)" shell="$(basename ${SHELL})" -if [ -z "${WM}" ]; then - WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" -fi ## Basic Colors -bc="$(tput bold)" # bold +bc="$(tput bold)" # bold c0="$(tput setaf 0)" # black c1="$(tput setaf 1)" # red c2="$(tput setaf 2)" # green @@ -35,26 +36,27 @@ c4="$(tput setaf 4)" # blue c5="$(tput setaf 5)" # magenta c6="$(tput setaf 6)" # cyan c7="$(tput setaf 7)" # white -rc="$(tput sgr0)" # reset +rc="$(tput sgr0)" # reset ## Color Configuration -lc="${rc}${bc}${c6}" # labels -nc="${rc}${bc}${c6}" # user and hostname -ic="${rc}${bc}${c7}" # info -fc="${rc}${bc}${c6}" # first color -sc="${rc}${c6}" # second color +lc="${rc}${bc}${c6}" # Labels +nc="${rc}${bc}${c3}" # User and hostname +ic="${rc}${bc}${c7}" # Info +fc="${rc}${bc}${c6}" # First color +sc="${rc}${c6}" # Second color ## Generate & Present the output cat <<EOF -${fc} /\ ${nc}${USER}${ic}@${nc}${hostname}${rc} -${fc} /^^\ ${lc}OS: ${ic}${os}${rc} -${fc} /\ \ ${lc}KERNEL: ${ic}${kernel}${rc} -${fc} / ${sc}__ \ ${lc}UPTIME: ${ic}${uptime}${rc} -${sc} / ( ) \ ${lc}PACKAGES: ${ic}${packages}${rc} -${sc} / __| |__\\\\ ${lc}SHELL: ${ic}${shell}${rc} -${sc} /// \\\\\ ${lc}WM: ${ic}${WM}${rc} +${pc} ___${rc} ${nc}${user}${ic}@${nc}${hostname}${rc} +${pc} (${rc}${c7}.ยท${rc} ${pc}|${rc} ${lc}OS: ${ic}${os}${rc} +${pc} (${rc}${c3}<>${rc} ${pc}|${rc} ${lc}KERNEL: ${ic}${kernel}${rc} +${pc} /${rc} ${c7}__${rc} ${pc}\\${rc} ${lc}UPTIME: ${ic}${uptime}${rc} +${pc} (${rc} ${c7}/ \\${rc} ${pc}/|${rc} ${lc}PACKAGES: ${ic}${packages}${rc} +${c3} _${pc}/\\${rc} ${c7}__)${rc}${pc}/${rc}${c3}_${rc}${pc})${rc} ${lc}SHELL: ${ic}${shell}${rc} +${c3} \/${pc}-____${rc}${c3}\/${rc} ${lc}CPU: ${ic}${cpu}${rc} +${c3} ${lc}GPU: ${ic}${gpu}${rc} + EOF - |