#!/bin/sh ## Created by Amdac @ www.amdac.net ## This version is specific to OpenBSD. ## The "wm" field is currently static text. ## 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=$(top -d 1 | awk '/^Memory/ {print $3}' | sed 's/M\/.*//') memtotal=$(expr $(sysctl -n hw.physmem) / 1024 / 1024) os=$(uname -rs) snapshot="$(sysctl -n kern.version | sed '2,3d ; s/.*: //')" wm="bspwm" packages_total=$(pkg_info | wc -l | sed 's/.* //') packages_manual=$(pkg_info -m | wc -l | sed -E 's/[[:space:]]+//') proc=$(sysctl -n hw.model) hardware=$(sysctl -n hw.version) ## SCRIPT ## echo " " echo "${color11} ${color12}${bold}OS:${norm} \t\t${os}" echo "${color11} _____ ${color12}${bold}SNAPSHOT:${norm} \t${snapshot}" echo "${color11} \- -/ ${color12}${bold}HARDWARE:${norm} \t${hardware}" echo "${color11} \_/ \ ${color12}${bold}PROC:${norm} \t${proc}" echo "${color11} | O O | ${color12}${bold}SHELL:${norm} \t${SHELL}" echo "${color11} |_ < ) 3 ) ${color12}${bold}WM:${norm} \t\t${wm}" echo "${color11} / \ / ${color12}${bold}PACKAGES:${norm} \t${packages_manual} manual (${packages_total} total)" echo "${color11} /-_____-\ ${color12}${bold}MEMORY:${norm} \t${mem} MB / ${memtotal} MB" echo "${color11} ${color12}${bold}THEME:${norm} \t${color00}@ ${color01}@ ${color02}@ ${color03}@ ${color04}@ ${color05}@ ${color06}@ ${color07}@ ${norm}" echo "${color11} \t\t${color08}@ ${color09}@ ${color10}@ ${color11}@ ${color12}@ ${color13}@ ${color14}@ ${color15}@ ${norm}" echo " "