From f88afa36c8db8f8712b70d69b4d38758796fb43a Mon Sep 17 00:00:00 2001 From: jsch Date: Sat, 23 May 2015 22:12:31 -0500 Subject: [PATCH] Add ufetch-gentoo. --- README.md | 7 ++++--- ufetch-gentoo | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100755 ufetch-gentoo diff --git a/README.md b/README.md index 7b769d6..682f475 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # ufetch -Tiny system info for CRUX and Arch Linux. +Tiny system info for CRUX, Arch Linux, and Gentoo. -![](http://a.pomf.se/wyaxfq.png) -![](http://a.pomf.se/mjtmkr.png) +![](http://a.pomf.se/plynqn.png) +![](http://a.pomf.se/bdfdub.png) +![](http://a.pomf.se/icdecv.png) diff --git a/ufetch-gentoo b/ufetch-gentoo new file mode 100755 index 0000000..3ec9538 --- /dev/null +++ b/ufetch-gentoo @@ -0,0 +1,49 @@ +#!/bin/sh +# +# ufetch-gentoo - tiny system info for gentoo +# + +## INFO + +# user is already defined +HOST="$(hostname)" +OS='Gentoo Linux' +KERNEL="$(uname -sr)" +UPTIME="$(uptime -p | sed s:'up ':'':)" +PACKAGES="$(ls -d /var/db/pkg/*/* | wc -l)" +# shell is already defined +WM=$(tail -n 1 "$HOME/.xinitrc" | cut -d ' ' -f2) + +## DEFINE COLORS + +rc=$(tput sgr0) # reset +c0=$(tput setaf 0) # black +c1=$(tput setaf 1) # red +c2=$(tput setaf 2) # green +c3=$(tput setaf 3) # yellow +c4=$(tput setaf 4) # blue +c5=$(tput setaf 5) # magenta +c6=$(tput setaf 6) # cyan +c7=$(tput setaf 7) # white +bc=$(tput bold) # bold + +# you can change these +lc=${bc}${c5} # labels +nc=${bc}${c5} # user and hostname +tc=${bc}${c7} # text +fc=${bc}${c5} # first color +sc=${c5} # second color + +## OUTPUT + +cat <