diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua index 5acce7b..104bbf9 100644 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -86,12 +86,15 @@ function UnMapDHM() vim.api.nvim_del_keymap('n', 'N') end -local handle = io.popen 'lsusb | grep -c Sofle' -local automap = handle:read '*n' -handle:close() - -if not automap or os.getenv 'SSH_TTY' then +if os.getenv 'SSH_TTY' then MapDHM() +else + local handle = io.popen 'lsusb | grep -c Sofle' + local automap = handle:read '*n' + handle:close() + if not automap then + MapDHM() + end end local wk = require 'which-key'