Skip to content

lambdalisue/vim-wifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wifi.vim

Version 0.1.0 Support Neovim 0.1.6 or above Support Vim 8.0 or above MIT License Doc

wifi.vim in tabline

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.

Install

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.

Usage

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

See also

About

Show wifi information on statusline/tabline of Neovim/Vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors