1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Eat It
Preface - eatit is a "plugin manager" for mpv it's sole purpose is to provide a
declerative way to install and update your plugins. Loading the plugins is done
by mpv itself.
## Installation
put this script into your ~/.config/mpv/scripts/ directory:
```lua
-- install eat-it on startup
local mp = require("mp")
local utils = require("mp.utils")
local path = mp.comand_native({ "expand-path", "~~/scripts/eat-it" })
if not utils.readdir(path) then
mp.command_native_async({
name = "subprocess",
playback_only = false,
args = { "git", "clone", "--depth=1", "https://git.squi.bid/dep", path }
})
end
```
## Setup
in ~/.config/mpv/eatit-cfg.lua put:
```lua
return {
-- list of packages
}
```
### Package Spec
```lua
{
-- [string] Specifies the full name of the package (required)
"user/package",
-- [string] Overrides the url of the git repo to clone
-- by default eatit tries https://github.com/user/package.git
url = "",
-- [boolean] whether to ignore updates
pin = true,
-- [string] git branch to clone
branch = "",
-- [table] table of files to copy
files = {
[""] = ""
},
-- [function] code to run when installing/updating the package note due to how
-- mpv works eatit cannot change the working directory while running the setup
-- function
setup = function()
end
}
```
## FAQ
Q: Where does the name "Eat It" come from?
A: The plugin manager eats all the useless files and keeps the ones you want,
~~also a refrence to Weird Al's song "Eat It"~~
## ALTERNATIVES
[email me](mailto:me@zacharyscheiman.com) if you know of any other alternatives
- [mpv_manager](https://github.com/po5/mpv_manager)
|