MaxVerevkin/i3bar-river

how to customise block commands

pfr-dev opened this issue · 3 comments

Is there any way to customise each block's output?

For example, I have an old laptop and my battery only charges up to 80%. waybar has the option to set the battery full state at a specific percentage meaning that when my battery reaches 80% it will report 100%.

For other bars I've used, I have been able to script the output like so:

bat() {
    read -r bat_capacity </sys/class/power_supply/BAT1/capacity
    bat_capacity=$(( (bat_capacity * 100) / 80 ))   # set battery full at %80
    bat="$bat_capacity%"
}

Is this possible at all in i3bar-river?

I don't understand the question. It is the responsibility of your status bar generator.

Sorry for not being clear.

The simplest question is, can I configure the battery status to represent 80% as 100%?

I'm new to status generators, and I probably should have posted this issue on the i3status-rust git instead. But I cannot see how "blocks" are manually configured? it appears to me that each block is a pre-defined module. I hope I'm wrong, and I can modify the battery 'block'.

The simplest question is, can I configure the battery status to represent 80% as 100%?

i3bar-river does not have a battery block. All it does is it displays the current tags on the left and renders the externally-produced stream of "blocks" on the right.

I probably should have posted this issue on the i3status-rust git instead.

If that's the generator you use then yes, absolutely.