i3status-rust
i3status-rust copied to clipboard
block custom format
[[block]]
block = "custom"
command = "get_bandwith"
interval = 1
// ...
unsigned long diff_packet = update_tx_packets(tx_packets) / 1024;
char s[5];
snprintf(s, sizeof(s), "%4lu", diff_packet);
printf("%4s kb\n", s);
I am currently padding my numbers with blank spaces when they are less than 4 characters long. However, the output appears to be trimmed by i3status-rs. I would prefer to avoid having the blocks in my status bar move around when the status is updated.