diff options
| author | Peter Son Struschka <me@peter-struschka.com> | 2020-08-30 20:56:36 +0800 |
|---|---|---|
| committer | Peter Son Struschka <me@peter-struschka.com> | 2020-08-30 20:58:04 +0800 |
| commit | 37dd411698bd6eae8365260dde39b8ae9c7cbd36 (patch) | |
| tree | 978dd6ea3e72a86e4a3e0314b86d5137fc394785 /basics/.local/bin/statusbar/swap | |
| parent | a1d6fc2f3e6ab041cc51cb085ac59a646a126d25 (diff) | |
| download | dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.gz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.bz2 dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.lz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.xz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.zst dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.zip | |
all: overhaul, move dotfile specifics to .local/share/dotfiles and more
Diffstat (limited to 'basics/.local/bin/statusbar/swap')
| -rwxr-xr-x | basics/.local/bin/statusbar/swap | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/basics/.local/bin/statusbar/swap b/basics/.local/bin/statusbar/swap new file mode 100755 index 0000000..787ed23 --- /dev/null +++ b/basics/.local/bin/statusbar/swap @@ -0,0 +1,8 @@ +#!/bin/sh + +awk ' +/^SwapTotal:/ {Total=$2/(1024 * 1024)} +/^SwapFree:/ {Free=$2/(1024 * 1024)} +/^SwapCached:/ {Cached=$2/(1024 * 1024)} +END { +printf "%.2f %.2f %.2f %.2f\n", Total, Free, Cached, (Total - Free)}' /proc/meminfo |
