#!/bin/sh ## Created by Amdac @ www.amdac.net ## Package count is specific to Void Linux. ## The "de" field is currently static text. ## It's unlikely that "wm" will work with other window managers as grep would likely return multiple results. ## VARIABLES ## bold=$(tput bold) norm=$(tput sgr0) color00=$(tput setaf 0) # Black - Regular color01=$(tput setaf 1) # Red color02=$(tput setaf 2) # Green color03=$(tput setaf 3) # Yellow color04=$(tput setaf 4) # Blue color05=$(tput setaf 5) # Purple color06=$(tput setaf 6) # Cyan color07=$(tput setaf 7) # White color08=$(tput setaf 8) # Black - Bold color09=$(tput setaf 9) # Red color10=$(tput setaf 10) # Green color11=$(tput setaf 11) # Yellow color12=$(tput setaf 12) # Blue color13=$(tput setaf 13) # Purple color14=$(tput setaf 14) # Cyan color15=$(tput setaf 15) # White mem=$(free -m | awk '/^Mem:/ {print $3 " MiB / " $2 " MiB"}') distro=$(lsb_release -a | grep 'Description' | sed 's/Description:\s*//g') kernel=$(uname -r -o) wm=$(ps -e | grep wm | awk '{print $4}') packages=$(xbps-query -l | wc -l) proc=$(grep "model name" /proc/cpuinfo | sed "s/0*.*: //;1q") ## SCRIPT ## echo "\n${color08}${bold}SYSTEM:${norm}" # echo -e "|-- ${bold}hostname:${norm} \t$(hostname)" echo "${color08}|-- ${bold}distro:${norm} \t${distro}" echo "${color08}|-- ${bold}kernel:${norm} \t${kernel}" echo "${color08}|-- ${bold}shell:${norm} \t${SHELL}" echo "${color08}|-- ${bold}proc:${norm} \t${proc}" echo "${color08}|-- ${bold}de:${norm} \tnone" echo "${color08}|-- ${bold}wm:${norm} \t${wm}" echo "${color08}|-- ${bold}packages:${norm} \t${packages} (xbps-query)" echo "${color08}|-- ${bold}memory:${norm} \t${mem}" echo "${color08}'-- ${bold}theme:${norm} \t${color00}@ ${color01}@ ${color02}@ ${color03}@ ${color04}@ ${color05}@ ${color06}@ ${color07}@ ${norm}" echo " \t\t${color08}@ ${color09}@ ${color10}@ ${color11}@ ${color12}@ ${color13}@ ${color14}@ ${color15}@ ${norm}\n"