Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tamton-aquib/mpv.nvim
Music player with mpv.
https://github.com/tamton-aquib/mpv.nvim
lua neovim neovim-plugin
Last synced: about 11 hours ago
JSON representation
Music player with mpv.
- Host: GitHub
- URL: https://github.com/tamton-aquib/mpv.nvim
- Owner: tamton-aquib
- Created: 2022-12-27T12:08:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T04:31:25.000Z (6 months ago)
- Last Synced: 2024-05-20T05:31:46.495Z (6 months ago)
- Topics: lua, neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 14.6 KB
- Stars: 46
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# mpv.nvim
A music player inside neovim that uses [mpv](https://github.com/mpv-player/mpv).
Extracted from [stuff.nvim](https://github.com/tamton-aquib/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:
- neovim (0.7+)
- mpv
- youtube-dl### Installation and default setup
```lua
-- Using lazy.nvim:
{ "tamton-aquib/mpv.nvim", config=true }
```### Usage/Configuration
- The command: `:MpvToggle`
- The actual api: `require("mpv").toggle_player()`>
> Click to view default config
>
> ```lua
> 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)
> }
> }
> ```- Keymaps:
|key| action |
|:--:|---|
| `` | Input song/link |
|`p` / `` | pause/play
| `q` | quit |
| `>` / `<` | next/prev in playlist |
| `m` | mute/unmute |>
> Statusline/Tabline components
>
> make sure you set `setup_widgets` to `true` inside `setup()`
> ```lua
> -- 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'
> },
> }
> }
> ```
>
>### Features
- search by keyword.
- paste links from youtube (playlists too).
- mouse support (quite buggy)
- statusline/tabline components.### Todo's
moved to [todo.norg](https://github.com/tamton-aquib/mpv.nvim/tree/main/todo.norg)### Inspiration/Credits
- [music.nvim](https://github.com/Saverio976/music.nvim)
- [vhyrro](https://github.com/vhyrro) and [vsedov](https://github.com/vsedov)