dotfiles

Configuration for the software I use.
git clone https://git.jaderune.net/jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit 559ba0e09621e55b8a9350d1e3bfe3982bca31d0
parent d46fb618974aa94484deb60bb3ece1c352cc0893
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat,  6 May 2023 13:42:25 -0400

bar-action: update cpu format and add wifi strength

Diffstat:
M.local/bin/bar-action | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.local/bin/bar-action b/.local/bin/bar-action @@ -5,6 +5,7 @@ while :; do cpu="$(echo $vmstats | awk '{print 100-$NF}')"% mem=$(echo $vmstats | awk '{print $3}') dsk=$(df -h /home | tail -1 | awk '{print $5}') + bat="$(apm -l)" if [ $bat -gt 90 ]; then baticon="" @@ -22,15 +23,23 @@ while :; do else bat="$bat%" fi + if [ "$(ifconfig iwm0 | grep status | awk '{print $2}')" = "active" ]; then net="直" else net="睊" fi + net_strength=$(ifconfig iwm0 | grep chan | awk '{print $8}') + if [ -z "$net_strength" ]; then + net_strength="00%" + fi + if [ "$(sndioctl output.mute | cut -d'=' -f2)" = "1" ]; then snd="" else snd="" fi - echo "+@fn=1;+@fn=0; $cpu | +@fn=1;+@fn=0; $mem | +@fn=1;+@fn=0; $dsk | +@fn=1;$baticon+@fn=0; $bat | +@fn=1;$net+@fn=0; | +@fn=1;$snd+@fn=0;" + + cpu=$(printf "%03s" "$cpu") + echo "+@fn=1;+@fn=0; $cpu | +@fn=1;+@fn=0; $mem | +@fn=1;+@fn=0; $dsk | +@fn=1;$baticon+@fn=0; $bat | +@fn=1;$net+@fn=0; $net_strength | +@fn=1;$snd+@fn=0;" done