Awesome
wifi.vim
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: Only for Mac OS X. PR is welcom.
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
- lambdalisue/battery.vim - A statusline/tabline component of Neovim/Vim.