shell-utils/sys/status

29 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2023-07-15 19:21:25 +00:00
#!/usr/bin/env bash
numlines=$(tput lines)
numcols=$(tput cols)
numcols=$(expr $numcols - 1)
separator_line=$(for i in $(seq 0 $numcols);do printf "%s"═"";done;printf "\n")
/usr/bin/clear
tput cup 0
status=$(/home/gmgauthier/.local/bin/ifcheck)
if=$(echo $status|awk '{print $1}')
ifstatus=$(echo $status|awk '{print $2}')
ifaddr=$(echo $status|awk '{print $3}')
if [[ "${status}" == *"UP"* ]]; then
echo -e " $(/home/gmgauthier/.local/bin/wx)"
echo -e "$(/home/gmgauthier/.local/bin/cecho ICyan Wifi:) ${ifstatus}\t\t $(/home/gmgauthier/.local/bin/cecho ICyan Inet:) $(/home/gmgauthier/.local/bin/netcheck)\t\t\t\t\t $(date +%R)"
else
iface=$(ip -br -o -c address show dev wlp0s20f3)
ifstatus=$(echo $iface|awk '{print $2}')
ifaddr=$(echo $iface|awk '{print $3}')
echo -e "$(/home/gmgauthier/.local/bin/cecho ICyan Wifi:) ${ifstatus} ${ifaddr} $(/home/gmgauthier/.local/bin/cecho ICyan Inet:) $(/home/gmgauthier/.local/bin/netcheck) $(date +%R)"
fi
echo $separator_line
mpstat
echo $separator_line
dfrs
echo $separator_line
acpi