You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.2 KiB

  1. # Tmux IP Address
  2. The plugin shows public IP Address on the status bar of tmux using `#{ip_address}` syntax on the tmux `status-right` option.
  3. ## Usage
  4. Add `#{ip_address}` to your existing `status-right` tmux option:
  5. ```bash
  6. set -g status-right '#{ip_address} | #H'
  7. ```
  8. You'll now see some information like so:
  9. ```
  10. 172.116.1.10
  11. ```
  12. IP Address can be refreshed by <kbd>prefix</kbd> + <kbd>A</kbd>.
  13. The key combination of refreshing IP Address can be customized by:
  14. ```bash
  15. set -g @ip_address_refresh_key 'P'
  16. ```
  17. ## Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
  18. Add plugin to the list of TPM plugins in `.tmux.conf`:
  19. ```bash
  20. set -g @plugin 'anghootys/tmux-ip-address'
  21. ```
  22. Hit `prefix + I` to fetch the plugin and source it.
  23. `#{ip_address}` interpolation should now work.
  24. ### Manual Installation
  25. Clone the repo:
  26. ```bash
  27. $ git clone https://github.com/anghootys/tmux-ip-address ~/clone/path
  28. ```
  29. Add this line to the bottom of `.tmux.conf`:
  30. ```bash
  31. run-shell ~/clone/path/ip_address.tmux
  32. ```
  33. Reload TMUX environment:
  34. ```bash
  35. # type this in terminal
  36. $ tmux source-file ~/.tmux.conf
  37. ```
  38. `#{ip_address}` interpolation should now work.
  39. ## License
  40. [MIT](LICENSE)