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') | ||||
| end | ||||
| 
 | ||||
| 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 or os.getenv 'SSH_TTY' then | ||||
| 	if not automap then | ||||
| 		MapDHM() | ||||
| 	end | ||||
| end | ||||
| 
 | ||||
| local wk = require 'which-key' | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 fiplox
						fiplox