move config out of script to make auto updating viable

This commit is contained in:
2023-06-30 11:08:37 -04:00
parent 9d2494be1e
commit 25043cf37e
2 changed files with 21 additions and 19 deletions

20
eatit-cfg.lua Normal file
View File

@ -0,0 +1,20 @@
-- NOTE: The variables in this file need to be global in order to be read
-- after being called with dofile()
plugins = { -- the plugins you want to load
-- link to repo file dest dir
{ 'https://git.squi.bid/eat-it', 'eatit.lua', 'scripts' },
}
-- options for eat it
opts = {
logging = { -- options for logging
log = true,
logdate = '[%H:%M:%S]:',
logfile = '~~/eatit.log',
},
dl = { -- options for dealing with the git repos
dir = '/tmp/mpv-eatit',
powerwash = false, -- if true the tmp dir gets deleted after mpv closes
}
}

View File

@ -1,24 +1,6 @@
local mp = require('mp') local mp = require('mp')
-- TODO: Move plugins (and opts) table to seperate file so that we can auto update without dofile(mp.command_native({'expand-path', '~~/eatit-cfg.lua'}))
-- messing with the user's configs
local plugins = { -- the plugins you want to load
-- link to repo file dest dir
-- { 'https://git.squi.bid/eat-it', 'eatit.lua', 'scripts' }, -- this is an example uncommenting it (and updating) will overwrite your config
}
-- options for eat it
local opts = {
logging = { -- options for logging
log = true,
logdate = '[%H:%M:%S]:',
logfile = '~~/eatit.log',
},
dl = { -- options for dealing with the git repos
dir = '/tmp/mpv-eatit',
powerwash = false, -- if true the tmp dir gets deleted after mpv closes
}
}
local function tablelength(T) local function tablelength(T)
local count = 0 local count = 0