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