Skip to content

Show wifi information on statusline/tabline of Neovim/Vim

License

Notifications You must be signed in to change notification settings

lambdalisue/vim-wifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 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: 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

About

Show wifi information on statusline/tabline of Neovim/Vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published