nadrad / h-m-m

Hackers Mind Map
GNU General Public License v3.0
1.89k stars 53 forks source link

Should always show clear error message when missing xclip #6

Closed ndew623 closed 2 years ago

ndew623 commented 2 years ago

This requires xclip to copy/cut and paste, which might be worth mentioning in the README.

Either way a message indicating it's missing should appear when you try to cut, copy, or paste without it. Currently, when trying to yank without xclip a sh: line 1: xclip: command not found message appears. Which is good. When trying to cut or paste however that message does not appear. After failing to paste it also seems to get stuck in a weird state where none of the nodes are selected and using the h, j, k, l keys sometimes causes a Warning: Undefined array key "" message and other times crashes h-m-m. Selecting the root node with ~ gets out of that state.

nadrad commented 2 years ago

Thanks. Now it supports xclip, xsel, and wl-clipboard, and if none exists, terminates with an error message. It's also mentioned in the readme now.