Skip to content

Commit

Permalink
Merge branch 'main' into feat/support-vimwiki
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonHarnes committed May 9, 2024
2 parents e1680ec + 2c2b72a commit f0f4a37
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lua/img-clip/clipboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ M.get_clip_cmd = function()
elseif (util.has("win32") or util.has("wsl")) and util.executable("powershell.exe") then
M.clip_cmd = "powershell.exe"

-- Linux (Wayland)
elseif os.getenv("WAYLAND_DISPLAY") and util.executable("wl-paste") then
M.clip_cmd = "wl-paste"

-- Linux (X11)
elseif os.getenv("DISPLAY") and util.executable("xclip") then
M.clip_cmd = "xclip"

-- MacOS
elseif util.has("mac") then
if util.executable("pngpaste") then
M.clip_cmd = "pngpaste"
elseif util.executable("osascript") then
M.clip_cmd = "osascript"
end

-- Linux (Wayland)
elseif os.getenv("WAYLAND_DISPLAY") and util.executable("wl-paste") then
M.clip_cmd = "wl-paste"

-- Linux (X11)
elseif os.getenv("DISPLAY") and util.executable("xclip") then
M.clip_cmd = "xclip"
else
return nil
end
Expand Down

0 comments on commit f0f4a37

Please sign in to comment.