.config/sway/scripts/cpu_load.sh
This commit is contained in:
parent
0ae1e15926
commit
bff6c85810
@ -11,7 +11,7 @@ VERSION="1.0"
|
|||||||
# Variables
|
# Variables
|
||||||
cpuPercentage=$(top -b -n1 | grep \%Cpu | awk '{print 100-$8}')
|
cpuPercentage=$(top -b -n1 | grep \%Cpu | awk '{print 100-$8}')
|
||||||
showCpuPercentage=$(echo ${cpuPercentage})
|
showCpuPercentage=$(echo ${cpuPercentage})
|
||||||
showCpuPercentageInteger=$(echo ${showCpuPercentage} | cut -d "." -f 1)
|
showCpuPercentageInteger=$(echo ${showCpuPercentage} | sed 's/,/./g' |cut -d "." -f 1)
|
||||||
|
|
||||||
# Show percentage bar
|
# Show percentage bar
|
||||||
if [ ${showCpuPercentageInteger} -ge 0 ] ; then
|
if [ ${showCpuPercentageInteger} -ge 0 ] ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user