#!/usr/bin/env bash # sysfetch # Thanks to u/x_ero for his sysinfo script # Modified by gh0stzk https://github.com/gh0stzk/dotfiles # color escapes CBK=$(tput setaf 0) CRE=$(tput setaf 1) CGR=$(tput setaf 2) CYE=$(tput setaf 3) CBL=$(tput setaf 4) CMA=$(tput setaf 5) CCY=$(tput setaf 6) CWH=$(tput setaf 7) CBD=$(tput bold) CNC=$(tput sgr0) # vars FULL=━ EMPTY=━ name=$USER host=$(uname -n) distro=$(uname -o | awk -F '"' '/PRETTY_NAME/ { print $2 }' /etc/os-release) packages=$(pacman -Q | wc -l) wm=$(xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \") storage=$(df -h --output=used / | awk 'NR == 2 { print $1 }') term=$(ps -o sid= -p "$$" | xargs ps -o ppid= -p | xargs ps -o comm= -p) uptm=$(uptime -p | sed -e 's/hour/hr/' -e 's/hours/hrs/' -e 's/minutes/mins/' -e 's/minute/min/' -e 's/up //') #Cleanup first clear # find the center of the screen COL=$(tput cols) ROW=$(tput lines) ((PADY = ROW / 2 - 10 - 22 / 2)) ((PADX = COL / 2 - 34 / 2)) for ((i = 0; i < PADX; ++i)); do PADC="$PADC " done for ((i = 0; i < PADY; ++i)); do PADR="$PADR\n" done # vertical padding printf "%b" "$PADR" printf "\n" PADXX=$((PADX - 3)) for ((i = 0; i < PADXX; ++i)); do PADCC="$PADCC " done # Ascii art arms cat <