mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 14:14:24 -05:00
Add wl-paste support (#168)
* Add wl-paste support * Apply stylua * Update README
This commit is contained in:
committed by
GitHub
parent
0f53c256da
commit
04a4ecb0de
@@ -116,7 +116,7 @@ of being able to edit it.
|
|||||||
- [0.0 Prerequisites](#00-prerequisites)
|
- [0.0 Prerequisites](#00-prerequisites)
|
||||||
- [0.0.1 Telescope](#001-telescope)
|
- [0.0.1 Telescope](#001-telescope)
|
||||||
- [0.0.2 calendar-vim Plugin (optional)](#002-calendar-vim-plugin-optional)
|
- [0.0.2 calendar-vim Plugin (optional)](#002-calendar-vim-plugin-optional)
|
||||||
- [0.0.3 For pasting images: xclip (optional)](#003-for-pasting-images-xclip-optional)
|
- [0.0.3 For pasting images: xclip (optional), wl-clipboard (optional)](#003-for-pasting-images-xclip-optional-wl-clipboard-optional)
|
||||||
- [0.0.4 For image previews: telescope-media-files.nvim (optional)](#004-for-image-previews-telescope-media-filesnvim-optional)
|
- [0.0.4 For image previews: telescope-media-files.nvim (optional)](#004-for-image-previews-telescope-media-filesnvim-optional)
|
||||||
- [catimg](#catimg)
|
- [catimg](#catimg)
|
||||||
- [viu](#viu)
|
- [viu](#viu)
|
||||||
@@ -164,7 +164,7 @@ See below for installing and using it.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### 0.0.3 For pasting images: xclip (optional)
|
#### 0.0.3 For pasting images: xclip (optional), wl-clipboard (optional)
|
||||||
|
|
||||||
Telekasten.nvim supports pasting images from the clipboard. Currently, this is implemented for systems that have
|
Telekasten.nvim supports pasting images from the clipboard. Currently, this is implemented for systems that have
|
||||||
the `xclip` utility installed or on macs.
|
the `xclip` utility installed or on macs.
|
||||||
@@ -175,6 +175,8 @@ On Ubuntu/Debian like systems:
|
|||||||
sudo apt-get install xclip
|
sudo apt-get install xclip
|
||||||
```
|
```
|
||||||
|
|
||||||
|
On [Wayland](https://wayland.freedesktop.org/) systems you can install [wl-clipboard](https://github.com/bugaevc/wl-clipboard)
|
||||||
|
|
||||||
On Macs, you should not install a separate tool. Installing xclip will prevent this feature from working properly.
|
On Macs, you should not install a separate tool. Installing xclip will prevent this feature from working properly.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -413,6 +413,10 @@ local function imgFromClipboard()
|
|||||||
.. "/"
|
.. "/"
|
||||||
.. filename
|
.. filename
|
||||||
end
|
end
|
||||||
|
elseif vim.fn.executable("wl-paste") == 1 then
|
||||||
|
get_paste_command = function(dir, filename)
|
||||||
|
return "wl-paste -n -t image/png > " .. dir .. "/" .. filename
|
||||||
|
end
|
||||||
elseif vim.fn.executable("osascript") == 1 then
|
elseif vim.fn.executable("osascript") == 1 then
|
||||||
get_paste_command = function(dir, filename)
|
get_paste_command = function(dir, filename)
|
||||||
return string.format(
|
return string.format(
|
||||||
|
|||||||
Reference in New Issue
Block a user