This is a Tmux status line plugin that displays your current wifi status, in the style of tmux-plugins.
SSID and signal icon:
Signal strength in dB:
This plugin provides three format strings that you can use in your status line:
#{wifi_ssid}
- displays the SSID of your wireless network#{wifi_strength}
- displays your wifi strength in dB#{wifi_icon}
- displays an icon modelling signal strength
Here is an example status line:
set -g status-right '#{wifi_ssid} #{wifi_icon} | %d %B %Y | %I:%M%p '
The icons displayed by ${wifi_icon}
can be configured to whatever values you want, where 5
represents the
highest signal strength and 1
is the lowest. off
means that the network adaptor is turned off.
set -g @tmux_wifi_icon_5 "☰"
set -g @tmux_wifi_icon_4 "☱"
set -g @tmux_wifi_icon_3 "⚌"
set -g @tmux_wifi_icon_2 "⚍"
set -g @tmux_wifi_icon_1 "⚊"
set -g @tmux_wifi_icon_off "⚋"
This plugin supports the following operating systems:
- macOS
- Linux (using
iw
)
Feel free to submit PRs to support other OSs.
Using Tmux Plugin Manager
If you're familiar with TPM, you can add this plugin to the list of TPM plugins
in .tmux.conf
:
set -g @plugin 'gmoe/tmux-wifi'
Clone the repo:
$ git clone https://github.com/gmoe/tmux-wifi ~/.tmux/plugins/tmux-wifi
Add this line to the bottom of .tmux.conf
:
run-shell ~/.tmux/plugins/tmux-wifi/tmux-wifi.tmux
Reload TMUX environment:
$ tmux source-file ~/.tmux.conf