clean up status bar blocks
This commit is contained in:
parent
e5e1dcc9f4
commit
16757d0990
3 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
filter() {
|
||||
if mpc &>/dev/null && [[ $(mpc | wc -l) -eq 3 ]]; then
|
||||
song=$(mpc current -f "%artist% - %title%" | xargs -0 )
|
||||
[[ $(echo $song | wc -m) -gt 37 ]] && song="${song:0:36}…"
|
||||
[[ $(echo $song | wc -m) -gt 35 ]] && song="${song:0:34}…"
|
||||
mpc | awk 'NR==2' | grep -q playing && icon="" || icon=""
|
||||
echo " $icon $song "
|
||||
elif mpc &>/dev/null && [[ $(mpc | wc -l) -eq 1 ]]; then
|
||||
|
|
|
@ -25,4 +25,4 @@ update() {
|
|||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf " %4sB %4sB \\n" $(numfmt --to=iec $rx $tx)
|
||||
printf " %4sB %4sB \\n" $(numfmt --to=iec $rx $tx)
|
||||
|
|
|
@ -23,8 +23,10 @@ elif [ "$vol" -gt "30" ]; then
|
|||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -eq "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo " "&& exit
|
||||
echo " " && exit
|
||||
fi
|
||||
|
||||
echo " $icon $vol% "
|
||||
|
|
Loading…
Add table
Reference in a new issue