All YoU Need Is Spotify (only macOS)
- go >= 1.11.0
- Spotify.app
-
execute
$ go get -u github.com/n04ln/AYUNiS.nvim
because install a binary -
Plz write below code in
$XDG_CONFIG_HOME/nvim/init.vim
" if you use dein.vim
call dein#add("n04ln/AYUNiS.nvim")
" if you use vim-plug
Plug 'n04ln/AYUNiS.nvim'
and set runtimepath
" e.g. if you use vim-plug, perhaps runtime path is this.
let g:ayunis_rtp = $HOME . '/.vim/plugged/AYUNiS.nvim'
-
please execute some command to install plugin (e.g.
:PlugInstall
) -
Let's Enjoy
AYUNiS.nvim
Life!
:echo AYUNiSGetNowPlaying()
if you want to add to statusline
, plz set as below
" default
set statusline+=%!AYUNiSGetNowPlaying()
" use airline (show in the statusline
let g:airline_section_x = airline#section#create(['%{AYUNiSGetNowPlaying()}'])
" use lightline (show in the tabline
let g:lightline = {
\ 'component_function': {
\ 'ayunis': 'AYUNiSGetNowPlaying'
\ },
\ }
let g:lightline.tabline = {
\ 'left': [['ayunis', 'buffers']],
\ 'right': [['close']]
\ }
:call AYUNiSNext()
:call AYUNiSPrev()
:call AYUNiSToggle()
:call AYUNiSVolumeUp()
:call AYUNiSVolumeDown()
:call AYUNiSToggleRepeat()
:call AYUNiSToggleShuffle()
" Next
nnoremap <silent><SPACE>sl :call AYUNiSNext()<CR>
" Prev
nnoremap <silent><SPACE>sh :call AYUNiSPrev()<CR>
" Toggle(playpause)
nnoremap <silent><SPACE>st :call AYUNiSToggle()<CR>
" Volume up
nnoremap <silent><SPACE>s+ :call AYUNiSVolumeUp()<CR>
" Volume down
nnoremap <silent><SPACE>s- :call AYUNiSVolumeDown()<CR>
" Toggle Repeat
nnoremap <silent><SPACE>sr :call AYUNiSToggleRepeat()<CR>
" Toggle Shuffle
nnoremap <silent><SPACE>sf :call AYUNiSToggleShuffle()<CR>