ilya-manin / tmux-network-bandwidth

📊 Network bandwidth plugin for tmux
MIT License
76 stars 13 forks source link

Change number formatting? #4

Closed Exr0n closed 4 years ago

Exr0n commented 4 years ago

Hi, I have another question which is hopefully legitimate this time :/

Is there any way to change the formatting of the numbers? I find it a little distracting when the numbers change length because it shifts everything around in my status line.

output

ilya-manin commented 4 years ago

Hey @Exr0n, now you can customize the width with tmux-network-bandwidth-padding option. https://github.com/xamut/tmux-network-bandwidth#customization

kamilmirza commented 4 years ago

added set-option -g @tmux-network-bandwidth-padding 15 but fixed padding does not work updated the plugin already

ilya-manin commented 4 years ago

@kamilmirza I just checked and it works fine with this Dockerfile:

FROM debian:buster

RUN apt-get update -qq && apt-get install -y \
      curl \
      gawk \
      git-core \
      net-tools \
      tmux

RUN echo "set -g @plugin 'tmux-plugins/tpm'\n\
set -g @plugin 'xamut/tmux-network-bandwidth' \n\
run -b '~/.tmux/plugins/tpm/tpm' \n\
set-option -g status-interval 3 \n\
set-option -g status-right '#{network_bandwidth}' \n\
set-option -g @tmux-network-bandwidth-padding 15" > ~/.tmux.conf

RUN git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
RUN TMUX_PLUGIN_MANAGER_PATH="~/.tmux/plugins" ~/.tmux/plugins/tpm/bin/install_plugins

CMD tmux -u # Force UTF8 support

image

Please double check your config file.

kamilmirza commented 4 years ago

apologies! padding option showed results after I increased set -g status-right-length from 100 to 120 but its not fixed, here the screenshot: 2020-04-01_17-27-01

ilya-manin commented 4 years ago

@kamilmirza yeah, fixed at #8

kamilmirza commented 4 years ago

fine and dandy now!