diff options
| author | srdusr <trevorgray@srdusr.com> | 2022-12-04 22:14:49 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2022-12-04 22:14:49 +0200 |
| commit | 7dd57788700a14144968c687301aea406b45e22b (patch) | |
| tree | 58ffca5f2e29f26d7c1013e0c388029231b6203b /.config/tmux | |
| parent | 30c8efcde9ec75e101599eb64d99ebde0272c938 (diff) | |
| download | dotfiles-7dd57788700a14144968c687301aea406b45e22b.tar.gz dotfiles-7dd57788700a14144968c687301aea406b45e22b.zip | |
Moved memory function to new script right-status.sh
Diffstat (limited to '.config/tmux')
| -rwxr-xr-x | .config/tmux/left-status.sh | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/.config/tmux/left-status.sh b/.config/tmux/left-status.sh index 06ae1a6..afceea8 100755 --- a/.config/tmux/left-status.sh +++ b/.config/tmux/left-status.sh @@ -9,17 +9,6 @@ function ip-address() { done } -function memory-usage() { - if [ "$(which bc)" ]; then - # Display used, total, and percentage of memory using the free command. - read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}') - # Calculate the percentage of memory used with bc. - percent=$(bc -l <<< "100 * $total / $used") - # Feed the variables into awk and print the values with formating. - awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}' - fi -} - function vpn-connection() { # Check for tun0 interface. [ -d /sys/class/net/tun0 ] && printf "%s " 'VPN*' @@ -28,7 +17,6 @@ function vpn-connection() { function main() { # Comment out any function you do not need. ip-address - memory-usage vpn-connection } |
