Closed meithecatte closed 1 year ago
What's your config for the net block?
I am using the following config:
[[block]]
block = "net"
device = "wlan0"
format = "$icon $ssid $signal_strength $ip $speed_down/s $graph_down"
interval = 5
$ip
is not guaranteed to be always available (we should add a note in the docs...), so you have to explicitly handle that case, for example
format = "$icon $ssid $signal_strength {$ip|N/A} $speed_down/s $graph_down"
or
format = "$icon $ssid $signal_strength {$ip |}$speed_down/s $graph_down"
Okay, but this shouldn't break the rendering forever, just for the time period where the IP isn't available.
Did you try it? That's exactly what that pipe syntax is for :) Actually it's better - it doesnt break rendering at all
Even if the configuration doesn't handle a case, encountering the case for 1 second shouldn't break rendering forever. i3status-rs should recover once the network card gets assigned an IP address again.
Even if the configuration doesn't handle a case, encountering the case for 1 second shouldn't break rendering forever. i3status-rs should recover once the network card gets assigned an IP address again.
I totally agree with you. Since the release of [i3status-rust 0.30.0], this happens. The provided solution doesn't address the issue.
The issue is not about how user should handle the case of no IP address. The issue is when the IP address is reacquired, i3status-rust does not recover without a manual reload. This is extremely common case since letting your PC suspends will cause IP to drop and when it is resumed, the IP is acquired but rendering is still broken.
PRs to implement this in a generic manner (not net specific) welcomed.
Same issue here with the music block, using the mpd player.
For anyone interested, the $signal_strength
is also not always available for me. And that when that network is up. Using SwayWM and happening (exclusively?) after system hibernation.
From time to time, the
net
block of my status line gets stuck inThis persists until I restart i3status with a sway config reload.