tmux-plugins / tmux-battery

Plug and play battery percentage and icon indicator for Tmux.
MIT License
503 stars 98 forks source link

add highlighting battery percentage #14

Closed knakayama closed 9 years ago

knakayama commented 9 years ago

This PR is same #13. But high CPU Load may be not seen.

bruno- commented 9 years ago

Thanks for the contribution. After thinking about this, I personally would like to have this feature, so let's work in getting this merged.

Question: what if the user wants to highlight the #{battery_remain} output in addition to percentage when battery is low? That is not possible with this PR I presume?

Also, maybe someone would like to change the background color when the battery is low?

What do you think about the following interface:

"#[battery_low_fg=red]#{battery_percentage}#[fg=default]"

and also:

"#[battery_low_bg=red]#{battery_remain}#[bg=default]"
bruno- commented 9 years ago

The above will be more challenging to implement but it's completely decoupled from #{battery_percentage} - it can be used for anything in status-right or status-left.

knakayama commented 9 years ago

@bruno- Thanks for your review. I agree with your advises. I try to implement the features.

bruno- commented 9 years ago

Great. Let me know if you get stuck or you need help!

knakayama commented 9 years ago

Sorry for late reply.

Implementing this PR is a little hard to me. #16 is looks like a great PR for me. So I close this PR. Sorry.