more scripts
This commit is contained in:
parent
d25a75a078
commit
ea0f4fd844
7 changed files with 301 additions and 0 deletions
10
scripts/mem-plasma.3s.sh
Executable file
10
scripts/mem-plasma.3s.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Get the percentage of used memory and print it
|
||||
read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}')
|
||||
|
||||
percent=$(bc -l <<< "100 * $total / $used")
|
||||
|
||||
mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}'| awk '{printf $2}')
|
||||
|
||||
|
||||
echo " $mem | color=#ff9f43"
|
Loading…
Add table
Add a link
Reference in a new issue