wifi.vim is a statusline/tabline component for Neovim/Vim. It uses a job feature of Neovim/Vim to retrieve wifi informations so that the plugin won't block the main thread.
NOTE: Supports macOS, Linux, and Termux. PR is welcome.
Important
macOS 14+ SSID Limitation: Due to Apple's privacy changes introduced in macOS 14 (Sonoma), WiFi SSID access now requires Location Services permission. CLI tools (including Vim/Neovim and terminal emulators) cannot request this permission, so SSID will not be available on modern macOS.
What still works:
- ✅ RSSI (signal strength)
- ✅ Transmission rate
- ✅ Signal graph
What doesn't work on macOS 14+:
- ❌ SSID (network name) - will be empty
This is an intentional Apple design decision, not a bug. For technical details, see:
- Apple Developer Forums: macOS get SSID changes?
- Official requirement: "SSID information is not available unless Location Services is enabled and the user has authorized the calling app to use location services."
- CLI tools have no mechanism to request Location Services authorization
The implementation was translated to Vim script from a Bash script found on https://github.com/b4b4r07/dotfiles/blob/master/bin/wifi.
Use junegunn/vim-plug or Shougo/dein.vim like:
" Plug.vim
Plug 'lambdalisue/wifi.vim'
" dein.vim
call dein#add('lambdalisue/wifi.vim')Or copy contents of the repository into your runtimepath manually.
Use a wifi#component() like:
set statusline=...%{wifi#component()}...
set tabline=...%{wifi#component()}...Or with itchyny/lightline.vim
let g:lightline = {
\ ...
\ 'component_function': {
\ ...
\ 'wifi': 'wifi#component',
\ ...
\ },
\ ...
\}Additionally, assign 1 to corresponding variables to immediately reflect the
changes to statusline or tabline.
let g:wifi#update_tabline = 1 " If wifi#component() is used in tabline.
let g:wifi#update_statusline = 1 " If wifi#component() is used in statusline.See more detail on wifi.txt
- lambdalisue/battery.vim - A statusline/tabline component of Neovim/Vim.
