{"id":16557032,"url":"https://github.com/cogentredtester/mpv-clipboard","last_synced_at":"2025-10-28T20:30:51.221Z","repository":{"id":113085334,"uuid":"563265341","full_name":"CogentRedTester/mpv-clipboard","owner":"CogentRedTester","description":"Provides generic low-level clipboard commands for users and script writers.","archived":false,"fork":false,"pushed_at":"2022-11-10T08:02:51.000Z","size":14,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T12:04:01.569Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CogentRedTester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-11-08T08:54:54.000Z","updated_at":"2025-06-04T13:35:04.000Z","dependencies_parsed_at":"2024-01-15T19:44:10.556Z","dependency_job_id":"ecb0ede3-c442-42ac-9990-c08dd06afee6","html_url":"https://github.com/CogentRedTester/mpv-clipboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CogentRedTester/mpv-clipboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogentRedTester%2Fmpv-clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogentRedTester%2Fmpv-clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogentRedTester%2Fmpv-clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogentRedTester%2Fmpv-clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CogentRedTester","download_url":"https://codeload.github.com/CogentRedTester/mpv-clipboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogentRedTester%2Fmpv-clipboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281508301,"owners_count":26513665,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T20:06:21.845Z","updated_at":"2025-10-28T20:30:50.968Z","avatar_url":"https://github.com/CogentRedTester.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpv-clipboard\n\nProvides generic but powerful low-level clipboard commands for users and script writers.\n\nRequires `powershell` on Windows,`pbcopy`/`pbpaste` on MacOS, `xclip` on X11, and `wl-copy`/`wl-paste` on Wayland.  \n\n## Script Messages\n\n### set-clipboard\n\n`script-message set-clipboard \u003ctext\u003e`\n\nA script message that can be set in `input.conf` to copy the given text into the clipboard.\nCan be combined with [property expansion](https://mpv.io/manual/master/#property-expansion)\nto copy any mpv property.\n\nFor example to copy the path of the current file with Ctrl+c:\n\n`Ctrl+c script-message set-clipboard ${path}`\n\n### get-clipboard\n\n`script-message get-clipboard \u003cresponse-string\u003e`\n\nSends the contents of the clipboard to the given script-message. This can be used by other\nscripts to request the contents of the clipboard. The other script should register a script-message\nwith the same name as the `response-string` to receive the clipboard contents.\n\nAdditional arguments may be introduced in the future.\n\n### clipboard-command\n\n`script-message clipboard-command \u003ccommand\u003e \u003carg1\u003e \u003carg2\u003e ...`\n\nAllows one to use the contents of the clipboard in a command. If the command\nor arg strings contain the substring `%clip%` then it will be substituted for the\ncontents of the clipboard.\n\nFor example to tell mpv to play the contents of the clipboard:\n\n    Ctrl+v script-message clipboard-command loadfile %clip%\n\nThe `%` character will act as an escape character;\n`%%clip%` will evaluate to `%clip%`. Any `%%` will be substituted for `%`, so you may need\nto use additional `%` characters if you actually want multiple in a row.\n\nBy default these commands behave asynchronously, meaning if you send multiple commands at the same time there\nno guarantee that the first will be run before the second:\n\n    Ctrl+t script-message clipboard-command print-text 1 ; script-message clipboard-command print-text 2\n\nTo handle this you can set the first [input command prefix](https://mpv.io/manual/master/#input-command-prefixes)\nto `sync`, that will ensure that the commands are run in order. Note that all of the usual\n[sync vs async rules](https://mpv.io/manual/master/#synchronous-vs-asynchronous) still apply. This behaviour may be moved to a separate script-message in te future.\n\n## Credits\n\nThe code to get text from the clipboard comes from mpv's [console.lua](https://github.com/mpv-player/mpv/blob/master/player/lua/console.lua).\n\nThe code to set the clipboard text on Unix systems was based on [mpv-copyTime](https://github.com/Arieleg/mpv-copyTime).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogentredtester%2Fmpv-clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcogentredtester%2Fmpv-clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogentredtester%2Fmpv-clipboard/lists"}