Get information about currently playing song on spotify.
Install the plugin using your favorite plugin manager:
Plugin 'ernestre/vim-spotify'
Plug:
Plug 'ernestre/vim-spotify'
dein:
call dein#add('ernestre/vim-spotify')
- vim compiled with python3
- Currently only works on linux
There are some variables which you can modify in order to change the playback text:
let g:vim_spotify_playback_pattern = "{playbackIcon}{artist} - {title}"
let g:vim_spotify_icon_play = "⏯️"
let g:vim_spotify_icon_pause = "⏸️"
g:vim_spotify_playback_pattern
variable has three placeholders which can change however you like:
let g:vim_spotify_playback_pattern = "{playbackIcon} > {artist} - {title}"
let g:vim_spotify_playback_pattern = "{artist} {title} "
let g:vim_spotify_playback_pattern = "{artist}:{title} | {playbackIcon} 🎶"
Note: Default values are using fontawesome icons, so you might want to install vim-devicons
Integration with lightline.vim
This plugin has a SpotifyPlayback
function, which returns information about currently playing song on spotify.
In order to show this information in the statusline, add a component function to your lightline configuration:
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste', 'spotify'],
\ [ 'readonly', 'filename', 'modified'] ]
\ },
\ 'component_function': {
\ 'spotify': 'SpotifyPlayback',
\ },
\ }