Giter Site home page Giter Site logo

tmux-net-speed's People

Contributors

andruet avatar beeryardtech avatar travisgoldie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tmux-net-speed's Issues

advanced formatting

Awesome little plugin! Is it possible to format the net_speed output string to something like U: 0.2 MB/s D: 10.4 MB/s and keep it at this unit? I'd like to get a uniform look without it jumping around between KB/s, MB/s and B/s

Memory leak, too many instances of the script started?

After using tmux for a while (uptime 229 days), I started getting errors saying tmux has too many files open. The exact error message happens when I tried to create a new window via <prefix> c and the error is Create window failed: fork failed: Too many open files.

I used htop to investigate and it looks like many, many instance of the tmux-net-speed are running.

image

As you can see from this screnshot, I only have 10 windows open, but much more than 10 instances of the plugin running. Ideally, I'd expect 1 instance of the plugin running and its results shared across all of the windows, but even if it created one instance per window, I'd only expect to see 10 instances. But ps aux | grep tmux-net-speed | wc -l tells me there's 537 instances running.

If it helps, here's my ~/.tmux.conf file:

# Enabled plugins:
set -g @plugin 'tmux-plugins/tpm'                   # tmux Plugin Manager; autodownloads and installs any plugins you list here.
set -g @plugin 'tmux-plugins/tmux-sensible'         # Sensible defaults for tmux according to the community.
set -g @plugin 'tmux-plugins/tmux-cpu'              # Shows CPU status. Specifically, introduces variables like #{cpu_percentage} for use with `status-right`.
set -g @plugin 'tmux-plugins/tmux-net-speed'        # Shows network speed. Specifically, introduces variables like #{net_speed} for use with `status-right`.
set -g @plugin 'tmux-plugins/tmux-prefix-highlight' # Shows when you've hit the tmux prefix. Specifically, introduces the variable #{prefix_highlight} for use with `status-right`.
set -g @plugin 'tmux-plugins/tmux-sidebar'          # Shows file listings as a sidebar. Invoke with <prefix> <tab>
set -g @plugin 'tmux-plugins/tmux-resurrect'        # Allows you save and restore tmux environments (e.g. if you need to reboot). Invoke with <prefix> <Ctrl+S> and <prefix> <Ctrl+R>

# tmux-sidebar config (depends on `tree` being installed)
set -g @sidebar-tree-command 'tree -lL 2 -hDF -c -C' # See `man tree` for full explanation. TL;DR: follow symbolic links, max depth 2; show size, last changed date, an an indicator for directory/socket/executable/etc.;  sort by recently changed; colorize
set -g @sidebar-tree-width '60' # Because we added so much info, make the default width a bit wider.

# What to show in the bottom right corner (depends on tmux-cpu, tmux-net-speed, tmux-prefix-highlight)
set -g status-right-length 75 # 50 < perfect < 75
set -g @prefix_highlight_show_copy_mode 'on' # Show when copy mode is on.
set -g @prefix_highlight_show_sync_mode 'on' # Show when sync mode is on.
set -g @net_speed_format "D:%7s U:%7s" # Default string format is too wide IMHO.
set -g status-right '#{prefix_highlight} #{cpu_bg_color}CPU: #{cpu_icon} #{cpu_percentage} #{ram_bg_color}RAM: #{ram_icon} #{ram_percentage} #[bg=green]| #{net_speed} | %a %h-%d %H:%M'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

Mac OSX support

This is a feature request to support Mac OSX. There is no directory and no network interfaces list at /sys/class/net/. I'm not sure what the best tool for Mac would be.

Perhaps display a warning if no network interfaces are found here as well.

Thanks in advance for the consideration, it would be a very useful tool.

it does't work

it just shows 0 in my status bar
when I run ./run_test.sh
it meet error: en0 eth0 wlan0 should .........bla bla

How can I fix this ?

do global interpolation

I wanted to hide zero value "0 B/s", conditions are supported.

readonly show_speed="#{?#{!=:#{download_speed},0 B/s},#{download_speed},}"

Problem is, that do_interpolation() expands only first #{download_speed}

Please do global variable expanding
result=${input//$download_interpolation/$download_speed}
vs
result=${input/$download_interpolation/$download_speed}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.