syscat - scripts - various script and utils
HTML git clone git://z3bra.org/scripts
DIR Log
DIR Files
DIR Refs
---
syscat (573B)
---
1 #!/bin/sh
2
3 COLOR=${COLOR:-7}
4
5 c() { printf '[1;3%sm' "$COLOR"; }
6 d() { printf '[0;3%sm' "$COLOR"; }
7 n() { printf '[0m'; }
8
9 osname() {
10 if type crux >/dev/null; then
11 crux
12 elif [ -f /etc/os-release ]; then
13 . /etc/os-release
14 echo $ID $VERSION_ID
15 fi
16 }
17
18 cat <<EOF
19 $(c)SYSTEM $(d)$(osname)
20 $(c)KERNEL $(d)$(uname -r)
21 $(c)HOSTNAME $(d)$(hostname)
22 $(c)WMNAME $(d)$XDG_SESSION_DESKTOP
23 $(c)TERM $(d)$TERM
24 $(c)SHELL $(d)$SHELL
25 $(c)PKG $(d)$(pm -i|wc -l)
26 $(c)PROC $(d)$(cpu -p)
27 $(c)MEMORY $(d)$(memory -p) ($(SCALE=1 human `memory -u`))
28 EOF