diff options
author | Squibid <me@zacharyscheiman.com> | 2023-07-03 15:55:14 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-07-03 15:55:14 -0400 |
commit | 3f6fabd3466ff14cc5e5dca8184963820ef2eb0f (patch) | |
tree | 83c7d077bfe5c2627b663f1e78a9668f97a5e302 /eatit.lua | |
parent | 1d5e908b77f4820b6d14a4faef285bd3b59bb62d (diff) | |
download | eat-it-3f6fabd3466ff14cc5e5dca8184963820ef2eb0f.tar.gz eat-it-3f6fabd3466ff14cc5e5dca8184963820ef2eb0f.tar.bz2 eat-it-3f6fabd3466ff14cc5e5dca8184963820ef2eb0f.zip |
allow user defined configs at startup and only reset logfile on startup
Diffstat (limited to '')
-rw-r--r-- | eatit.lua | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -157,7 +157,24 @@ local function initupdate() end closelog() +end + +-- run any user defined configs at startup +local function runopts() + openlog() + for i = 1, tablelength(plugins) do + if plugins[i]['cfg'] then + logwrite('Running ' .. plugins[i]['file'] .. '\'s config') + plugins[i]['cfg']() + end end + closelog() end +-- remove logfile on startup +openlog() +os.remove(fn) +closelog() + +runopts() mp.add_key_binding('U', 'UpdatePlugins', initupdate) |