tmux
tmux copied to clipboard
Bug: The battery percentage contains extra padding on left.
Describe the bug
The battery percentage has some extra left padding which does not look good. And there is no icon or percentage sign which gives a hint about what the number represents.
To Reproduce
Steps to reproduce the behavior:
- Add battery plugin in .tmux.config. (Issue occurs regardless of powerline symbols being enabled or disabled)
- Observe the battery section in the status bar.
Expected behavior
I would like it to look better. I think if we could add a battery icon and fix padding, it will look better.
Screenshots
There is also some extra padding between the number and "AC" text when plugged in.
System
- OS: Ubuntu 20.04 via WSL2 on Windows 11
- Tmux Version: 3.0a
I had the same issue. The reason we see padding is that the heart symbol is not printed. So I just tried to pull the recent commits and it fixed the issue. Try the same.
But if you need to really shrink the space between elements, then try to remove spaces between variables printed. scripts/battery.sh:
...
118 if [ -z "$bat_stat" ]; then # Test if status is empty or not
119 echo "$bat_label$bat_perc"
120 elif [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power
121 echo "$bat_label$bat_stat"
122 else
123 echo "$bat_label$bat_stat$bat_perc"