scripts

various script and utils
git clone git://z3bra.org/scripts
Log | Files | Refs

commit 279c05b3e748cc153307be439d86c011f7a9ec26
parent 0ece8960690d65022b65c79e7acd33df1d07cde6
Author: z3bra <willy@mailoo.org>
Date:   Fri Nov 28 12:34:12 +0100

simplified syscat and changed default color

Diffstat:
syscat | 21++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/syscat b/syscat @@ -1,16 +1,9 @@ #!/bin/sh -COLOR=${COLOR:-15} +COLOR=${COLOR:-1} -c() { tput setaf $COLOR; } -d() { tput sgr0; } - -gitdir=http://git.z3bra.org -myblog=http://blog.z3bra.org - -system() { - sed "/^$/d;s/\s*[\(\\]\+.*$//" /etc/issue -} +c() { printf '\e[1;3%sm' "$COLOR"; } +d() { printf '\e[0;3%sm' "$COLOR"; } cpuinfo() { sed -n "/model\ name/s/^.*:\ //p" /proc/cpuinfo | sed 1q @@ -25,15 +18,13 @@ fontname() { } cat <<EOF - -$(c)SYSTEM $(d)$(system) +$(c)SYSTEM $(d)$(crux) $(c)KERNEL $(d)$(uname -r) $(c)HOSTNAME $(d)$HOSTNAME $(c)WMNAME $(d)$(wmname) $(c)TERMINAL $(d)$TERM $(c)SHELL $(d)$SHELL $(c)FONT $(d)$(fontname) -$(c)PROC $(d)$(~/bin/cpu -p) -$(c)MEMORY $(d)$(~/bin/memory -u) - +$(c)PROC $(d)$(cpu -p) +$(c)MEMORY $(d)$(memory -u|xargs human) EOF