diff options
-rwxr-xr-x | .local/bin/status/sb-cpu | 3 | ||||
-rwxr-xr-x | .local/bin/status/sb-memory | 3 | ||||
-rwxr-xr-x | .local/bin/status/sb-os | 11 | ||||
-rwxr-xr-x | .local/bin/status/sb-temp | 3 |
4 files changed, 20 insertions, 0 deletions
diff --git a/.local/bin/status/sb-cpu b/.local/bin/status/sb-cpu new file mode 100755 index 0000000..f989958 --- /dev/null +++ b/.local/bin/status/sb-cpu @@ -0,0 +1,3 @@ +#!/bin/sh + +# top | sed -n 3p | awk '{print $10}' | cut -d '.' -f1 | awk '{print " " 100 - $1 "%"}' diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory new file mode 100755 index 0000000..79049cb --- /dev/null +++ b/.local/bin/status/sb-memory @@ -0,0 +1,3 @@ +#!/bin/sh + +sysctl -n hw.usermem hw.physmem | xargs | awk '{printf (" %2.2fGiB/%2.2fGiB\n", ($1 / (1024 ^ 3)), ($2 / (1024 ^ 3)))}' diff --git a/.local/bin/status/sb-os b/.local/bin/status/sb-os new file mode 100755 index 0000000..820ce47 --- /dev/null +++ b/.local/bin/status/sb-os @@ -0,0 +1,11 @@ +#!/bin/sh + +os=$(uname) + +case $os in + "FreeBSD") os="" ;; + "Linux") os="" ;; + *) return ;; +esac + +echo "$os " diff --git a/.local/bin/status/sb-temp b/.local/bin/status/sb-temp new file mode 100755 index 0000000..1d71bb0 --- /dev/null +++ b/.local/bin/status/sb-temp @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -n "" $(sysctl -n dev.cpu.0.temperature | cut -d '.' -f1)"°C" |