Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no image data in clipboard #43

Open
DriesOlbrechts opened this issue Jan 17, 2023 · 1 comment
Open

There is no image data in clipboard #43

DriesOlbrechts opened this issue Jan 17, 2023 · 1 comment

Comments

@DriesOlbrechts
Copy link

The plugin has recently stopped working for me with the error there is no image data in clipboard. I can tell by pasting in other applications that there is. I am on wayland and checkhealth is succesful.

@zehua0417
Copy link

same problem,
solved by edit utils.lua

---Will be used in utils.is_clipboard_img to check if image data exist
---@param command string #command to check clip_content
M.get_clip_content = function(command)
  local handle = io.popen(command)
  if not handle then
    -- print("Failed to execute command: " .. command)
    return {}
  end

  local outputs = {}
  for output in handle:lines() do
    table.insert(outputs, output)
  end
  handle:close()

  -- print("Command output: " .. vim.inspect(outputs))

  return outputs
end

and dont forget to install sudo pacman -S wl-clipboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants