mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-03 12:02:56 +12:00
added ctrl+r shortcut to reload config from disk
This commit is contained in:
parent
e047f88bd5
commit
fb994b69eb
|
@ -41,6 +41,7 @@ namespace Input {
|
|||
//* Map for translating key codes to readable values
|
||||
const std::unordered_map<string, string> Key_escapes = {
|
||||
{"\033", "escape"},
|
||||
{"\x12", "ctrl_r"},
|
||||
{"\n", "enter"},
|
||||
{" ", "space"},
|
||||
{"\x7f", "backspace"},
|
||||
|
@ -258,8 +259,10 @@ namespace Input {
|
|||
Draw::calcSizes();
|
||||
Runner::run("all", false, true);
|
||||
return;
|
||||
}
|
||||
else
|
||||
} else if (is_in(key, "ctrl_r")) {
|
||||
kill(getpid(), SIGUSR2);
|
||||
return;
|
||||
} else
|
||||
keep_going = true;
|
||||
|
||||
if (not keep_going) return;
|
||||
|
|
|
@ -177,6 +177,7 @@ namespace Menu {
|
|||
{"F2, o", "Shows options."},
|
||||
{"F1, ?, h", "Shows this window."},
|
||||
{"ctrl + z", "Sleep program and put in background."},
|
||||
{"ctrl + r", "Reloads config file from disk."},
|
||||
{"q, ctrl + c", "Quits program."},
|
||||
{"+, -", "Add/Subtract 100ms to/from update timer."},
|
||||
{"Up, Down", "Select in process list."},
|
||||
|
|
Loading…
Reference in a new issue