Home

Awesome

mpv.nvim

A music player inside neovim that uses mpv.

Extracted from stuff.nvim.

Note This is an experimental plugin without any proper testing.

Showcase

https://user-images.githubusercontent.com/77913442/209674116-7a4bd2e8-e286-4aa6-b66c-57be2a646e4b.mp4

Requirements:

Installation and default setup

-- Using lazy.nvim:
{ "tamton-aquib/mpv.nvim", config=true }

Usage/Configuration

<details> <summary>Click to view default config</summary>
require("mpv").setup {
    width = 50,
    height = 5,              -- Changing these two might break the UI 😬
    border = 'single',
    setup_widgets = false,   -- to activate the widget components
    timer = {
        after = 1000,
        throttle = 250,      -- Update time for the widgets. (lesser the faster)
    }
}
</details>
keyaction
<CR>Input song/link
p / <space\>pause/play
qquit
> / <next/prev in playlist
mmute/unmute
<details> <summary>Statusline/Tabline components</summary>

make sure you set setup_widgets to true inside setup()

-- Components are: g:mpv_title, g:mpv_visualizer, g:mpv_percent
require("lualine").setup {
    sections = {
        lualine_c = {
            {
                function() return '  ' end,
                color='green',
                on_click=require("mpv").toggle_player
            },
            'g:mpv_title'
        },
    }
}
</details>

Features

Todo's

moved to todo.norg

Inspiration/Credits