Change to new method of storing dotfiles

This commit is contained in:
Lavender 2021-04-27 13:31:56 -07:00
commit 0b0339a16a
Signed by: endie
GPG key ID: CC5162D7C2146F01
5 changed files with 260 additions and 0 deletions

39
Executables/sys Executable file
View file

@ -0,0 +1,39 @@
#!/bin/sh
field() {
num=$1
shift
echo $@ | cut -d ' ' -f $num
}
show_colors() {
for i in $(seq $1 $2)
do
tput setab $i
echo -n " "
done
tput setab reset
echo
}
tput setaf 5
echo " $HOSTNAME"
echo " $(uname -sr)"
echo " $(yay -Qq | wc -l)"
diskinfo=$(df -h / | tail -n 1)
useddisk=$(field 3 $diskinfo)
totaldisk=$(field 2 $diskinfo)
echo " ${useddisk::-1}/${totaldisk::-1} GB ($(field 5 $diskinfo))"
raminfo=$(free --mega | head -n 2 | tail -n 1)
usedram=$(field 3 $raminfo)
totalram=$(field 2 $raminfo)
echo " $usedram/$totalram MB ($(($usedram*100/$totalram))%)"
tput setaf reset
show_colors 0 7
show_colors 8 15