Skip to content

n04ln/_AYUNiS.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AYUNiS.nvim

All YoU Need Is Spotify (only macOS)

Require

  • go >= 1.11.0
  • Spotify.app

Installation

  1. execute $ go get -u github.com/n04ln/AYUNiS.nvim because install a binary

  2. 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'
  1. please execute some command to install plugin (e.g. :PlugInstall)

  2. Let's Enjoy AYUNiS.nvim Life!

Usage

Get the name of the song that is playing now

: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']]
      \ }

Next Track

:call AYUNiSNext()

Prev Track

:call AYUNiSPrev()

Toggle Play & Pause

:call AYUNiSToggle()

Volume Control

:call AYUNiSVolumeUp()
:call AYUNiSVolumeDown()

Toggle REPEAT

:call AYUNiSToggleRepeat()

Toggle SHUFFLE

:call AYUNiSToggleShuffle()

Keybinds

Example

" 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>

About

🎧 All YoU Need Is Spotify for NeoVim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published