feature: add more clipboard tools to default config
This commit is contained in:
2 files changed
+161
-33
No files matched your search
@@ -7,6 +7,17 @@ local M = {
|
||||
|
||||
-- Copy/paste tools to check for
|
||||
tools = {
|
||||
-- macOS clipboard
|
||||
{
|
||||
name = "pbcopy",
|
||||
detect = function()
|
||||
return vim.fn.executable("pbcopy") == 1 and vim.fn.executable("pbpaste") == 1
|
||||
end,
|
||||
commands = {
|
||||
copy = "pbcopy",
|
||||
paste = "pbpaste",
|
||||
},
|
||||
},
|
||||
-- Wayland and wl-copy/wl-paste
|
||||
{
|
||||
name = "wl-clipboard",
|
||||
@@ -24,6 +35,20 @@ local M = {
|
||||
paste = "wl-paste --no-newline",
|
||||
},
|
||||
},
|
||||
-- Alternative Wayland tools
|
||||
{
|
||||
name = "waycopy",
|
||||
detect = function()
|
||||
local wayland_display = os.getenv("WAYLAND_DISPLAY")
|
||||
return vim.fn.executable("waycopy") == 1
|
||||
and vim.fn.executable("waypaste") == 1
|
||||
and wayland_display ~= nil
|
||||
end,
|
||||
commands = {
|
||||
copy = "waycopy",
|
||||
paste = "waypaste --no-newline",
|
||||
},
|
||||
},
|
||||
-- X11 and xclip
|
||||
{
|
||||
name = "xclip",
|
||||
@@ -42,6 +67,44 @@ local M = {
|
||||
paste = "xsel --clipboard --output",
|
||||
},
|
||||
},
|
||||
-- tmux clipboard
|
||||
{
|
||||
name = "tmux",
|
||||
detect = function()
|
||||
return os.getenv("TMUX") ~= nil and vim.fn.executable("tmux") == 1
|
||||
end,
|
||||
commands = {
|
||||
copy = "tmux load-buffer -",
|
||||
paste = "tmux save-buffer -",
|
||||
},
|
||||
},
|
||||
-- Lemonade (SSH)
|
||||
{
|
||||
name = "lemonade",
|
||||
detect = "lemonade",
|
||||
commands = {
|
||||
copy = "lemonade copy",
|
||||
paste = "lemonade paste",
|
||||
},
|
||||
},
|
||||
-- DoIt client (SSH)
|
||||
{
|
||||
name = "doitclient",
|
||||
detect = "doitclient",
|
||||
commands = {
|
||||
copy = "doitclient wclip",
|
||||
paste = "doitclient rclip",
|
||||
},
|
||||
},
|
||||
-- Windows win32yank
|
||||
{
|
||||
name = "win32yank",
|
||||
detect = "win32yank.exe",
|
||||
commands = {
|
||||
copy = "win32yank.exe -i --crlf",
|
||||
paste = "win32yank.exe -o --lf",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user