README.md (1923B)
1 # tmux bond device 2 3 If you have a network bond setup between ethernet and your Wi-Fi device and you like to know which device is currently active from the comfort of your Tmux session then this plugin is for you. 4 5 ## Usage 6 Add the format string `#{bond_device}` in to your `status-right` or `status-left` option. 7 8 Example: 9 ``` 10 set-option -g status-right 'Current bond device: #{bond_device} | %Y-%m-%d %H:%M ' 11 ``` 12 13 By default the output will be `ethernet` if the current device is Ethernet, or `wi-fi` if the current device is Wi-Fi. 14 You can modify the output using the options `@ethernet` and `@wifi`. 15 ``` 16 set -g @ethernet "hardwire" 17 set -g @wifi "802.11" 18 ``` 19 20 You may also wish to change the default bond device from `bond0` by using the `@bond` option 21 ``` 22 set -g @bond "bond1" 23 ``` 24 25 ## Installation 26 ### With [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended) 27 Add the plugin to your list of TPM plugins in `.tmux.conf` 28 ``` 29 set -g @plugin 'https://gitlab.com/pyratebeard/tmux-bond-device.git' 30 ``` 31 32 Fetch the plugin and source it using `prefix + I`. 33 34 ### Manual installation 35 Clone the repo 36 ``` 37 git clone https://gitlab.com/pyratebeard/tmux-bond-device.git ~/clone/path/ 38 ``` 39 40 Add this line to the bottom of your `.tmux.conf` 41 ``` 42 run-shell ~/clone/path/bond_device.tmux 43 ``` 44 45 Reload your Tmux environment by typing the following in the terminal 46 ``` 47 tmux source-file ~/.tmux.conf 48 ``` 49 50 ## Interval 51 The speed at which the bond_device option changes is based on your `status-interval` setting in Tmux. 52 53 To set a lower number enter the following in your `.tmux.conf` 54 ``` 55 set -g status-interval 5 56 ``` 57 58 ## Lengthen status 59 If you find the additional information in your status bar, especially `status-right`, is being cut off you may need to lengthen the status bar field 60 61 Enter the following in your `.tmux.conf`, changing the value as required 62 ``` 63 set -g status-right-length 100 64 ``` 65 66 ## License 67 [MIT](LICENSE)