We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8b0c61 commit 2671c6aCopy full SHA for 2671c6a
1 file changed
lua/fzf-lua-extra/providers/zmx.lua
@@ -28,6 +28,13 @@ local __DEFAULT__ = {
28
local r = parse(sel)
29
if not r then return end
30
-- local kwin = assert(os.getenv('KITTY_WINDOW_ID'), 'only support kitty')
31
+ local ksock = assert(os.getenv('KITTY_LISTEN_ON'), 'only support kitty')
32
+ ksock = (ksock:gsub('unix:', ''))
33
+ if not vim.uv.fs_stat(ksock) then -- fix kitty socket
34
+ ksock = vim.split(vim.fn.glob(vim.fs.joinpath(vim.fs.dirname(ksock), '/kitty-*')), '\n')[1]
35
+ if not ksock or not vim.uv.fs_stat(ksock) then error('kitty socket not found') end
36
+ vim.env.KITTY_LISTEN_ON = 'unix:' .. ksock
37
+ end
38
local kwin = vim.fn.system(
39
[[kitten @ ls | jq -r '.[] | select(.is_focused == true) | .tabs[] | select(.is_focused == true) | .windows[] | select(.is_focused == true) | .id']]
40
)
0 commit comments