Files
eat-it/README.md

1.6 KiB

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:

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

return {
  -- list of packages
}

Package Spec

{
  -- [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 if you know of any other alternatives