tmux-bar script improvements

This commit is contained in:
Jake Bauer 2024-07-31 09:39:36 +02:00
parent aa837b6635
commit 1825450a5e
1 changed files with 3 additions and 4 deletions

View File

@ -26,13 +26,12 @@ while :; do
bat="$bat%"
fi
if [ "$(ifconfig iwm0 | grep status | awk '{print $2}')" = "active" ]; then
net="$(ifconfig iwm0 | grep "inet " | awk '{print $2}')"
else
net=$(ifconfig | grep "inet " | tail -1 | awk '{print $2}')
if [ "$net" = "127.0.0.1" ]; then
net="No Network"
fi
if [ "$(sndioctl output.mute | cut -d'=' -f2)" = "1" ]; then
if [ "$(sndioctl -n output.mute)" = "1" ]; then
snd="Muted"
else
snd="Unmuted"