diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2021-06-03 21:33:31 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2021-06-03 21:33:31 +0000 |
| commit | 6e4a15d79352ca2707a3b0d81d158228a7d14704 (patch) | |
| tree | a526da4169c76175f1e528534d67772bc13dfabb /.local/bin/statusbar/meminfo | |
| parent | a38dc1a774d012b2da71716365d1d254b650dd48 (diff) | |
Add/move statusbar scripts
Diffstat (limited to '.local/bin/statusbar/meminfo')
| -rwxr-xr-x | .local/bin/statusbar/meminfo | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/statusbar/meminfo b/.local/bin/statusbar/meminfo new file mode 100755 index 0000000..2b31b97 --- /dev/null +++ b/.local/bin/statusbar/meminfo @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +set -e + +case $BLOCK_BUTTON in + 1) notify-send --urgency=low \ + "Memory status" \ + "$(free -h | \ + awk '/total/ {printf "%15s%10s%10s\n", $1, $2, $3} + /Mem|Swap/{printf "%-5s%10s%10s%10s\n", $1, $2, $3, $4}')" + ;; +esac + +free -h | awk '/Mem/{print "[" $3 " RAM " $2 "]" }' |
