btop icon indicating copy to clipboard operation
btop copied to clipboard

[REQUEST] Option to completely disable keyboard/mouse input in btop

Open SupDos opened this issue 2 years ago • 2 comments

I'd like to be able to run btop permanently on a screen without worrying that someone might mess around in it or accidentally kill processes.

Describe the solution you'd like An option in btop.conf which disables all input in the program, therefore being able to run without worry.

SupDos avatar Jun 29 '23 23:06 SupDos

I have no idea whether this makes sense as a feature, but I can suggest a workaround using a small expect script:

#!/usr/bin/expect -f 
spawn -noecho btop
interact {
 \003 exit
 q {send q}
 -re .* {}
}

This will run btop, exit forcibly on Ctrl+C, forward only the 'q' command, and ignore any other input.

Usage: install expect, save the script as btop.exp with execute permission, and run it as ./btop.exp

luigig44 avatar Jul 03 '23 06:07 luigig44

https://github.com/aristocratos/btop/pull/1402 gets you half way there.

deckstose avatar Dec 17 '25 13:12 deckstose