diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2020-11-22 23:52:43 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2020-11-22 23:52:53 -0500 |
| commit | 8ad9d13123d31697b7cab4c42df5e6273e8bcc1e (patch) | |
| tree | 1293e4a6955d368df061faf3fab74edc51a080ad /bin/status-bar | |
| parent | 464d73681a4bbe825494be16070ef9a8e540a388 (diff) | |
| download | dotfiles-8ad9d13123d31697b7cab4c42df5e6273e8bcc1e.tar.gz dotfiles-8ad9d13123d31697b7cab4c42df5e6273e8bcc1e.tar.xz | |
Exclude more from the chrome configuration
Diffstat (limited to 'bin/status-bar')
| -rwxr-xr-x | bin/status-bar | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/bin/status-bar b/bin/status-bar index f0523ae..d6ac7a5 100755 --- a/bin/status-bar +++ b/bin/status-bar @@ -16,7 +16,7 @@ wireless_info() { "$_if" \ "$(nmcli c | awk "/$_if/"'{print $1}')" \ "$(ip -4 addr show dev "$_if" | awk '/inet /{print $2}')" \ - "$(awk '/^wlp3s0/{print $4+0}' /proc/net/wireless)dbm" + "$(awk "/^$_if/"'{print $4+0}' /proc/net/wireless)dbm" } eth_info() { @@ -64,14 +64,16 @@ echo \ "$(date '+%m.%d.%Y %H:%M:%S')" } -x230() { -while true ; do - -xsetroot -name "$(status_line)" +x230_status_line() { +echo \ +"Fan: $(sensors | sed -n 's/^fan1:[\t ]*//p')|"\ +"Batt: $(sudo tlp-stat -b | awk '/^Charge/{print $3}') $(ac_status)|"\ +"$(network_info)|"\ +"$(date '+%m.%d.%Y %H:%M:%S')" +} +_type="$1"; shift +while true ; do +xsetroot -name "$("${_type}_status_line" "$@")" sleep "$timeout" done -} - - -$@ |
