mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 11:30:23 +10:00
Playing with eww
This commit is contained in:
15
.config/eww/bar/scripts/mem-ad
Executable file
15
.config/eww/bar/scripts/mem-ad
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
||||
|
||||
free=$(expr $total - $used)
|
||||
|
||||
if [ "$1" = "total" ]; then
|
||||
echo $total
|
||||
elif [ "$1" = "used" ]; then
|
||||
echo $used
|
||||
elif [ "$1" = "free" ]; then
|
||||
echo $free
|
||||
fi
|
||||
Reference in New Issue
Block a user