CPU, GPU and memory information have been converted to Golang functions

This commit is contained in:
2024-05-14 10:03:18 +03:00
parent 1fc9a9ea79
commit a29a8f1dd9
6 changed files with 268 additions and 139 deletions
-16
View File
@@ -34,22 +34,6 @@ get_shell() {
esac
}
get_cpu_name() {
grep -m1 "model name" /proc/cpuinfo | cut -d: -f2 | xargs
}
get_total_mem() {
free --mebi -t | grep 'Total' | tr -s ' ' | cut -d" " -f2
}
get_free_mem() {
free --mebi -t | grep 'Total' | tr -s ' ' | cut -d" " -f4
}
get_used_mem() {
free --mebi -t | grep 'Total' | tr -s ' ' | cut -d" " -f3
}
get_de_wm() {
if ps -e | grep "plasmashell" &> /dev/null ; then
echo "KDE Plasma $(plasmashell --version | awk '{print $2}')"