Skip to content

Instantly share code, notes, and snippets.

@pavanjadhaw
Created May 7, 2018 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavanjadhaw/20fe74a456b4d8df29903f5a306c4dbc to your computer and use it in GitHub Desktop.
Save pavanjadhaw/20fe74a456b4d8df29903f5a306c4dbc to your computer and use it in GitHub Desktop.
#!/bin/bash
# a system info script written by yours truly
# it's hardcoded stuff, lulz
red="\e[31m"
grn="\e[32m"
ylw="\e[33m"
cyn="\e[36m"
blu="\e[34m"
prp="\e[35m"
bprp="\e[35;1m"
rst="\e[0m"
echo
color-echo()
{ # print with colors
echo -e " $grn$1 $rst$2"
}
# kernel
#color-echo ' kernel' "$(uname -smr)"
# uptime
up=$(</proc/uptime)
up=${up//.*} # string before first . is seconds
days=$((${up}/86400)) # seconds divided by 86400 is days
hours=$((${up}/3600%24)) # seconds divided by 3600 mod 24 is hours
mins=$((${up}/60%60)) # seconds divided by 60 mod 60 is mins
# start
color-echo 'distro ' 'archlinux'
color-echo 'kernel ' 'linux-zen'
color-echo 'shell ' 'zsh'
color-echo 'wm ' 'bspwm'
color-echo 'font ' 'scientificia'
# ascii art
echo
echo -e " |⌐ •_•| Pavan Jadhaw"
# colors
echo
echo -e " $red▪$rst $grn▪$rst $blu▪$rst $ylw▪$rst $cyn▪$rst $prp▪$rst $bprp▪$rst"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment