← 全部工具

tmux-contrib/tmux-network

热度 65 更新于 网络与系统管理

Display your public and private IP addresses in the tmux status bar

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

tmux-network

Display your public and private IP addresses in the tmux status bar.

Installation

Add this plugin to your ~/.tmux.conf:

set -g @plugin 'tmux-contrib/tmux-network'

And install it by running <prefix + I.

Usage

Add the format strings to your status bar:

set -g status-right "#{network_private_ip} | #{network_public_ip}"

Format Strings

| Format String | Description | |-------------------------|------------------------------------------| | #{networkpublicip} | Public IP address (from ip-api.com) | | #{networkprivateip} | Private IP address (from en0 interface) |

Development

Prerequisites

Install dependencies using Nix:

nix develop

Or install manually: bash, tmux, bats

Running Tests

bats tests/