htop icon indicating copy to clipboard operation
htop copied to clipboard

Added an option to disable the mouse.

Open MartinJM opened this issue 5 years ago • 2 comments

I saw Issue #900 and decided to take a look at it.

I have added an option in the Settings that stores if the mouse should be enabled or not. This can be toggled using a command line flag ("-m" or "--no-mouse"). If you want to permanently disable the mouse, the setting can also be set in the config file.

Apologies for the edits on the empty lines. The editor that I used removes whitespace if the line is empty otherwise. This is my first pull request, so if there is something I can do better, please let me know so I can learn from it.

MartinJM avatar Jul 12 '19 19:07 MartinJM

I found something I hadn't considered before. When starting the program with the flag to disable the mouse, and then changing another option within htop, the setting for the mouse is saved to the settings file as well. This means the mouse is disabled without an easy method to turn it on again.

For this reason, I have added the option to the display options as well.

This doesn't change the behaviour, but it makes it more clear to the user, and gives the user a method to change it.

MartinJM avatar Jul 12 '19 20:07 MartinJM

Merged here: htop-dev/htop@011125d

natoscott avatar Aug 20 '20 05:08 natoscott