diff options
author | Yigit Sever | 2024-04-25 18:50:30 +0300 |
---|---|---|
committer | Yigit Sever | 2024-04-25 18:50:30 +0300 |
commit | 8b201e213209c016d9208735cffe4e83b47a81f3 (patch) | |
tree | 416ab2fe6698d789e72aff1d4e7356389e82d80b /.config/nvim/lua | |
parent | 7bc07e5f4696da9f7881625d2fbe3d1cde86539b (diff) | |
download | dotfiles-8b201e213209c016d9208735cffe4e83b47a81f3.tar.gz dotfiles-8b201e213209c016d9208735cffe4e83b47a81f3.tar.bz2 dotfiles-8b201e213209c016d9208735cffe4e83b47a81f3.zip |
nvim: use xsel_override when xsel is present
so only on x11
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/plugins/cutlass.lua | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/.config/nvim/lua/plugins/cutlass.lua b/.config/nvim/lua/plugins/cutlass.lua index b9332a9..521c906 100644 --- a/.config/nvim/lua/plugins/cutlass.lua +++ b/.config/nvim/lua/plugins/cutlass.lua | |||
@@ -32,19 +32,22 @@ return { | |||
32 | { | 32 | { |
33 | "gbprod/yanky.nvim", | 33 | "gbprod/yanky.nvim", |
34 | config = function() | 34 | config = function() |
35 | -- fix Target STRING not available | 35 | if vim.fn.executable('xsel') == 1 then |
36 | vim.g.clipboard = { | 36 | -- fix Target STRING not available |
37 | name = 'xsel_override', | 37 | -- if we are using xsel (X11) |
38 | copy = { | 38 | vim.g.clipboard = { |
39 | ['+'] = 'xsel --input --clipboard', | 39 | name = 'xsel_override', |
40 | ['*'] = 'xsel --input --primary', | 40 | copy = { |
41 | }, | 41 | ['+'] = 'xsel --input --clipboard', |
42 | paste = { | 42 | ['*'] = 'xsel --input --primary', |
43 | ['+'] = 'xsel --output --clipboard', | 43 | }, |
44 | ['*'] = 'xsel --output --primary', | 44 | paste = { |
45 | }, | 45 | ['+'] = 'xsel --output --clipboard', |
46 | cache_enabled = 1, | 46 | ['*'] = 'xsel --output --primary', |
47 | } | 47 | }, |
48 | cache_enabled = 1, | ||
49 | } | ||
50 | end | ||
48 | 51 | ||
49 | local map = require("helpers.keys").map | 52 | local map = require("helpers.keys").map |
50 | 53 | ||