change test for automap (do not execute lsusb on ssh)
This commit is contained in:
parent
3974ab5bb4
commit
1a3744d95e
@ -86,13 +86,16 @@ function UnMapDHM()
|
|||||||
vim.api.nvim_del_keymap('n', 'N')
|
vim.api.nvim_del_keymap('n', 'N')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if os.getenv 'SSH_TTY' then
|
||||||
|
MapDHM()
|
||||||
|
else
|
||||||
local handle = io.popen 'lsusb | grep -c Sofle'
|
local handle = io.popen 'lsusb | grep -c Sofle'
|
||||||
local automap = handle:read '*n'
|
local automap = handle:read '*n'
|
||||||
handle:close()
|
handle:close()
|
||||||
|
if not automap then
|
||||||
if not automap or os.getenv 'SSH_TTY' then
|
|
||||||
MapDHM()
|
MapDHM()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local wk = require 'which-key'
|
local wk = require 'which-key'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user