tmux icon indicating copy to clipboard operation
tmux copied to clipboard

Bug: The battery percentage contains extra padding on left.

Open mohityadav7 opened this issue 2 years ago • 1 comments

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:

  1. Add battery plugin in .tmux.config. (Issue occurs regardless of powerline symbols being enabled or disabled)
  2. 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

image There is also some extra padding between the number and "AC" text when plugged in. image

System

  • OS: Ubuntu 20.04 via WSL2 on Windows 11
  • Tmux Version: 3.0a

mohityadav7 avatar Jan 29 '22 15:01 mohityadav7

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"

klgsnd avatar Jul 30 '22 12:07 klgsnd