1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-19 18:47:39 +00:00

SystemMonitor: Add Delete as alternate shortcut for killing a process

This matches behaviour of other "system monitors", like Windows's Task
Manager
This commit is contained in:
Maciej 2021-11-12 17:18:50 +01:00 committed by Linus Groh
parent f19cb6bb22
commit 7f7db7dbec

View file

@ -255,7 +255,7 @@ int main(int argc, char** argv)
}; };
auto kill_action = GUI::Action::create( auto kill_action = GUI::Action::create(
"&Kill Process", { Mod_Ctrl, Key_K }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png").release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) { "&Kill Process", { Mod_Ctrl, Key_K }, { Key_Delete }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png").release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
pid_t pid = selected_id(ProcessModel::Column::PID); pid_t pid = selected_id(ProcessModel::Column::PID);
if (pid != -1) if (pid != -1)
kill(pid, SIGKILL); kill(pid, SIGKILL);