scripts/scripts/icyinfo.sh (view raw)
1#!/bin/bash
2
3# a system info script written by yours truly
4# it's hardcoded stuff, lulz
5
6red="\e[31m"
7grn="\e[32m"
8ylw="\e[33m"
9cyn="\e[36m"
10blu="\e[34m"
11prp="\e[35m"
12bprp="\e[35;1m"
13rst="\e[0m"
14
15echo
16
17color-echo()
18{ # print with colors
19 echo -e " $cyn$1: $rst$2"
20}
21
22# kernel
23color-echo 'kernel' "$(uname -smr)"
24
25# uptime
26up=$(</proc/uptime)
27up=${up//.*} # string before first . is seconds
28days=$((${up}/86400)) # seconds divided by 86400 is days
29hours=$((${up}/3600%24)) # seconds divided by 3600 mod 24 is hours
30mins=$((${up}/60%60)) # seconds divided by 60 mod 60 is mins
31color-echo "uptime" $days'd '$hours'h '$mins'm'
32
33# shell
34color-echo 'shell' 'zsh'
35
36# wm
37color-echo 'wm' 'GNOME Shell'
38
39# distro
40color-echo 'distro' 'Arch Linux'
41
42# ascii art
43echo ""
44echo " /\ /\ "
45echo " \^ ^/ i c y p h o x "
46echo " \_/ "
47echo ""
48
49# colors
50echo -e " $red▓▓$rst $grn▓▓$rst $blu▓▓$rst $ylw▓▓$rst $cyn▓▓$rst $prp▓▓$rst $bprp▓▓$rst"
51
52echo
53echo