Skip to content

Commit

Permalink
console.lua: use native clipboard property on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Akemi committed Dec 24, 2024
1 parent 026f1fb commit d389c06
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions player/lua/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1139,16 +1139,8 @@ local function get_clipboard(clip)
if not res.error then
return res.stdout
end
elseif platform == 'windows' then
elseif platform == 'windows' or platform == 'darwin' then
return mp.get_property('clipboard/text', '')
elseif platform == 'darwin' then
local res = utils.subprocess({
args = { 'pbpaste' },
playback_only = false,
})
if not res.error then
return res.stdout
end
end
return ''
end
Expand Down

0 comments on commit d389c06

Please sign in to comment.