Skip to content

Commit

Permalink
refactor: simplify image check for xclip
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonHarnes committed Dec 8, 2023
1 parent 1ed963f commit 3b38e5a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/img-clip/clipboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ M.check_if_content_is_image = function(cmd)
local output = util.execute("xclip -selection clipboard -t TARGETS -o")
if not output then
return false
elseif string.find(output, "image/png") then
return true
else
return false
end
return string.find(output, "image/png") ~= nil

-- Linux (Wayland)
elseif cmd == "wl-paste" then
Expand Down

0 comments on commit 3b38e5a

Please sign in to comment.