diff options
| author | ryukamish <[email protected]> | 2026-04-11 16:06:45 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-04-11 16:06:45 +0530 |
| commit | 607891801fbf2051a0c9062d15a445dd238c1e1b (patch) | |
| tree | 33b8cfba2355b498addea05e385b06d46cced30f /mpv/scripts/file-browser/modules/addons/root.lua | |
| parent | 6fbde2906e3bb2d4d1df23f6374d8a6a0aef870f (diff) | |
add: mako and mpv configs
Diffstat (limited to 'mpv/scripts/file-browser/modules/addons/root.lua')
| -rw-r--r-- | mpv/scripts/file-browser/modules/addons/root.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mpv/scripts/file-browser/modules/addons/root.lua b/mpv/scripts/file-browser/modules/addons/root.lua new file mode 100644 index 0000000..412a5ba --- /dev/null +++ b/mpv/scripts/file-browser/modules/addons/root.lua @@ -0,0 +1,26 @@ +-- This file is an internal file-browser addon. +-- It should not be imported like a normal module. + +local g = require 'modules.globals' + +---Parser for the root. +---@type ParserConfig +local root_parser = { + name = "root", + priority = math.huge, + api_version = '1.0.0', +} + +function root_parser:can_parse(directory) + return directory == '' +end + +--we return the root directory exactly as setup +function root_parser:parse() + return g.root, { + sorted = true, + filtered = true, + } +end + +return root_parser |
