{"id":13835062,"url":"https://github.com/jonniek/mpv-menu","last_synced_at":"2025-07-10T07:31:13.312Z","repository":{"id":128444006,"uuid":"262070600","full_name":"jonniek/mpv-menu","owner":"jonniek","description":"A simple 0-dependency mpv menu to launch commands from","archived":false,"fork":false,"pushed_at":"2020-05-09T16:41:25.000Z","size":2,"stargazers_count":47,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T20:38:58.814Z","etag":null,"topics":["lua","mpv","mpv-script"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonniek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-07T14:18:37.000Z","updated_at":"2024-09-06T17:03:14.000Z","dependencies_parsed_at":"2024-01-15T18:47:11.865Z","dependency_job_id":"761411c8-986a-4f7c-8396-a38d26a12270","html_url":"https://github.com/jonniek/mpv-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonniek/mpv-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonniek","download_url":"https://codeload.github.com/jonniek/mpv-menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-menu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545158,"owners_count":23625403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","mpv","mpv-script"],"created_at":"2024-08-04T14:00:55.986Z","updated_at":"2025-07-10T07:31:08.300Z","avatar_url":"https://github.com/jonniek.png","language":"Lua","funding_links":[],"categories":["Menu","Lua","lua"],"sub_categories":[],"readme":"# mpv-menu\r\nSimple mpv menu to launch commands from.\r\n\r\nThis script allows you to make your own list of commands that you would like to have quick access to without\r\nthe need to remember the specific keybind.\r\n\r\n### Setup\r\n\r\nPut the `menu.lua` file to your `mpv/scripts/` directory. To enable the script you need a `menu.json` file in\r\nyour `mpv/script-opts/` directory.  \r\n\r\nExample of the structure of the json\r\n```json\r\n[\r\n  {\r\n    \"label\": \"Simply quit mpv\",\r\n    \"command\": [\"quit\"]\r\n  },\r\n  {\r\n    \"label\": \"Set music profile by running two commands\",\r\n    \"command\": [[\"apply-profile\", \"music-disable\"], [\"show-text\", \"Music!\"]],\r\n  },\r\n  {\r\n    \"label\": \"Increase brightness without closing menu\",\r\n    \"command\": [\"add\", \"brightness\", \"1\"],\r\n    \"keep_open\": true\r\n  }\r\n]\r\n```\r\n\r\nTo run arbitrary lua code you need to create a custom script that listens to script-messages.\r\n\r\n**mpv/scripts/my_custom_command.lua**\r\n```lua\r\nfunction my_custom_command(some_data, some_flag)\r\n  -- do something cool\r\nend\r\n\r\nmp.register_script_message(\"my_custom_command\", my_custom_command)\r\n```\r\n\r\nYou can then add it to the menu with the following\r\n\r\n```json\r\n[\r\n  {\r\n    \"title\": \"My custom command\",\r\n    \"command\": [\"script-message\", \"my_custom_command\", \"some_data\", true]\r\n  }\r\n]\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniek%2Fmpv-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonniek%2Fmpv-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniek%2Fmpv-menu/lists"}