├── .github └── FUNDING.yml ├── .travis.yml ├── Makefile ├── PKGBUILD ├── LICENSE ├── README.md └── archfetch /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: xxczaki 4 | patreon: akepinski 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | sudo: required 3 | 4 | script: 5 | - rm -rf archfetch && git clone https://github.com/xxczaki/archfetch.git && cd archfetch && chmod +x ./archfetch && ./archfetch && echo 'Done!' 6 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PREFIX ?= /usr 2 | 3 | all: 4 | @echo Run \'make install\' to install archfetch! 5 | 6 | install: 7 | @mkdir -p $(DESTDIR)$(PREFIX)/bin 8 | @cp -p archfetch $(DESTDIR)$(PREFIX)/bin/archfetch 9 | @chmod 755 $(DESTDIR)$(PREFIX)/bin/archfetch 10 | @echo archfetch successfully installed! 11 | 12 | uninstall: 13 | @rm -rf $(DESTDIR)$(PREFIX)/bin/archfetch 14 | @echo archfetch uninstalled! 15 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Antoni Kepinski 2 | pkgname=archfetch 3 | pkgver=1.0.8 4 | pkgrel=6 5 | pkgdesc="Simple CLI system information tool for Arch Linux." 6 | url="https://github.com/xxczaki/archfetch/" 7 | arch=('i686' 'x86_64') 8 | license=('MIT') 9 | makedepends=('git') 10 | _gitroot="git://github.com/xxczaki/archfetch.git" 11 | _gitname="archfetch" 12 | 13 | package() { 14 | cd "${PKGMK_SOURCE_DIR}" 15 | 16 | if cd "${pkgname}"; then 17 | git fetch -q 18 | git reset --hard origin/master 19 | else 20 | git clone ${_gitroot} ${_gitname} 21 | cd "${pkgname}" 22 | fi 23 | 24 | sudo make install 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Antoni Kepinski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Screenshot](https://i.imgur.com/aoNNFmT.png) 2 | 3 | # Archfetch 4 | 5 | [![Build Status](https://travis-ci.org/xxczaki/archfetch.svg?branch=master)](https://travis-ci.org/xxczaki/archfetch) 6 | [![AUR package](https://repology.org/badge/version-for-repo/aur/archfetch.svg)](https://repology.org/metapackage/archfetch) 7 | [![Donate](https://img.shields.io/badge/donate-patreon-yellow.svg)](https://www.patreon.com/akepinski) 8 | 9 | Archfetch is a simple CLI system information tool written in BASH. It displays information about your system, for example kernel version or shell. 10 | 11 | # Install 12 | 13 | Archfetch is available on [AUR](https://aur.archlinux.org/packages/archfetch/), so you can install it using your favourite [helper](https://wiki.archlinux.org/index.php/AUR_helpers#Active). I recommend [yay](https://github.com/Jguer/yay): 14 | 15 | ```bash 16 | $ yay -S archfetch 17 | ``` 18 | 19 | You can also install archfetch manually: 20 | 21 | ```bash 22 | $ git clone https://github.com/xxczaki/archfetch 23 | $ cd archfetch 24 | $ sudo make install 25 | ``` 26 | 27 | # Related 28 | 29 | - [ubufetch](https://github.com/xxczaki/ubufetch) 30 | -------------------------------------------------------------------------------- /archfetch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 88 ad88 88 4 | # 88 d8" ,d 88 5 | # 88 88 88 88 6 | # ,adPPYYba, 8b,dPPYba, ,adPPYba, 88,dPPYba, MM88MMM ,adPPYba, MM88MMM ,adPPYba, 88,dPPYba, 7 | # "" `Y8 88P' "Y8 a8" "" 88P' "8a 88 a8P_____88 88 a8" "" 88P' "8a 8 | # ,adPPPPP88 88 8b 88 88 88 8PP""""""" 88 8b 88 88 9 | # 88, ,88 88 "8a, ,aa 88 88 88 "8b, ,aa 88, "8a, ,aa 88 88 10 | # `"8bbdP"Y8 88 `"Ybbd8"' 88 88 88 `"Ybbd8"' "Y888 `"Ybbd8"' 88 88 11 | # 12 | # 13 | 14 | # Disable unicode. 15 | LC_ALL=C 16 | LANG=C 17 | 18 | # Basic Configuration 19 | user="$(whoami || printf "%s" "${HOME/*\/}")" 20 | hostname="$(hostname)" 21 | os='Arch Linux' 22 | kernel="$(uname -sr)" 23 | 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)" 24 | cpu="$(awk -F ':' '/model name/\ 25 | {printf $2; exit}' "/proc/cpuinfo" 26 | )" 27 | uptime="$(uptime -p | sed 's/up //')" 28 | packages="$(pacman -Q | wc -l)" 29 | shell="$(basename ${SHELL})" 30 | 31 | # Basic Colors 32 | bc="$(tput bold)" # bold 33 | c0="$(tput setaf 0)" # black 34 | c1="$(tput setaf 1)" # red 35 | c2="$(tput setaf 2)" # green 36 | c3="$(tput setaf 3)" # yellow 37 | c4="$(tput setaf 4)" # blue 38 | c5="$(tput setaf 5)" # magenta 39 | c6="$(tput setaf 6)" # cyan 40 | c7="$(tput setaf 7)" # white 41 | rc="$(tput sgr0)" # reset 42 | 43 | # Color Configuration 44 | lc="${rc}${bc}${c6}" # Labels 45 | nc="${rc}${bc}${c3}" # User and hostname 46 | ic="${rc}${bc}${c7}" # Info 47 | fc="${rc}${bc}${c6}" # First color 48 | sc="${rc}${c6}" # Second color 49 | 50 | # Generate & Present the output 51 | cat <${rc} ${pc}|${rc} ${lc}KERNEL: ${ic}${kernel}${rc} 55 | ${pc} /${rc} ${c7}__${rc} ${pc}\\${rc} ${lc}UPTIME: ${ic}${uptime}${rc} 56 | ${pc} (${rc} ${c7}/ \\${rc} ${pc}/|${rc} ${lc}PACKAGES: ${ic}${packages}${rc} 57 | ${c3} _${pc}/\\${rc} ${c7}__)${rc}${pc}/${rc}${c3}_${rc}${pc})${rc} ${lc}SHELL: ${ic}${shell}${rc} 58 | ${c3} \/${pc}-____${rc}${c3}\/${rc} ${lc}CPU: ${ic}${cpu}${rc} 59 | ${c3} ${lc}GPU: ${ic}${gpu}${rc} 60 | 61 | 62 | EOF 63 | --------------------------------------------------------------------------------