greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

The SSID in `net` block is not loaded during initialization and "break" displaying #373

Closed Delgan closed 5 years ago

Delgan commented 5 years ago

Hi. :)

While configuring your awesome i3status-rust tool, I noticed that the SSID of the net block is not displayed until the first interval delay is elapsed. As a result, the block is not properly displayed (see the discontinuity after the net icon).

56815326-56cdc680-6841-11e9-98ea-babd6468706b

This can be triggered by reloading i3 with $mod+r, and this is particularly annoying while starting the computer, as the net doesn't need to be often updated, it may remain several seconds in this "broken" state.

I'm using i3status-rs v0.9, and my config looks like this:

[[block]]
block = "net"
interval = 30
device = "wlp0s12f0"
ssid = true
ip = false
speed_up = false
speed_down = false
bitrate = false

Do you think this would be possible to fetch the SSID during the initialization? Or delaying it until 1 second for example? Displaying an space " " meanwhile would probably also avoid breaking the block formatting.

atheriel commented 5 years ago

Yep, we should provide a fallback to avoid this issue.

atheriel commented 5 years ago

Fixed by #376.

Delgan commented 5 years ago

Great! Thanks @crablab. :wink: